|
|
|
|
|
|
|
| |
Showing posts with label bootloader. Show all posts
Showing posts with label bootloader. Show all posts
Wednesday, March 18, 2015
Arduino ISP shield
Hi there! I finally managed to get the ISP shield on tracks, here you
have some pictures, I just need some fresh ATmega328 to use it! :)
Friday, August 2, 2013
Burning bootloader - Part 2
Well, I had some problems recording the UNO bootloader on the first experiences, and got stuck with 2 chips "bricked", now that I have some spare time, got back to them and found a shield/guide of how auto-recording the chips, and how to recover them, the code is here and the way to connect the pins of the chip which you want to burn, are here:
The configuration is an arduino board and a breadboard with the chip which needs to be recorded/the "bricked" one. After connecting the pins to the second board (as described) you should upload the code to the arduino, select:"Tools-> Programmer->Arduino as ISP"
and "Tools->Board->Arduino Uno" proceed as in the picture:
It worked for me and I "unbricked" the chips, you can see the entire article here.
The standalone project is here, hope someday to have time and € to do one, for myself!
Update on the 12 February 2015: Gave up on standalone project, because it does not use the optiboot code and does not work very well, or not at all. I will build a shield to burn the UNO's using things explained within this article. Also updated the code link to a 2011 routine, instead of the 2009.
Update on the 13 February 2015: Gave up of the updated 2011 routine, didn't work for the ATmega328P-PN, back to the fine 2009.
This procedure will work on ATmega328P-PU and ATmega328P-PN, for the ATmega328-PU you will have to use the following workaround:
Workaround for ATmega328-PU:
In
your Arduino folder, find the subfolder: ..\hardware\tools\avr\etc
Make
a backup copy of the file: avrdude.conf
- Open the file avrdude.conf in a text editor
- Search for: 0x1e 0x95 0x0F (this is the ATmega328P signature)
- Replace it with: 0x1e 0x95 0x14 (this is the ATmega328 signature)
- Save the file
- Proceed as described previously
- Restore the avrdude.conf to it's original settings
The standalone project is here, hope someday to have time and € to do one, for myself!
Update on the 12 February 2015: Gave up on standalone project, because it does not use the optiboot code and does not work very well, or not at all. I will build a shield to burn the UNO's using things explained within this article. Also updated the code link to a 2011 routine, instead of the 2009.
Update on the 13 February 2015: Gave up of the updated 2011 routine, didn't work for the ATmega328P-PN, back to the fine 2009.
Thursday, May 9, 2013
Burning an arduino bootloader (optiboot)
I got a few samples from Maxim (thank you Maxim) but they came "clean" without the optiboot or anything like that, so I had to burn it down. I used the minimal circuit which can be found on the picture on the right, and here is the procedure:
To burn the bootloader, follow these steps:
- Download this hardware configuration archive: Breadboard.zip
- Download the latest Optiboot library.
- Create a "hardware" sub-folder in your Arduino sketchbook folder (whose location you can find in the Arduino preferences dialog). If you've previously installed support for additional hardware configuration, you may already have a "hardware" folder in your sketchbook.
- Move the "breadboard" folder from the zip archive to the "hardware" sub-folder of your Arduino sketchbook. If you don't have a "breadboard" folder there, create one, an put the file in it.
- Restart the Arduino software.
- You should see "ATmega328 on a breadboard (8 MHz internal clock)" in the Tools > Board menu.
- Upload the ArduinoISP sketch onto your Arduino board. (You'll need to select the board and serial port from the Tools menu that correspond to your board.)You'll find this under "examples".
- Wire up the Arduino board and micro-controller as shown in the diagram to the right.
- Select "ATmega328 on a breadboard (8 MHz internal clock)" from the Tools > Board menu.
- Under the optiboot directory, execute the command avrdude -P /dev/ttyACM0 -b 19200 -c avrisp -p m328p -u -U flash:w:"optiboot_atmega328.hex" :i -F
- After finished, use: avrdude -p atmega328P -c avrisp -P /dev/ttyACM0 -b 19200 -u -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m -F otherwise the boot will be recorded/burned, but the chip will not accept uploads.
For
ATmega328-PU:
If
you try to bootload an ATmega328-PU, you’ll get a message something
along the lines of:
avrdude:
Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
You
could also get a more colourful version:
avrdude:
Yikes! Invalid device signature.
The way to work around this is to “trick” the IDE into believing your 328-PU is in fact a 328P-PU. Disclaimer: I have tested this myself and it works – no guarantees however that you won’t have unforeseen consequences.
Workaround:
In
your Arduino folder, find the subfolder: ..\hardware\tools\avr\etc
Make
a backup copy of the file: avrdude.conf
- Open the file avrdude.conf in a text editor
- Search for: 0x1e 0x95 0x0F (this is the ATmega328P signature)
- Replace it with: 0x1e 0x95 0x14 (this is the ATmega328 signature)
- Save the file
- Proceed as described previously (and use lock:w:0x0F:m)
- Restore the avrdude.conf to it's original settings
Good
Luck!! Good burnings!
Subscribe to:
Posts (Atom)






