VX-Mega128 ATmega128 Microcontroller board

Similar documents
Android Controlled Based Interface

ET-BASE AVR ATmega64/128

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

STK User Guide

WIZ-Embedded WebServer User s Manual (Ver. 1.0)

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

EvB 5.1 v5 User s Guide

AVRprog. programmer by MikroElektronika

AC-PG-USBASP USBASP AVR Programmer

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

AVR Butterfly Training. Atmel Norway, AVR Applications Group


DSO138 oscilloscope program upgrade method

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Atmel AVR ATxmega384C3 microcontroller OLED display with pixels resolution Analog sensors. Ambient light sensor Temperature sensor

AVR Prog USB v3 MK II Eco Manual

Thermostat Application Module Kit

Mobius 3 Circuit Board Programming Instructions

Programming Device Manual Booklet AVR Prog USB v2

Tutorial for MPLAB Starter Kit for PIC18F

Lab Experiment 1: The LPC 2148 Education Board

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

PolyBot Board. User's Guide V1.11 9/20/08

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Introducing AVR Dragon

Quick Start Guide. TWR-MECH Mechatronics Board TOWER SYSTEM

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Designing VM2 Application Boards

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Two mechanical buttons Two user LEDs Four expansion headers. Board controller with USB interface. One power LED and one status LED

WICE-SPI Hardware Operation Manual

USER GUIDE EDBG. Description

KTA-223 Arduino Compatible Relay Controller

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

The Programming Interface

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

AVR Prog User Guide. Section 3

USB / Data-Acquisition Module NOW LEAD-FREE

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

User Manual. AS-Interface Programmer

Installing the Gerber P2C Plotter USB Driver

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

INTRODUCTION TO SERIAL ARM

Programming the On-Chip Flash on a phycore-xc161 phycore-xc167

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

Installation of USB Virtual COM. Version 1.02

Guide to Installing BBL Crystal MIND on Windows 7

How To Use An Ams 5812 Pressure Sensor With A Usb Starter Kit

Software User Guide UG-461

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Nuvoton Nu-Link Debug Adapter User Manual

MAX6683 Evaluation System/Evaluation Kit

Capacitive Touch Lab. Renesas Capacitive Touch Lab R8C/36T-A Family

Atmel Norway XMEGA Introduction

FLYPORT Wi-Fi G

Controlling a Dot Matrix LED Display with a Microcontroller

An Introduction to MPLAB Integrated Development Environment

RC2200DK Demonstration Kit User Manual

Real Time Clock USB Evaluation Board V3.0

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

Config software for D2 systems USER S MANUAL

QUICK START GUIDE. SG2 Client - Programming Software SG2 Series Programmable Logic Relay

The CW Machine Hardware

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

POCKET SCOPE 2. The idea 2. Design criteria 3

Introduction. Getting familiar with chipkit Pi

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

SOFTWARE INSTALLATION INSTRUCTIONS

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

ic-mq EVAL MQ1D EVALUATION BOARD DESCRIPTION

Atmel AVR1923: XMEGA-A3BU Xplained Hardware User Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

Dynamite Programmer User Manual tutti i diritti sono riservati. User Manual. - English -

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Installation Instructions for 9555 USB Driver

EVAL-UFDC-1/UFDC-1M-16

PCAN-MicroMod Evaluation Test and Development Environment for the PCAN-MicroMod. User Manual. Document version ( )

PN532 NFC RFID Module User Guide

Board also Supports MicroBridge

AT89C5131A Starter Kit... Software User Guide

CashFlow Programming Module CPM

Quick Start Guide for High Voltage Solar Inverter DC-AC Board EVM. Version 1.3

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

JX-2148 : LPC2148 ARM7-32 bit Microcontroller Education board l 1

USER GUIDE. ZigBit USB Stick User Guide. Introduction

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

2.0 Command and Data Handling Subsystem

SAM D21 Xplained Pro. Preface. SMART ARM-based Microcontrollers USER GUIDE

STIM202 Evaluation Kit

Quick Operation Guide DAB, DAB + und DMB USB Digital Receiver Albrecht DR 403

INDEX. Trademarks All name and product s trademarks mentioned below are the property of their respective companies.


Transcription:

