"This tutorial explains how to use an Arduino board as an AVR ISP (in-system programmer). This allows you to use the board to burn the bootloader onto an AVR (e.g. the ATmega328 used in the newer Arduino Duemilanove). The code in this example is based on the mega-isp firmware by Randall Bohn."

via arduino.cc

Basically you can use this method to install the Arduino bootloader onto other AVRs, as well as using avrdude to program hex files through an Arduino Duemilanove to another AVR (be sure to set the programmer to "avrisp" and baudrate to "57600"). Also, you can program the chip that's on main the Arduino itself by using the FT232RL's synchronus bit-bang mode (use programmer "arduino" and set baudrate to "57600" for avrdude).

Example of using ArduinoISP with avrdude to burn an Arduino bootloader to an ATmega328p under linux:


Code:
avrdude -p m328p -P /dev/ttyUSB0 -c avrisp -b 57600 -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m -U flash:w:/usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex -U lock:w:0x0f:m


Example of programming a ATmega328p directly on an Arduino Duemilanove with an Arduino bootloader using the FT232RL bit-bang method with avrdude under linux:


Code:
avrdude -p m328p -P /dev/ttyUSB0 -c arduino -b 57600 -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m -U flash:w:/usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex -U lock:w:0x0f:m


Note 1: Disconnect the second Arduino/AVR (if any) when trying to program the AVR on the main Arduino board itself.

Note 2: When using ATmega168 chips, set the baud rate to "19200" instead of "57600"

Note 3: Be sure to change the fuse settings, hex file and chip settings when programming to match your particular AVR chip and desired functionality; set them wrong (esp. fuse settings) and you could render your chip permanently useless! An avrdude tutorial will be posted if there's interest in one.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement