HI! I am trying to migrate my project from my Micro to a breadboard 328P, but having trouble burning the bootloader. With guidance from several tutorials, I have connected the MOSI, SCK, and MISO pins to the ICSP header; TX and RX to the required digital pins, and RESET to pin 10 on the Micro-- in addition to the LEDs described in the ArduinoISP sketch.
I uploaded the sketch to the Micro and then selected "Tools=>Board=>Arduino Duemilinove w/ ATmega328" and "Tools=>Programmer=>Arduino as ISP".
With this setup, I try to burn the bootloader to the breadoard AVR but get the following error:
Error while burning bootloader.
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
What steps do I need to take in order to fix this?
well, do you mind citing links for the tutorials that you are looking at.
The method that you are trying(as what I understand at least) does not require TX and RX.
You are going to upload a boot loader not already having one.
So you need to do right connections. These are the pins.
Check pins on the controller unit(depends on program which pin is used as Select) but on the target these are the ones : MISO, MOSI, SCK, VCC, GND, RESET
saurabhshandilya:
well, do you mind citing links for the tutorials that you are looking at.
The method that you are trying(as what I understand at least) does not require TX and RX.
You are going to upload a boot loader not already having one.
So you need to do right connections. These are the pins.
Check pins on the controller unit(depends on program which pin is used as Select) but on the target these are the ones : MISO, MOSI, SCK, VCC, GND, RESET
but I have to feel my way around both as I couldn't find one that was for the Micro, let alone one that was well-documented.
Using all of the connections on the ICSP header now (and none of the others), I still get the same error.
Also, I may have connected the pins incorrectly several times... hopefully that didn't damage anything, although the header seems to supply very little current.
It looks like it is what I need... but when I tried it, the compile was too big:
Binary sketch size: 30,096 bytes (of a 28,672 byte maximum)
processing.app.debug.RunnerException: Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
at processing.app.Sketch.size(Sketch.java:1658)
at processing.app.Sketch.build(Sketch.java:1591)
at processing.app.Sketch.exportApplet(Sketch.java:1613)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:744)
The minimal breadboard page does use the chip programmer sketch after the detector is run. By the time it gets to loading, they cross the same bridge. I just checked. What I have and used is both detector and programmer in a very cookbook way so my bad only remembering the one name.
And what Nick's sketch covers that the IDE loader doesn't, I think is:
This sketch was inspired by the Optiloader sketch written for the Arduino. However it is a total
rewrite, in order to accomodate the Mega2560 board, which the original one did not handle, due to the larger address space.
By changing "true" to "false" that bootloader is not included. You can achieve substantial program size reductions by omitting some of them (eg. the Mega2560).
(The commit also gets rid of some trailing spaces, which is why it looks a bit more complex than it really is).