VX-Mega128 : ATmega128 Microcontroller board documentation 1 VX-Mega128 ATmega128 Microcontroller board 1. Features Support the ATmega128 with Flash memory of 128KB. Clock rate 1.756MHz I/O port of microcontroller are using INEX s standard PCB- pin connector. LCD16x2 module of Button switches Binary Switch USB port with FT22RL USB to Serial converter circuit. ATmega128 pre-programmed Boot loader, programmable via USB port. 8-ch. Analog input with 10-bit Analog to Digital Converter 2KB RAM / 2KB EEPROM memory module plug on top Support In-system Programming via ISP connector with PX-00 Programmer Supply voltage +9V from external. 500mA on-board regulator. Includes : ATmega128 Microcontroller board, Plugable Memory module, USB cable, CD- ROM and Documentation.

2 VX-Mega128 : ATmega128 Microcontroller board documentation VX-Mega128 AVR Microcontroller Part 1 : Main section AREF AVcc 29 PD (ICP1) 0 PD5 (XCK) 1 PD6 (T1) 2 PD7 (T2) IC2 ATMEGA128-16 PF0 (ADC0) PF1 (ADC1) PF2 (ADC2) PF (ADC) PF (ADC/TCK) PF5 (ADC5/TMS) C2 16V 17 18 21 26 25 7 Vcc-IO PF0 (ADC0) V OUT TEST A PF1 (ADC1) PF2 (ADC2) PF (ADC) Vcc 20 PF (ADC) Vcc PF5 (ADC5) RST LED1 DATA LED2 USB 1 POWEREN 12 TXLED 11 RXLED R 1k R 1k D - D + 16 15 1 2 K1 USB PF6 (ADC6/TDO) PF7 (ADC7/TDI) 62 6 61 60 59 58 57 56 55 5 AVcc ADC0 ADC2 ADC ADC6 1 TxD 5 RxD AREF IC1 FT22RL PF6 (ADC6) PF7 (ADC7) ADC1 ADC ADC5 ADC7 R1 27 SCL WR A8 A10 A12 A1 RST AD7 AD5 AD AD1 SDA RD A9 A11 A1 A15 ALE AD6 AD AD2 AD0 WR RD A15 A1 A1 A12 A11 A10 A9 A8 ALE AD7 AD6 AD5 AD AD AD2 AD1 AD0 PD0 (SCL/INT0) PD1 (SDA/INT1) PD2 (RXD1/INT2) PD (TXD1/INT) PD (ICP1) PB5 (PWM5) PB6 (PWM) PB7 (PWM) PE (PWM2) PE (PWM1) PE5 (PWM0) XTAL2 2.768kHz 18 19 2 RTCX1 RTCX2 X1 2 XTAL1 1.756MHz X2 R5 7 RS Vee Vcc R/W EN AD0 AD1 AD2 AD AD AD5 AD6 AD7 2 1 0 9 8 7 6 5 5 6 7 8 9 50 51 PG0 (WR) PG1 (RD) PC7 (A15) PC6 (A1) PC5 (A1) PC (A12) PC (A11) PC2 (A10) PC1 (A9) PC0 (A8) PG2 (ALE) PA7 (AD7) PA6 (AD6) PA5 (AD5) PA (AD) PA (AD) PA2 (AD2) PA1 (AD1) PA0 (AD0) PB5 (OC1A) PB6 (OC1B) PB7 (OC2/OC1C) PE (OCB/INT) PE (OCA/AIN1) PE5 (OCC/INT5) PB0 (SS) PB1 (SCK) PB2 (MOSI) PB (OC0) PB (MISO) PE0 (RXD0/PDI) PE1 (TXD0/PDO) PEN 16 15 17 5 10 11 6 7 12 1 1 2 1 LCD Module 16 Char. x 2 Lines R9 2.2k PB0 (SS) PB1 (SCK) PB2 (MOSI) PB (MISO) C7 22pF 20 25 26 27 28 RST PD0 (SCL/INT0) PD1 (SDA/INT1) PD2 (RxD1/INT2) PD (TxD1/INT) PB (OC0) RST 21 Vcc 52 Vcc S1 RESET R8 2.2k VR1 10k LCD CONTRAST C9 16V DSP1 R7 10k C5 16V C6 16V 22 5 6 C8 22pF K ATmega128 EXPANSION BUS K ISP : In-System Programming PORT MOSI RST SCK MISO R6 10k (Optional) C 16V Vcc to I/O section R2 27 C 16V JP1 AVcc C1 16V K2 ADC port JP2 AREF Figure 1 Microcontroller scetiob schematiuc diagram of VX-Mega128 board

