I am trying to burn a bootloader onto a new atmega328-pu that i bought, using the minimal arduino as isp method using my new UNO R3. http://arduino.cc/en/Tutorial/ArduinoISP
I however cannot get the bootloader uploaded. I just keep getting the avrdude signature error. I have tried many of the techniques described over the internet, and the only thing that changed the error was changing the avrdude.conf file. (The first error I got made specific mention of the signature byte that was wrong)
I also don't have a lot of electronics to build circuits with at this stage, so its a little hard to build some of the other (cap, crystal) breadbread circuits some mention.
Does anyone know how to bootload from the UNO R3 as ISP? I'm using IDE 1.0.3 on OS X.
Double check your connections, and that you have the 10uF capacitor in place to disable auto reset on the Uno.
Is it an atmega328-pu or an atmeg328p-pu you are trying to bootload? It makes a difference.
Has the device signature ever been reported?
Once you have successfully changed the fuse settings (which is part of the process of burning the bootloader), your mcu will become unresponsive unless you connect a crystal and caps to it, or feed it with an external clock.
BTW I'm wondering why ArduinoISP doesn't put out a clock signal on one of the PWM pins, to assist with programming of mcus that have had the fuses set to require a crystal. It shouldn't be difficult to do.
Reading your comment, I think i've been going about this completely wrong.
I've got my board setup like this Where would I put the cap (and would a 100uF work, as its all i have). After the board is set up correctly, how do I then go about bootloading?
Sorry, it seems like this is a lot harder than I thought it would be, so I'm a little lost.
You should have a 0.1uF cap across the Vcc and ground pins of the target device, but it probably isn't critical. The 10uF cap goes between the reset and ground pins of the Arduino you are using as ISP, after you have uploaded the ArduinoISP sketch to it. 100uF will be OK.
Have found a 0.1uF cap and have put it over the pins, and have put the 100uF across the RESET and GND on UNO. But still getting the same issue. Not sure what setting the fuses means. But looking at it on Google, I'll need to buy a Crystal to set them.
So, I'll explain what I use and the process I followed.
I have an UNO R3, and program with IDE 1.0.3 on OS X. I'm trying to program ATMEGA328-PU not the pico (ATMEGA328P-PU).
My process is as follows:
Load the ArduinoISP sketch onto my UNO R3.
Close IDE
Unplug USB cable / Power Off Arduino
Change the signature in the avrdude.conf to 0x1e 0x95 0x14
Double check your connections, and that you have the 10uF capacitor in place to disable auto reset on the Uno.
Is it an atmega328-pu or an atmeg328p-pu you are trying to bootload? It makes a difference.
Has the device signature ever been reported?
Once you have successfully changed the fuse settings (which is part of the process of burning the bootloader), your mcu will become unresponsive unless you connect a crystal and caps to it, or feed it with an external clock.
BTW I'm wondering why ArduinoISP doesn't put out a clock signal on one of the PWM pins, to assist with programming of mcus that have had the fuses set to require a crystal. It shouldn't be difficult to do.
Well ArduinoISP (at least the one in IDE 1.0.3 does output a 'heartbeat' signal on to pin 9, but I can't tell what speed it is to be useful as a clock pulse for the target chip. If not maybe it could be changed to a faster rate?
// this provides a heartbeat on pin 9, so you can tell the software is running.
uint8_t hbval=128;
int8_t hbdelta=8;
void heartbeat() {
if (hbval > 192) hbdelta = -hbdelta;
if (hbval < 32) hbdelta = -hbdelta;
hbval += hbdelta;
analogWrite(LED_HB, hbval);
delay(20);
}
It's reporting a device signature of zero, which means failure to communicate with the mcu. This could indicate a bad or incorrect connection, or that the fuses have already been set. Maybe you have already succeeded in burning the bootloader once? Or could it be that you purchased an atmega328p with a bootloader already installed (and hence fuses already set) instead of a blank atmega328p?
retrolefty:
dc42: BTW I'm wondering why ArduinoISP doesn't put out a clock signal on one of the PWM pins, to assist with programming of mcus that have had the fuses set to require a crystal. It shouldn't be difficult to do.
Well ArduinoISP (at least the one in IDE 1.0.3 does output a 'heartbeat' signal on to pin 9, but I can't tell what speed it is to be useful as a clock pulse for the target chip. If not maybe it could be changed to a faster rate?
It looks to me that timer 2 is free; so it could easily be used to provide (say) a 1MHz clock signal, independent of the heartbeat.
If the bootloader has been loaded onto the ATMEGA328-PU, will it work if I put it in my UNO? Even though the UNO uses a 328p and mine is the normal 328? If it will, then at least I can test it.
DirkoS:
If the bootloader has been loaded onto the ATMEGA328-PU, will it work if I put it in my UNO? Even though the UNO uses a 328p and mine is the normal 328? If it will, then at least I can test it.
Yes it will. Once you have gotten around actually burning the bootloader onto the chip the arduino IDE does not try and read the signature bytes to just uploading sketches via the serial USB connection. It's only when burning bootloaders from the IDE or possibly using the newer files menu option of 'upload sketch using programmer' that the signature bytes mismatch can become an issue.
DirkoS:
If the bootloader has been loaded onto the ATMEGA328-PU, will it work if I put it in my UNO? Even though the UNO uses a 328p and mine is the normal 328? If it will, then at least I can test it.
Yes it will. Once you have gotten around actually burning the bootloader onto the chip the arduino IDE does not try and read the signature bytes to just uploading sketches via the serial USB connection. It's only when burning bootloaders from the IDE or possibly using the newer files menu option of 'upload sketch using programmer' that the signature bytes mismatch can become an issue.
Lefty
More importantly, if you put it in a Uno then it will have a crystal connected.
Okay, then neither of the blank chips I bought has a bootloader on at this stage. Both just fail saying the chip is not responding when I try and upload a sketch.
Is there any other way of getting a bootloader on these chips?
There was a bug in ArduinoISP shipped with version 1.0 of the IDE (for Windows at least) that prevented it from working. Do we know that it is definitely fixed in the 1.03 IDE for OSX?