AVR USB Programmer ManualV2
AVR USB Programmer ManualV2
Introduction
NEX AVR USB ISP STK500V2 is a high speed USB powered STK500V2 compatible
In-System USB programmer for AVR family of microcontrollers. It can be used with
AVR Studio on Win XP platforms. For Windows7 it can be used in HID mode with
Avrdude command prompt as programming interface. Its adjustable clock speed allows
programming of microcontrollers with lower clock speeds. The programmer is powered
directly from a USB port which eliminates need for an external power supply. The
programmer can also power the target board from a USB port with limited supply current
of up to 100mA.
Note: The USB port of PC provides 5V DC. For 3.3V microcontrollers, please use
appropriate voltage regulators.
Compatibility Chart
Note: If mode is HID, insert HID/CDC jumper (J2) and if mode is CDC, remove
HID/CDC jumper (J2).
Features
Jumper Description
J1: If inserted, provides 5V at VTG (pin no.2) of ISP connector. If removed 0V at VTG
(pin no.2) of ISP connector. In default mode, this jumper is not inserted.
J2: If inserted, enables UBS HID mode. If removed enables USB CDC mode. In default
mode, this jumper is not inserted.
J3: If inserted, enables slow clock speed (for 32 KHz to 1MHz speed microcontrollers). If
removed enables normal clock speed. In default mode, this jumper is not inserted.
Driver Installation
Case 1: Installing drivers for STK500 CDC Mode
Download software package from Nex Robotics website and unzip the contents on your
local drive. This zip file contains documentation, driver files and Avrdude software.
2. After identifying the hardware, the windows driver installation wizard should start.
Select “No, not this time” and click next to continue.
3. Select “Install from a list of specific location” and click next to continue.
6. After successful installation of drivers following window will appear. Click finish to
complete the installation.
7. To identify the COM port assigned to NEX AVR USB programmer, go to System
properties window. In the Hardware tab click Device Manager.
8. In the Device Manager, expand Ports tree and observe that NEX AVR USB
Programmer is installed at COM55. The COM port should be less than 4 for it to be
recognized by AVR Studio. To change COM port, double click on NEX AVR USB
Programmer.
10. In the Advanced Settings window select the appropriate COM port (less than or equal
to 4) and click OK. Ensure that the selected COM port is not in use by any other
application.
12. Right click anywhere in the device manager and click on “Scan for hardware
changes”.
13. After scanning is complete, observe that new COM port is assigned to the
programmer.
14. Open AVR Studio from Start Menu. Click Con button on the tool bar to open
Connect Dialog.
15. In the connect dialog, select platform as STK500, select appropriate port and click
connect. If Connect Dialog reappears, then recheck that the COM port is available and try
again.
17. After clicking cancel, AVR Studio will open STK500 interface. In the main tab,
select the appropriate microcontroller and read its signature. Observe that the signature
matches the selected device.
18. In the Program tab, select the appropriate hex file and click program to load the hex
file in the microcontroller.
19. The programming status can be observed in the bottom area of the window.
20. The Fuses tab can be used to set the fuse bits of the microcontroller. For appropriate
fuse bit values, refer microcontroller datasheet.
21. The Lock Bits tab can be used to set the lock bits of the microcontroller. For
appropriate lock bit values, refer microcontroller datasheet.
Case 2: Installing drivers for HID mode (Works on all windows operating systems)
2. HID mode does not require additional drivers. It uses generic windows drivers.
3. Go to Device Manager and observe that new Human Interface Device (HID) is
installed. If there are other HID devices connected to PC, you may optionally identify
each device by viewing its properties.
4. Before proceeding ensure that you have AVRDude.exe and AVRDude.conf on your
PC. These files are available in the zip file that was downloaded earlier from Nex
Robotics website.
6. On the command prompt, type the path of the folder that contains avrdude.exe and
avrdude.conf files. For e.g. refer fig. below.
7. On the command line type the command as shown in the fig. below. Here -p m640
refers to the microcontroller part number. The last section after –U in quotes specifies the
location of hex file. In the command line edit the part number and hex file location as
required and connect the programmer to the target board using 10 pin FRC cable
provided with the programmer and turn ON the target board.
8. Press enter. You should see the programming status in the command prompt window.
If there is any error, recheck ISP connection and command line parameters.
Example Commands:
avrdude -v
Eg 5. Read the contents of the FLASH memory and store them in a file
called test1.hex
Eg 6. Read the contents of the EEPROM memory and store them in a file
called test1.eep
Eg 7. Read the contents of HFUSE and LFUSE and store them in files
hfuse.hex and lfuse.hex
Eg 8. Read the contents of HFUSE and LFUSE and EFUSE and store them in
files hfuse.txt and lfuse.txt and efuse.txt
Note: - The signature bytes are fixed for a specific AVR device
Eg 10. Read device lock bytes and store them in a file called lock.hex