VX-Mega128 : ATmega128 Microcontroller board documentation 2. Circuit and Memory map The VX-Mega128 microcontroller board schematic diagram is splited to sections. The microcontroller section schematic diagram is shown in figure 1. Input/Output port and external device interface schematic diagram is shown in figure 2 and figure shows the circuit of Memory extension module. D.IN0 D.IN1 D.IN2 to MAIN section WR A10 A11 RD WR A12 9 A1 10 A1 12 A15 1 1 6 5 IC/1 IC/2 8 1 2 6 5 11 IC/ IC 7 7AC00 16 A0 A1 A2 CS1 CS CS2 8 Y0 Y1 Y2 15 1 1 0xF000 WR 0xF000 RD 0xF00 WR 0xF00 RD Y Y 12 11 C10 50V 0xF800 WR - PORT D.OUT Y5 10 0xF800 RD - PORT D.IN Y6 9 0xFC00 WR Y7 7 0xFC00 RD - SWITCH IC 7AC18 D.OUT0 D.OUT1 D.OUT2 D.IN D.IN R10 10k*8 20 C11 50V R11 10k*8 20 1 IC/ 2 C12 50V D.OUT D.OUT D.IN5 D.IN6 D.IN7 2 I0 I1 I2 5 I 6 I 7 I5 8 I6 9 I7 IC 7AC51 10 D0 D1 D2 D D 18 17 16 15 1 1 D5 12 D6 11 D7 1 OE1 19 OE2 AD0 AD1 AD2 AD AD AD5 AD6 AD7 AD0 AD1 AD2 AD AD AD5 AD6 AD7 2 D0 D1 D2 5 D 6 D 7 D5 8 D6 9 D7 Q0 Q1 Q2 Q Q 19 18 17 16 15 1 Q5 1 Q6 12 Q7 11 1 LE OE 10 R12 R1 R1 R15 R16 R17 R18 R19 R12-R19 150 x 8 D.OUT5 D.OUT6 D.OUT7 2 5 C0 C1 S2 BINARY SWITCH D0 D1 D2 D 1 6 R20 10k*8 20 2 I0 I1 I2 5 I 6 I 7 I5 8 I6 9 I7 10 D0 D1 D2 D D 18 17 16 15 1 1 D5 12 D6 11 D7 1 OE1 19 OE2 C1 50V AD0 AD1 AD2 AD AD AD5 AD6 AD7 J1 DC.input 6-12V BD1 1A50V IC5 7AC57 S ON C1 220µF 25V IC7 78R05 IN SHDN OUT C15 1000µF 6.V C16 220µF 25V R21 510 LED POWER IC6 7AC51 SW1 SW2 SW SW VX-Mega128 AVR Microcontroller Part 2 : I/O section and power supply Figure 2 I/O port and external device interface schematic diagram of VX- Mega128 microcontroller board

