Go Down

Topic: (RESOLVED) Atmega328 (UNO) new ship how to do a bootloader download (Read 3546 times) previous topic - next topic

May 23, 2011, 06:20 am Last Edit: May 27, 2011, 04:06 am by i_rock_pc Reason: 1
Hello, I am new to this and need help :~

I have a new ATmega328 chip that has no bootloader on it, I read a few item on this forum. I have a Olimex Stk500v2 and a UNO board.

I tried using the Arduino022 software to download the bootloader and no luck. I did add the following to the programmers.txt but get errors

(my Olimex is on com2)

mexisp.name=AVR ISP 500 Olimex
olimexisp.communication=serial
olimexisp.protocol=stk500v2

I did avrdud and no luck there either, I read the flash from my old UNO, and tried to download to the new atmega328 (the download part went well) but still no luck.

I cannot download any program to my atmega328, I always get the time out error

What is the proper way  :to download the boot loader to a UNO board?

I would greathly appreciate it

Thanks

johnwasser

Disconnect everything from your Arduino Uno (no USB, no Power, no inputs or outputs)

Plug the 6-pin cable of your Olimex AVR-ISP500 into the ICSP header of your Arduino Uno.  Make sure Pin 1 of the cable (often marked with a red stripe on the cable or mark on the connector) matches Pin 1 of the ICSP header.

Select the serial port of your Olimex AVR-ISP500 from Tools->Serial Port

Select Tools->Boards->Arduino Uno

Select Tool->Burn Bootloader->w/ AVRISP mkII

That should write a fresh bootloader to the Arduino Uno.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

First of all Thanks John for your reply

I did try all you said with aew chip and a working UNO. I thought the problem was that the UNO was powered before. but that did not change anything. If I try the AVRISP mkII, I get "avrdude: usbdev_open(): did not find any USB device "usb" from the Arduino 0022 message box. I know that the Olimex and UNO works fine because I can sent an other file I had in hex using avrdude.
If I try using the AVR ISP 500 Olimex that I installed using the following in programmers.txt

mexisp.name=AVR ISP 500 Olimex
olimexisp.communication=serial
olimexisp.protocol=stk500v2
I get a long list of error

avrdude: Can't find programmer id "null"

Valid programmers are:........................

Any other Idea?

Thanks


leo72

Follow my little guide:
http://arduino.cc/forum/index.php/topic,55631.msg422808.html#msg422808

johnwasser

When you put those lines in programmers.txt did the first entry start with 'mexisp' or 'olimexisp'.  It makes a difference.

Code: [Select]

## Put these lines in (Arduino sketch folder)/hardware/programmers.txt
olimexisp.name=Olimex AVR-ISP500
olimexisp.communication=serial
olimexisp.protocol=stk500v2


Code: [Select]

## Put these lines in (Arduino sketch folder)/hardware/boards.txt
olimex328.name=ATmega328 on Olimex AVR-ISP500
olimex328.upload.using=olimexisp
olimex328.bootloader.low_fuses=0xFF
olimex328.bootloader.high_fuses=0xDA
olimex328.bootloader.extended_fuses=0x05
olimex328.bootloader.path=atmega
olimex328.bootloader.file=ATmegaBOOT_168_atmega328.hex
olimex328.bootloader.unlock_bits=0x3F
olimex328.bootloader.lock_bits=0x3F
olimex328.build.mcu=atmega328
olimex328.build.f_cpu=16000000L
olimex328.build.core=arduino


You have to shut down Arduino0022 before changing those files.  When you re-start Arduino you should see the new board listed under Tools->Board
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

]:DHi Again

Many THANKS

used Arduino as ISP  as a board and bootloader using Olimex AVR-ISP500  .

At first it didnot work, I just had the Olimex pluged on the UNO. I tested for 5V but none. So I connected an other USB to the UNO board with the new chip and downloaded the boot loader successfully.

I read that the bootloader from Arduino 022 is buggy?? where can I get the latest one? and how to set it up.

Again Thank you John, your my saver

]:DHi Again

Many THANKS

used Arduino as ISP  as a board and bootloader using Olimex AVR-ISP500  .

At first it didnot work, I just had the Olimex pluged on the UNO. I tested for 5V but none. So I connected an other USB to the UNO board with the new chip and downloaded the boot loader successfully.

I read that the bootloader from Arduino 022 is buggy?? where can I get the latest one? and how to set it up.

Again Thank you John, your my saver

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy