Go Down

Topic: Bootloader (Read 1 time) previous topic - next topic

VOLTDUDE

Sep 28, 2011, 06:31 am Last Edit: Sep 28, 2011, 07:14 am by Coding Badly Reason: 1
Howdy
I am new to arduino. I bought a Uno clone with a atmega328-pu onboard. I have also bought three blank mega328-pu. I would like to have some backup chips with bootloaders. I have tried several different ways to upload the bootloader, changing 0F to 14 in avrdude config file, very confused now.Can you just put a blank chip in the uno and burn the bootloader to it or do you have to use a breadboard? There for awhile I thought I cooked my original chip- would not upload sketches. Reinstalled arduino and the chip works again. Don't want to fry my only chip with bootloader. Can someone tell me the propper way to install bootloader on a new atmega328-pu.
Thanks

Moderator edit: unnecessary blank space removed

CrossRoads

Search the forum for "optiboot bootloader", there was just a thread on this very thing.
Basically wire up your blank parts on a breadboard with crystal, caps, pullup resistor on reset, then wire in some lines from the Uno, the Uno runs and burns bootloaders into the blank parts. Is smart enough to recognize the part and put appropriate bootloader in.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly

Howdy


Yup.

Quote
I have tried several different ways to upload the bootloader, changing 0F to 14 in avrdude config file, very confused now.


I assume by that you mean you changed the signature entry for the ATmega328P so that avrdude is able to work with the ATmega328s you purchased.

Quote
Can you just put a blank chip in the uno and burn the bootloader to it or do you have to use a breadboard?


If you have an ISP programmer or second Arduino compatible board then yes.  If you don't then no; you will need to add a breadboard.

Quote
Can someone tell me the propper way to install bootloader on a new atmega328-pu.


Search for "Burning the Bootloader"...
http://arduino.cc/en/Tutorial/ArduinoToBreadboard

This is a good reference as well...
http://arduino.cc/en/Tutorial/ArduinoISP

OptiLoader will dramatically simplify the process...
https://github.com/WestfW/OptiLoader
http://arduino.cc/forum/index.php/topic,64105.msg481752.html#msg481752

westfw

You need some sort of "programmer" to burn the bootloader into a blank ATmega chip.
You can use an Arduino as that programmer (running AVRISP or optiLoader), but then the target chip has to be in a breadboard with appropriate extra components (crystal, etc.)  If you have two arduino boards, you can use one as the programmer and one to hold the target chip.  If you have a separate programmer device (like a USPTiny or an AVRASP), you can put the blank chips in your Arduino board to provide the support components.

Suyog

Will this programmer be able to upload bootloader to 168 with help of pony prong? I dont have any avr programmer or arduino board I have made my own serial single side board version 3http://www.sparkfun.com/products/14
 http://www.olimex.com/dev/images/avr-pg1b-sch.gif
http://microembeded.blogspot.com/2011/04/avr-serial-port-programmer.html

Coding Badly


That one requires an RS-232 port.  If your computer has a USB port there are better choices.

Suyog

No I don't have serial port. But I have usb to rs232 converter.

CrossRoads

"usb to rs232 converter"
Now just need RS232 to TTL converter, can be a chip like MAX232/equivalent, or some discrete compontents like Serial Arduino used:
http://webzone.k3.mah.se/k3dacu/arduino/releases/serial_v2/arduino_rs232_v2.png
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

putyn


Will this programmer be able to upload bootloader to 168 with help of pony prong? I dont have any avr programmer or arduino board I have made my own serial single side board version 3 http://www.sparkfun.com/products/14


Quote from: olimex.com

connects to PC via RS232 port (note it will not work with USB-RS232 converters!)

so it will not work with an usb-rs232

Go Up