I have made my own board which uses a ATMega32U4 and im trying to load the leonardo bootloader using my uno. everytime I try to burn the bootloader i get the error:
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override*
this check.*
I've compared my design to others and i don't think the issue is in the circuitry. I've also tried using avrdude directly and get the same response.i enter :
avrdude -p m32 -P com5 -c avrisp -b 19200
it returns a similar message, and says the device signature is 0x000000, expected 1E 95 02. I have the 10uF cap from ground to reset, i have checked all my connections are right. I have no idea whats going on???? help!
you are exactly right haha, I have made some progress on my own. I made the dumb assumption that the chip wouldnt need an external clk. my board is designed for a 16MHz crystal but at the time i didn't have the caps to run it. I hocked it up and now i get the device signature 0x1e9587 which is kinda a big deal for me haha.
now the issue is that it seems the m32 device in avrdude is not the one i want to use.
avrdude's ATMega32(m 32) = 0x1e9502
my ATMega32U4 = 0x1e9587
Now i have to figure out what device to use in avrdude, or then again maybe ill try using the arduino software and see if its smart enough to figure it out for me.
and ps. a few days ago I knew zero about this stuff so i havnt quite figured out fusses yet haha.
alright it would seem i have successfully put the bootloader on, had to use -p m32u4 (weird eh...).
Now this is where my lack of knowledge on fuses is going to hit me. when i attach my board it comes up as unknown device ATm32U4DFU, and cant find a driver. when i burnt the bootloader i got the message
avrdude: safemode: Fuses OK
should i take it out of safe mode? how do i check what my fuses are set to?
I've seen this elsewhere, and the solution that worked for me was taking into account that some of the bits can't be changed. I don't remember exactly which ones on which fuses, but if you're still interested, I could dig through my files and get back to you. lmk.
avrdude: verification error, first mismatch at byte 0x0000
0xcb != 0xff
When I got that it meant the the Arduino I was using as an ISP was getting reset and avrdude was talking to the Arduino bootloader instead of the ArduinoISP sketch. The bootloader uses the same protocol and will happily acknowledge a write to the fuse bytes but always return 0xFF when reading fuse bytes. That's what the 10 uF capacitor between Reset and Ground was supposed to prevent.