VX-Mega128 : ATmega128 Microcontroller board documentation C17 50V 8 Vcc 1 A0 2 A1 A2 7 WP SDA 5 6 SCL IC8 2C256 (2K x 8bit) SCL WR A8 A10 A12 A1 RST D7 D5 D D1 SDA RD A9 A11 A1 A15 ALE D6 D D2 D0 K ATmega128 EXPANSION BUS AD0 AD1 AD2 AD AD AD5 AD6 AD7 ALE D D 7 D5 8 D6 9 D7 11 LE 20 2 D0 D1 D2 5 6 OE 1 10 Q0 19 Q1 18 Q2 17 Q Q 16 15 Q5 1 Q6 1 Q7 12 C18 50V A0 A1 A2 A A A5 A6 A7 IC9 7AHC57 A0 A1 A2 A A A5 A6 A7 A8 A9 A10 A11 A12 A1 A1 WR RD A15 10 A0 9 A1 8 A2 7 6 A A 5 A5 A6 A7 25 A8 2 A9 21 A10 2 2 A11 A12 26 A1 1 A1 27 WR 22 OE 20 CE 2 D0 D1 D2 D D D5 D6 D7 11 12 1 15 16 17 18 19 C19 50V AD0 AD1 AD2 AD AD AD5 AD6 AD7 IC10 SRAM 62256 (2K x 8bit) 12 Figure Data memory extension module schematic diagram ATmega128 operates with clock frequency 1.756MHz from external crystal circuit. The crystal 2.768kHz is connectede to ATmega128 for setting the clock frequency to support internal Real-time counter. Supply voltage comes from external DC adaptor +9V (+16V maximum) via regulator circuit with 78R05 ICs. VX-Mega128 supports both in Single chip microcontroller mode and Microprocessor mode. ATmega128 interfaces with all external device via address assignment. In figure shows the memory and I/O map of VX-Mega128 board. External device that connected with ATmega128 are assigned in address F000H to FFFFH included : (1) LCD module 16x2 : connect 8-bit data bus with AD0 to AD7 of ATmega128. It causes reading and writing via data bus instead direct interface. (2) of Input Switches (SW1 to SW) : address at upper nibble of FC00H. Signal is buffered via 7AC51 IC. () -bit binary Switch : trhis switch gives binary bits. It means 16 different data 0000 to 1111 in binary base or 0 to 15 in decimal and 0 to F in HEX. Data from Binary switch are tranfered to data bus ; AD0 to AD via 7AC51 buffer IC and assigned at lowewr nibble of FC00H.

VX-Mega128 : ATmega128 Microcontroller board documentation 5 FFFFH F000H EFFFH I/O address Not used FFFFH FC00H Switch Input FFFFH FC00H Not used Digital port data Output FBFFH Digital port data Input FBFFH 8000H 7FFFH F800H F7FFH F800H F7FFH 28KB from 62256 external RAM Not used F00H Not used F00H 1000H 0FFFH 0000H Internal KB of ATmega128 Not used FFFH F000H Not used FFFH F000H ATmega128 R/W = "0" Write mode R/W = "1" Read mode Figure Memory and Input Output port organization of VX-Mega128 micrcocontroller board Also the digital input and output port of VX-Mega128 board are assigned via address map system as follows : Digital input port D.IN0 to D.IN7 are assigned at F800H address. Digital output port D.OUT0 to D.OUT7 are assigned at F800H address too. but active with WR signal insterad. All interface port include Analog to Dital converter module input are connect to INEX -pin PCB connector. User can connect with INEX many sensors and modules. VX-Mega128 board supports 8-channel of Analog to digital converter. User can select supply voltage and reference for ADC module with 2 jumpers JP1 and JP2. If fit all, selects ADC module to use supply and reference voltage at. If remove all, user can apply the voltage at these points. The limitation is reference voltage must lower or equal the supply voltage of ADC module. Normally, fit both jumpers on the board. Computer interface of VX-Mega128 board via USB. The heart of this function is FT22RL the USB to Serial converter chip. Thus, interface signal is serial and connect to UART1 module in ATmega128. The programming shall be easier and supports all modern computer includes labtop which not serial port available. Addition user can program microcontroller s flah memory via USB interface. Because ATmega128 microcontroller will be pre-programmed the bootloader ready. It means this microcontroller baord can program the flash 2 ways. One is via ISP connector with external In-System Programmer such as PX-00. Another is via USB with bootloader (Atmega128 must pre-rpogrammed ready).

6 VX-Mega128 : ATmega128 Microcontroller board documentation. How to program the VX-Mega128 board Flash programming ATmega128 on VX-Mega128 board has 2 methods. (1) via ISP connector with external In-System Programmer : The suggession programmer is INEX s PX-00 amd Atmel s AVR ISP In-System Programmer (2) via USB with bootloader : This method ATmega128 must pre-programmed bootloader firmware. INEX prepare ready to using. However user can re-program the bootloader with yourself by external programmer via ISP connector. In CD-ROM contain the HEX file of this bootloader. On VX-Mega128 board has FT22RL USB to Serial converter chip to interface the USB but in software will look as COM port. Signal from FT22RL are connected to SPI programming pin PDI (PE0) and PDO (PE1) of ATmega128. With this method, user no need the external programer to flash programming. Only plug USB cable between baord and computer. Open the suitable software. You can work with this microcontroller board.. Extension memory board The memory board of VX-Mega128 is 6KB. Divides 2 parts. One is Static RAM 2KB ; 62256. However user can work only lower 28KB. Because upper KB is reserved by internal RAM data memory of ATmega128. Interfacing of this RAM work via the EXPANSION BUS. This bus provides 8-bit data/address lines; AD0 to AD7 and Address line A8 to A15, and all control signal. Another memory part is serial EEPROM 2KB; 2C256. ATmega128 interfaces via I 2 C bus or Two-Wire Interface (TWI). If you need to use this memeory board with VX-Mega128 board, must plug this module on top at EXPANSION connector. 5. Software in VX-Mega128 board The related software work with VX-Mega128 microcontroller board that suggession has softwares as follows : (1) IDE development tool - introduce AVR Studio. It support both Assembly and C programming. Download the latest version at www.atmel.com (2) C compiler - suggess WinAVR. It is powerful GCC compiler and important Free of charge. It can work with AVR Studio. User can develop C program under AVR Studio and use WinAVR to compile. Download the latest version at http:// sourceforge.net/projects/winavr

