![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
AVR-ISP500-TINY user manual all boards produced by olimex are rohs compliant rev.c, may 2009 copyright(c) 2008, olimex ltd, all rights reserved
introduction: AVR-ISP500-TINY is usb in-system programmer for avr microcontrollers, featuring two distinctive methods for communication with pc programming software. it can implement the stk500v2 protocol as defined by atmel which makes it compatible with a range of tools, including avrstudio and avrdude . it is distinguished from other programmers by its support for autonomous operation. AVR-ISP500-TINY contains a 2mb flash memory where it can store entire programming sessions, including fuse, lock, eeprom and flash write and verification, as well as signature checking. just hold the button, perform all the necessary steps with avrstudio, and disconnect the programmer from the pc. next time button is pressed the programmer will invoke all previously recorded steps without the need for connection to the pc. the other supported mode is a usb mass storage flash drive where user can drag and drop hex files for downloading to target avr chip. we believe these features make AVR-ISP500-TINY the perfect low-cost tool for firmware upgrades in remote places. features: - fully stk500v2 compatible; - works with avrstudio, winavr, avrdude and every other software compatible with stk500v2; - two distinctive modes of operation; - modes of operation (stk500v2 and mass storage drive) are switched easily by uploading firmware images available from our website; - usb port for connection to pc; - stand alone operation without the need for pc connection, allowing firmware mass programming on many devices with single button press; - one bi-color led for current operation status; - supports both standard icsp10 and icsp6 connectors; - button for initiating autonomous operations and command logging; - powered by usb; - external clock output on icsp10 pin 3 for rescuing avrs with enabled external clock fuse; - supports target voltages ranging from 1.8v to 5.5v. - isp clock frequencies ranging from 5khz to 2mhz. electrostatic warning: the AVR-ISP500-TINY board is shipped in protective anti-static packaging. the board must not be subject to high electrostatic potentials. general practice for working with static sensitive devices should be applied when working with this board. requirements: cables: 1.8 meter usb a-b cable. ten- or six-wire ribbon cable for connection to target avr chip. usb power supply cable for autonomous operation. software: software needed for stk500v2 mode: - avrstudio, available from atmel. - avrdude, included in the winavr distribution. - any other software with support for the stk500v2 protocol. software needed for mass storage mode: - avr binary chip description files, available from our website. - plain text editor for editing the configuration file. - operating system with support for mass storage usb class (any recent one should do fine). supported microcontrollers: the following avr microcontrollers are supported for programming: - classic 8-bit avrs (see the notes for mass storage mode) . - megaavr - tinyavr - usb avr the following avr microcontrollers are not supported : - xmega - avr32 the following programming methods are not supported : - jtag - debugwire - parallel high voltage programming - serial high voltage programming - pdi connector schematics: power supply: normally the programmer is supplied from usb. for autonomous operation user must power the programmer by providing 5v dc stabilized power supply to the usb connector, as shown on the figure below. icsp10 pin abbrev. description 1 mosi serial output 2 v_tar target vcc 3 clko clock output 4 gnd ground 5 trst target reset 6 gnd ground 7 sck serial clock 8 gnd ground 9 miso serial input 10 gnd ground icsp6 pin abbrev. description 1 miso serial input 2 v_tar target vcc 3 sck serial clock 4 mosi serial output 5 trst target reset 6 gnd ground power supply cable connection pin connect to...1+5v stabilized power supply.2nc3nc4gnd pc driver installation: drivers for the mass storage mode are integrated in windows xp/vista. the driver for stk500v2 mode is available from our website. windows installation steps are the following: 1. download and unzip the file avr-stk500-tiny-drivers.zip in a temporary directory. 2. plug the programmer in the usb port. 3. point the device wizard to the temporary directory. 4. windows will complain that drivers are not signed. click continue. 5. click finish. screen shots of the steps are shown below: warning: the com port number assigned by windows to avr-isp500- tiny must be com4 or below. otherwise avrstudio might not be able to detect the programmer. here are the steps to change it: 1. go to device manager. 2. unfold ports (com&lpt) and right-click on olimex virtual com - AVR-ISP500-TINY (comxx) where comxx can be anything between com1 and com255. select properties. 3. go to the port settings tab and click the advanced button. 4. change the com port number to com3 or com4. 5. click ok. 6. if a warning message pops up and complains about com port being used by another device, click yes. 7. click ok to close the device properties. using AVR-ISP500-TINY with avrstudio (stk500v2 mode): warning: the com port number assigned by windows to avr-isp500- tiny must be com4 or below. otherwise avrstudio might not be able to detect the programmer. see the section for pc drivers installation for more information. usage under avrstudio is straightforward. first open the programmer connect dialog: then select stk500 or avrisp option with automatic port detection: after pressing connect the programming dialog should appear: target avr now can be erased, flashed with a provided hex file, fuses and lock bits can be written and/or verified. for more information please consult the avrstudio documentation. caveat: although the programmer will happily accept setting vtarget and aref in the hw settings tab, these actions will have no effect. the programmer hardware can only read target vcc and show it simultaneously in the vtarget and aref sliders. using AVR-ISP500-TINY with avrdude: avrdude requires the serial port name, assigned by the operating system to AVR-ISP500-TINY. it must be given with the -p command line option. for windows systems please check the device manager. for linux systems the following command will list all usb cdc serial ports: ls /dev/ttyacm* for macos x systems the following command will list all serial ports: ls /dev/cu.* an example command line for programming an atmega88 under macos x: avrdude -p m88 -b 50 -c stk500v2 -p /dev/cu.usbmodem000010471 -e -u flash:w:blinkled.hex autonomous operation (stk500v2 mode): when the button is held pressed for 5 seconds programmer enters command logging state. in this state it will execute and log all commands received from the pc software in its internal flash memory. when the button is pressed again, programmer will enter its normal state where commands will be executed but not logged. logged commands can be executed again without the presence of a connected pc by simply pressing quickly the programmer button while in normal state. the bi-color led will glow yellow while operation is in progress. after operation finishes successfully the green led will blink for a while, otherwise on error the red led will blink for a while. after that the programmer will enter normal state where only the green led is on constantly. if programmer button is pressed and held for more than 1 second but less then 5 seconds, it will show the current log status. a blinking green indicates a valid log, and blinking red indicates invalid/erased log. the formal definition of the programmer states is given below. button released 5 seconds passed or button pressed button pressed button held for 1 second idle led0=off led1=on enable_logging led0=blink_slow led1=blink_slow if(rs232_packet_received) erase_log(); show_result if(error) led0=on; led1=off else if(empty) led0=blink_fast; led1=off else led0=off; led1=blink_fast button pressed show_log_status if(log_empty) led0=blink_fast led1=off else led0=off led1=blink_fast button held for 5 seconds standalone_isp led0=on led1=on finished note: led0 is red , and led1 is green . if both are on, the result is yellow glow. avr-isp500 states in case of autonomous operation error, the red led will blink for a while. the number of flashes indicates the error that caused the failure. error codes are given in the table below. number of red flashesaction that failed 1enter programming mode. 1signature read mismatch. 2flash read mismatch. 2eeprom read mismatch. 2fuse read mismatch 2lock read mismatch 3corrupted log 3empty log 4other command/ans wer error. example: caveat: rc calibration in autonomous mode is not supported. the reason is that the programmer has no way to distinguish rc value writes to flash from normal data ones. tip: sometimes avrstudio will issue fuse/lock reads when the corresponding tabs are selected. this, however, will be recorded by the programmer if it is in command logging state. so for best results it is recommended to issue all commands in a predefined order. this is achieved led1 led0 idle error code: 2 flashes C mem read mismatch isp end of error code. led0 lights constantly. idle t t by the auto feature of avrstudio programming dialog. after setting the flash and eeprom files, fuse and lock settings, and selecting the target avr device, switch to the auto tab of the programming dialog. select the operations that should be performed and hold the programmer button for 5 seconds to activate command logging. then hit the start button to initiate a programming operation. after auto operation finishes successfully, turn off command logging. tip: if target signature must be verified during autonomous operation, read signature command must be issued while in command logging state. mass storage mode: in this mode the programmer behaves like a usb mass-storage drive, containing fat12 file system. the drive root directory must contain an ihex file that will be programmed into the target, along with some other special files. all files are recognized by their extension only ! if two or more files with the same extension exist in the root directory then the firmware will pick up the first found one (the first in the fat12 root directory table). list of needed files for programming the target avr chip: - *.ini C mandatory C programming parameters. this is a plain text file that contains target programming parameters. the firmware will scan the first 128 characters in search for option values. it should look like: ispfreq=0x02 ;mandatory fuses=0x112233 ;optional lock=0xff ;optional the isp frequency option is a hex value, determining the used isp sck frequency. firmware will determine the actual isp frequency from the given value this way: 0x00 2mhz 0x01 500khz 0x02 125khz x (150/x), khz for x>=3 the fuses option is a 24bit (three byte) hex value that determines the extended fuse value to be programmed (the msb byte), the high fuse, and the low fuse (the lsb byte). the lock byte option determines the 8bit value that will be programmed to the target lock byte. note : there must be no spaces between option names, the equal sign and the hex value. the firmware parser does not strip white spaces, nor does it understand comments! note : fuses value must be exactly three bytes (six hex digits), no more and no less. if target device does not have extended or high fuses the programmer will just ignore these values. - *.apd C mandatory C avr target part description this file selects the target chip and contains a description of how to program it. olimex provides these files for the supported devices. - *.hex C mandatory C flash intel hex image this is the flash image that will be programmed. - *.eep C optional C eeprom intel hex image this is the eeprom image that will be programmed. when idle, the device will have all leds turned off. when the button is pressed the device will disconnect its usb port and will try to program the target. during programming the led will be yellow (red+green), either static or blinking. when programming finishes the led will become red if programming failed or green if programming and verification succeeded. user then must acknowledge the operation by pressing the button, which in turn will cause the device to reattach its usb port. limitations of the mass storage mode: the current firmware for mass storage mode has the following limitations: - fuse and lock bytes read, write and verification does not work on most of the classic avrs (at90s2313, at90s4433, at90s8515) due to inability of the chips to read back lock and fuse bytes and/ or due to their non-compatible isp commands for doing that. flash writing works, though. - the ihex parser that is integrated into the firmware is very basic. sometimes it will choke on perfectly valid ihex images. in such cases try to strip the ihex from extraordinary ihex records. - file system must be formatted with fat12. fat16 and fat32 will not work. in most cases it will not be a problem as windows automatically chooses fat12 for partitions less than 32mbytes. - the ini file parser is rather simple. it does not understand comments and white spaces. it uses a simple substring search to locate parameter values. it is not case sensitive, though. - the ini parser scans only the first 128 characters, discarding the rest of the file. - the usb device is disconnected from usb host while doing an autonomous isp operation. switching operating modes: switching between stk500v2 and mass storage modes of operation is achieved by uploading the corresponding firmware image, using the same process as device firmware upgrade. see the section firmware upgrade for more information. clock output: pin 3 of the icsp10 connector is normally left unconnected by other isp programmers. not ours. in normal programmer state this pin is tri-stated. during programming operation, however, this pin is made output and a square-wave clock is generated. clock frequency is fixed to 62.5khz. after programming operation finishes, this pin is again tri-stated in order not to interfere with the target circuit. this clock output can be really helpful when target avr is accidentally programmed with external clock fuse option. to resurrect it just wire icsp10 pin 3 to xtal1 pin of the target avr chip and initiate a programming session to fix the fuse values. caveat: if an error occurs in standalone mode, the leave programming mode command will not be executed, so the external clock output will stay active. due to the avr-isp500 hardware implementation, this can cause target vcc to be incorrectly read as vtarget=5v. tip: if clock output is needed when target is not being programmed then the following steps must be followed. make sure that programmer contains a valid log, no matter its contents. disconnect the programmer, then press the button, and wait for red led to blink for error. after that the clock output will stay activated. firmware upgrade: all avr-isp500 devices contain a built-in boot loader for easy firmware upgrade. device enters boot loader mode if the application flash section is corrupted. to force the device to enter boot loader mode for manual firmware update do the following: 1. disconnect the programmer from any power source (external ac/dc, usb). 2. press and hold the button. 3. power up the device by connecting it to usb. 4. device now must be in boot loader mode, indicated by the led light sequence: a. red on, green off. b. red off, green on. c. red off, green off. button can now be released. the device will stay in boot loader mode until it is power cycled. all boot loaders implement the standard protocol xmodem with crc16 for firmware update. user is free to use his favorite terminal client (hyperterminal, minicom, etc) to upload the firmware images taken from our website. the serial port settings for the avr-isp500-iso boot loader are: 9600 baud/sec, 8 data bits, no parity, 1 stop bit. the avr-isp500- tiny/mass/nano boot loaders implement a usb virtual serial port that is baudrate agnostic. as an alternative we provide a simple windows gui application for users who dont want to or cannot use terminal software. after the firmware image is uploaded the target will blink the green led if update was successful, otherwise it will blink the red led if firmware image was invalid or update was unsuccessful. device stays in this state until it is power cycled. troubleshooting guide: problem: avr studio cannot find my programmer. probable causes and solutions : ? look whether the programmer is listed in device manager under the ports (com & lpt) section. if it's not there then check your usb cables and hubs. reinstall the driver. ? check that the green led is constantly on. if not then the programmer might be in firmware upgrade mode. go to the firmware upgrade section for more details. ? your serial port number might be too high. check the manual section installing drivers for more information on assigning serial port numbers. also go to avr studio menu tools->options and set the number of com ports to try field to at least 20. ? remove all applications that might be using or scanning your computer's serial ports, including any serial port monitors. they might mess up the stk500v2 communication between avr studio and the programmer. problem: programming fails. target avr chip cannot enter programming mode. probable causes and solutions : ? isp frequency might be too high. set the isp frequency to well below ? of target mcu clock. please note that the avr mcu clock depends on its fuses configuration. ? target power might not be stable enough or supply voltage might be too low. check your target board circuit. ensure that the used avr chip specifications match your supply voltage. ? target power supply vcc might not be connected to pin 2 of icsp6/10. check your target board circuit. ? the target avr mcu might have fuses programmed for disabling spi isp or selecting another programming method. in such case you'll need a high voltage parallel programmer to unlock the chip. ? the reset line cannot be pulled low by the programmer. check your schematic and ensure that only a weak pull-up (and possibly a small capacitor) are connected to reset. otherwise, if the pull-up is too small or there is another output driving reset, the programmer won't be able to pull it down. ? another circuit is driving the isp lines (miso, mosi, sck or reset) resulting in a contention with the programmer. the solution is to remove all such circuits (leds, rs232 drivers, resistors below 2k, etc) from the four isp lines during programming. avr-isp500 is more susceptible to this kind of fault than other programmers on the market because it has 560 ohm resistors in series with all its outputs. this protects both the target mcu and the target board circuit. electrical characteristics: symb ol description condition min typ max uni ts v targ target supply voltage. 1.8 5.5 v f isp isp frequency on sck spi pin. 5 2000 khz v cc programmer power supply voltage. 4.6 5.4 v i cc programmer power supply current. idle 25 ma autonomous operation, v targ =1.8v, f isp =2mhz 35 ma programming with avrstudio, logging enabled, v targ =1.8v, f isp =2mhz 35 ma time for a full programming and verification of atmega128 (128k flash + 4k eeprom + fuses + lock + signature check) autonomous operation, v targ =5v, f isp =2mhz 50 s programming with avrstudio, logging enabled, v targ =5v, f isp =2mhz 68 s programming with avrstudio, logging disabled, v targ =5v, f isp =2mhz 58 s symb ol description condition min typ max uni ts time for a flash programming and verification of atmega128 (128k flash) autonomous operation, v targ =5v, f isp =2mhz 15 s programming with avrstudio, logging enabled, v targ =5v, f isp =2mhz 32 s programming with avrstudio, logging disabled, v targ =5v, f isp =2mhz 22 s order code: AVR-ISP500-TINY C assembled and tested (no kit, no soldering required) how to order? you can order to us directly or by any of our distributors. check our web www.olimex.com/dev for more info. revision history: rev.a - create april 2008 rev.b - modify january 2009 added a troubleshooting guide rev.c - modify may 2009 added instructions for avrdude disclaimer : ? 2008 olimex ltd. all rights reserved. olimex?, logo and combinations thereof, are registered trademarks of olimex ltd. other terms and product names may be trademarks of others. the information in this document is provided in connection with olimex products. no license, express or implied or otherwise, to any intellectual property right is granted by this document or in connection with the sale of olimex products. neither the whole nor any part of the information contained in or the product described in this document may be adapted or reproduced in any material from except with the prior written permission of the copyright holder. the product described in this document is subject to continuous development and improvements. all particulars of the product and its use contained in this document are given by olimex in good faith. however all warranties implied or expressed including but not limited to implied warranties of merchantability or fitness for purpose are excluded. this document is intended only to assist the reader in the use of the product. olimex ltd. shall not be liable for any loss or damage arising from the use of any information in this document or any error or omission in such information or any incorrect use of the product. |
Price & Availability of AVR-ISP500-TINY
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |