Raining Season

Learning About AVR : How to load Arduino's boot loader to AVR microcontroller

Date : Sun,14 August 2011
Writer : Ataya P

  Arduino has been widely use for rapid prototyping and hobby electronic design. It is designed to use with AVR microcontroller and my board seems to be supporting it also. Here is my lab on this stuff ...
AVR ATMEGA168P
Working Platform :
Lenovo Notebook , Intel Pentium Dual Core T2080 1.73GHz
2Gbyte RAM
Ubuntu  10.04 LTS- the Lucid Lynx

Hardware :
ATMega168P development kit from Akitsuki shop at Akihabara 
(ATmega168/328マイコンボードキット)
http://akizukidenshi.com/catalog/g/gK-04590/

You may also require AVR-USBasp as a hardware programmer
http://www.aitendo.co.jp/product/2312



Let's do it

For using Arduino on your AVR board. You need to write Arduino's bootloader into the board first and then you can communicate with the board via Arduino program.

1. Download Arduino tool and source code at ...
http://arduino.cc/en/Main/Software

2. Extract file and go to "hardware/arduino/bootloaders/atmega/" directroy

3. If you were already settup development environment for AVR then you can re-make hex file by ...

4. Anyway, it already has ATmegaBOOT_168_diecimila.hex file in that directory. So, Just download this file into the board.

5. Connect the board with AVR-USBasp and using this command to write the hex file into flash memory...
# avrdude -cusbasp -e -p ATMEGA168P -U flash:w:ATmegaBOOT_168_diecimila.hex:i -Ulfuse:w:0xff:m -Uhfuse:w:0xdd:m -Uefuse:w:0x0:m -Ulock:w:0xf:m

6. Execute Arduino program,  Select [File->Examples->Basics->Blink]

Arduino blink project


7. Select [Board -> Arduino Diecimila,Duemilanove,or Nano w/ATmega168]

8. Click on [Upload] Icon, Program will uploading to the board.

9. After downloaded, reset the board the LED must be blinking...

LED on !!

LED off



Useful Link :
AVR microcontroller ->
http://www.atmel.com/products/avr/default.asp?category_id=163&family_id=607&source=redirect
Arduino project ->
http://arduino.cc/en/
No programer ? No problem ->
http://www.geocities.co.jp/arduino_diecimila/bootloader/AE-ATmega_bitbang.html

GO GO GO AVR !!!


Share this page :

Custom Search