VX-Mega128 : ATmega128 Microcontroller board documentation 7 () Flash programming software - suggess 2 softwares; AVR Prog and AVR- OSP II. The AVR Prog will install with AVR Studio. Avr-Osp II is separated. But user can add Avr-OSP II into AVR Studio for easier to using. Download the latest version at http:// esnips.com/web/atmelavr () Boot loader - It is small firmware that program into Flash program memory of ATmega128. Its function is write the HEX code with itself via controlling from computer via serial port. Programming this code into ATmga128 must use external In-System Programmer in first time. However the manufacturer pre-program the bootloader ready. The installation must do following these step as follows (1) Install AVR Studio (2) Install WinAVR compiler () Install Virtual COM port (VCP) driver () Install Avr-Osp II software if require 5.1 AVR Studio installation 5.1.1 Insert the AVR CD-ROM and look for this file in the AVR Studio directory; astudiob60.exe. Double-click this file. 5.1.2 Enter the Installation Wizard. Click on the Next button to continue. 5.1. In the license agreement window, Select the box : I accept the terms of the license agreement and Click on the Next button.

8 VX-Mega128 : ATmega128 Microcontroller board documentation 5.1. Choose Destination Location windows will appear. You can change the path by clicking on the Change button and setting a new path. After this, click on the Next button. 5.1.5 The Driver USB Upgrade window will now appear. Click on the Next button to pass this step. 5.1.6 In the begin installation window, click on the Install button to start installation. 5.1.7 After the installation is complete, click on the Finish button to end the installation of AVR Studio.

VX-Mega128 : ATmega128 Microcontroller board documentation 9 5.1.8 Next step is updating the software with service pack. Open CD-ROM. Enter to Software folder AVR Studio.12. Look for this file in the Update folder ; astudio12spb97.exe. Double-click this file. The welcome installation windows will appear. Click the Next button to continue. 5.1.9 The Select Features window appear. Click the Next button to install the update files.

10 VX-Mega128 : ATmega128 Microcontroller board documentation 5.1.10 The Setup Status window appear and shows the installation progress bar. Wait until finish. 5.1.11 After installation complete, click the Finish button.

VX-Mega128 : ATmega128 Microcontroller board documentation 11 5.1.12 To Launch the AVR Studio program, click on Start Programs Atmel AVR Tools AVR Studio. The main window of the AVR Studio program will appear. 5.2 WinAVR installation Please note that installation of WinAVR is done after the installation of AVR Studio. Please ensure this is being done before proceeding. 5.2.1 Insert the AVR CD-ROM, and find the installation file of WinAVR ; WinAVR- 2006021-install.exe in folder Software WINAVR 2006021 Double-click this file. 5.2.2 Installation language dialog box will appear for selection the language of this installation. Select your preferred language from the sliding bar.after that click on the OK button.

12 VX-Mega128 : ATmega128 Microcontroller board documentation 5.2. The Welcome installation software window appears and shows the installation information. Click on the Next button. 5.2. In the License agreement window, Click on the I agree button. 5.2.5 Choose Install Location window appears. User can change the path and the folder for the installation of WinAVR by clicking at the Browse button and selecting the respective folder. The proposed folder is C:\WinAVR. After selection, click Next button to continue to the next step. 5.2.6 In the Choose Components window, select the components which you want to install or follow according to the below diagram. Click on the Install button to begin the installation. 5.2.7 The installation process starts and reports the status back on the screen. The User needs to wait until the installation is complete. Click on the Finish button to end once its done.

