- free available software: PonyProg or AVRDUDE, UISP
and CodeVisionAVR, BASCOM-AVR, Yaap
see AVR-HOWTO for programming target device
avrdude ATmega2560, ATmega2561
Configuration and programming instructions for ATmega128 Development Board “TinyBoard” via PonyProg:
STEP 1:
For ATmega128 TinyBoard V1.1 connect “HEADER A” to ISP programmer as shown:
For ATmega128 TinyBoard V1.2 connect ISP header from board with ISP programmer:
STEP 2: Download PonyProg from PonyProg-download and install PonyProg.
STEP 3: Connect programmer to parallel port of your PC.
STEP 4: Configure ISP programmer (dongle) by “Setup->Interface Setup”, use the following settings.
STEP 5: Verify presence of ISP programmer by using “Probe”.
STEP 6: Do “Setup -> Calibration”
STEP 7: Select “Device->AVR Micro->ATmega128”
STEP 8: Load your program file *.hex. using “File-> Open Device File”.
SETP 9: Now you can program your device by using “Command -> Write all”.
You can change pre-configured settings (fuse bits) by “Command -> Security and Configuration Bits”.
Avrdude is an open-source program for
download / upload code to AVR microcontroller flash and eeprom.
Download code from
avrdude-download.
The example is chown as Windows version with Windows parallel
port declaration "-P lpt1".
For Linux use "-P /dev/parport0"
instead.
Note: You now have to use "flashfile.bin" instead of "flashfile.hex" unlike in prior versions (4.x).
avrdude: Version 5.1
>avrdude -p atmega128 -c stk200 -P lpt1 -U flash:w:demo.bin:r
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9702
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "demo.bin"
avrdude: writing flash (12058 bytes):
Writing | ################################################## | 100% 8.07s
avrdude: 12058 bytes of flash written
avrdude: verifying flash memory against demo.bin:
avrdude: load data flash data from input file demo.bin:
avrdude: input file demo.bin contains 12058 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 7.81s
avrdude: verifying ...
avrdude: 12058 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Because AVR ATmega2560 and ATmega2561 devices are not supported by avrdude by now (Version WinAVR-20060125) use ATmega1280 mode instead:
C:\WinAVR\examples\ATmega256xdemo>avrdude -p
atmega1280 -c stk200 -P lpt1 -U
flash:w:demo.bin:r
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be
performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "demo.bin"
avrdude: writing flash (486 bytes):
Writing | ################################################## | 100% 0.17s
avrdude: 486 bytes of flash written
avrdude: verifying flash memory against demo.bin:
avrdude: load data flash data from input file demo.bin:
avrdude: input file demo.bin contains 486 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.16s
avrdude: verifying ...
avrdude: 486 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
>avrdude -p atmega128 -c stk200 -P lpt1 -e -i mmega128.hex
or just
>avrdude -p m128 -c stk200 -e -i mmega128.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9702
avrdude: erasing chip
avrdude: done.
avrdude: reading input file "f:\mmega128.hex"
avrdude: input file f:\mmega128.hex auto detected as Intel Hex
avrdude: writing flash (130100 bytes):
130099
avrdude: 130100 bytes of flash written
avrdude: verifying flash memory against f:\mmega128.hex:
avrdude: reading on-chip flash data:
130099
avrdude: verifying ...
avrdude: 130100 bytes of flash verified
avrdude done. Thank you.
UISP is a tool for AVR (and AT89S) microcontrollers which
can interface to many hardware in-system programmers.
Download code from uisp-download.
>uisp -dprog=stk200 --upload if=mmega128.hex --verify
AVR
ATmega128 datasheet (pdf)
AVR
ATmega2561 datasheet (pdf)
AVR
ATmega1280 datasheet (pdf)
AVR
ATmega2560 datasheet (pdf)