VX-Mega128 : ATmega128 Microcontroller board documentation 1 5. Install Virtual COM port (VCP) driver 5..1 Connect USB cable between VX-Mega128 board and computer s USB port. Put the ACR CD-ROM in CD-ROM drive. Apply the supply voltage to VX-Mega128 board. 5..2 Computer will detect the new hardware. 5.. After that the New Hardware window appear. Select Install from a list or specific location (Advanced) header and click the Next > button to continue. 5.. Next, click to select at Search for the best driver in theses location and Include this location in the search header. After that click Browse button to looks for Driver directory in CD-ROM. The driver file will contain in folder USB-VCP_driver WinNT_XP Click the Next button to continue. 5..5 All driver files will install to computer. 5..6 The USB High Speed Serial Converter installation complete window appear. Click the Finish button. USB indicator on VX-Mega128 board lights. 5..7 Wait a moment, the Virtual COM port installation driver window will appear. Select Install from a list or specific location (Advanced) header similar step 5.1.. and click the Next > button.

1 VX-Mega128 : ATmega128 Microcontroller board documentation 5..8 Select Search for the best driver in theses location and Include this location in the search header. Click Browse button to looks for Driver directory in CD-ROM. Must select the same destination from step 5.1... Click the Next > button to continue. F:\VX-M128v070101\USB-VCP_Driver\WinNT_XP 5..9 All driver files will install to computer. 5..10 The USB Serial port installation complete window appear. Click the Finish button to finish installation. 5..11 After installation complete, user can check the position of the Virtual COM port or USB Serial port. Open Control Panel. Select System Hardware Device Manager and see Port (COM & LPT). You will found USB Serial Port position. Remeber it for interfacing later. 6. Flash programming on VX-Mega128 board 6.1 Via USB port with Bootloader 6.1.1 Apply the supply voltage in range +6 to 12Vdc to VX-Mega128 board. Press the SW1 switch and turn-on power switch. The green POWER LED lights. Release the SW1. At LCD screen shows message below : VX-Mega128 Run > Bootloader Now the VX-Mega128 board enter to Bootloader mode. Ready for flash programming via USB port. 6.1.2 Connect USB cable between PC s USB port and VX-Mega128 board. Check the USB Serial port position from Device Manager following the figure 5. 6.1. Open AVR STudio to develop C program and compile to HEX file ready.

VX-Mega128 : ATmega128 Microcontroller board documentation 15 Figure 5 The Device Manager window shows the USB Serial port that installed in computer 6.1. At menu, selects Tool Program AVR Connect... following the illustrated below for setting the VX-Mega128 baord to connect with AVR Studio.

16 VX-Mega128 : ATmega128 Microcontroller board documentation 6.1.5 The Select AVR Programmer window appears below. Set all parameter as follows Platform: STK500 or AVRISP Port: COM2 (the USB Serial port position that set by computer) Click on the Connect button to connecting. 6.1.6 The AVRISP window appears below.

VX-Mega128 : ATmega128 Microcontroller board documentation 17 Set all parameter as follows Device : Programming mode : Flash : Atmega128 ISP mode Input Hex File After that click on the Browse button to select HEX file which required to download. Example file is VX128_Dm.HEX. Its path is C:\Documents and Settings\Administrator\Desktop\VX128_Dm\default (The result file - HEX file from compiler will be store in default folder) 6.1.7 Click on the Program button in Flash header for downloading VX128_Dm.HEX file to Atmega128 microcontroller on the VX-Mega128 board. The programming steps are : 6.1.7.1 Erase 6.1.7.2 Program the HEX file. It is VX128_Dm.HEX file. 6.1.7. Verify programming At AVRISP window will show the status at the bottom left corner of AVR Studio main window. Until the donwload finish, screen will show the message Leaving programming mode.. OK! 6.1.8 Now the flash programming ready. Press RESET switch to run the program. Observe the operation of VX-Mega128 board.

18 VX-Mega128 : ATmega128 Microcontroller board documentation Connect to USB port in case PC has only USB UCON-22S USB to Serial port converter Connect to Serial or COM port CX- cable 0 0 CX- cable PX-00 RS-22 ISP VX-Mega128 DC input Figure 5 The diagram of Flash programming via ISP connector with PX-00 programmer 6.2 With PX-00 programmer via ISP connector 6.2.1Apply the supply voltage during 6 to 12Vdc to VX-Mega128 board. Turn-on power switch. The green POWER indicator lights. 6.2.2 Connect PX-00 between Serial port and ISP connector on VX-Mega128 board. If your computer has only USB port, the USB to Serial port converter required. The UCON-22S is recommended. See the diagram in figure 5. 6.2. Open AVR STudio to develop C program and compile to HEX file ready. 6.2. At menu, Select Tool AVR Prog...

VX-Mega128 : ATmega128 Microcontroller board documentation 19 6.2.5 The AVRprog window appear. 6.2.6 For first time using AVRProg program, developer must set some parameter of flash programming for AVR Prog. The step is as follows : 6.2.6.1 Device box select ATmega128 6.2.6.2 Click on the Advance.. button. The Advance window appear.

20 VX-Mega128 : ATmega128 Microcontroller board documentation 6.2.6. Set all parameters identical the illustrate in step 6.2.6.2. After that click on the Write button once for writing the parameters. Theses parameters will store and set to default value for next working. 6.2.6. Click on the Close button to exit this window. 6.2.7 Back to the main window of AVRProg, at Hex file border, click on the Browse button to find the HEX file. For example, load file VX128_Dm.HEX from this path C:\Documents and Settings\Administrator\Desktop\VX128_Dm\default 6.2.8 Click on the Program button in Flash border. The progress bar will active to shows the progress status. 6.2.9 After downloading finished, the program will run immediately. The file VX128_Dm.HEX is Hardware testing program for VX-Mega128 board. 6. How to program bootloader with your own. If you make the flash programming of the VX-Mega128 board with the external In- System Programmer, possible to delete the Bootloader firmware. If you need to program Flash memory with bootloader again.your can re-program the bootloadr by your own with the external programmer via ISP connector. The bootloder HEX file is VX-M128_Boot.HEX. It is contained in folder Bootloader in CD-ROM that bundled with VX-Mega128 set. Programming procedure is similar the flash programming with ant HEX file with extrernal programmer. After the bootloader is programmed ready, you can program ATmega128 flash memory with Bootloader procedure at topic 6.1

VX-Mega128 : ATmega128 Microcontroller board documentation 21 7. Summary of Teting file of VX-Mega128 board The VX128_Dm.HEX is HEX file for testing the operation of VX-Mega128 board. Normally, maker will pre-programmed ready to test. In first time operation, after apply the supply voltage. LCD screen on the board will show this message : VX-Mega128 Run > User code and change to VX-Mega128 Demo After that MCU will read data from -bit Binary Switch to display on the LCD screen. The binary switch can supply -bit digital data and is called Knob. User can change the shaft at Binary switch and see the correct position. Summay of all functuion can show as follows : 0 : Display the Knob s value 000 on LCD16x2 module 1 : Testing the switches SW1 to SW 2 : ADC module testing : Test D.IN0 to D.IN7 input digital port : Test the D.OUT0 to D.OUT7 for output port 5 : Read port B (PB0 to PB7) 6 : Read port D (PD2 to PD) 7 : Read port E (PE2 to PE7) 8 : Test the RAM on the memory extension module (must plug the memory board on top of VX-Mega128 board at EXPANSION connector). 9 : Test the EEPROM on the memory extension module (must plug the memory board on top of VX-Mega128 board at EXPANSION connector). A : Display the Knob s value 010 on LCD16x2 module B : Display the Knob s value 011 on LCD16x2 module C : Display the Knob s value 012 on LCD16x2 module D : Display the Knob s value 01 on LCD16x2 module E : Display the Knob s value 01 on LCD16x2 module F : Display the Knob s value 015 on LCD16x2 module

22 VX-Mega128 : ATmega128 Microcontroller board documentation 8. Resource All sourcecode in C program is contained in Example code > VX128_Dm. You can see and edit by your own to make the new code. For more information of ATmega128 microcontroller, can see and download datasheet and many applicatiobn notes from www.atmel.com. Special thanks for 1. Atmel Corp. about the perfect IDE software; AVR Studio. 2. Many people who develops the nicely C compiler in name WinAVR. www.inex.co.th www.inexglobal.com