Hi all,
I have a from-the-factory 328P on a breadboard. (I also have a couple seemingly unresponsive 328Ps with the Uno bootloader.) I also have an Arduino Micro (with the 32U4) with ArduinoISP loaded to it.
It's not working.
I get
avrdude: Device signature = 0xffffff [or 0x000000, sometimes]
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
and sometimes
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF
avrdude: safemode: efuse reads as 7
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK
regardless of whether the 328P is connected to the SS, MI, MOSI, SK pins on the Micro board or the 10, 11, 12, 13 pins on the Micro board or nothing at all. So I'm thinking the ArduinoISP code is not set up to use the 32U4 correctly.
Or else I'm using avrdude wrong, but I get the same error when I try burn the bootloader from within the Arduino IDE, so I don't think it's that.
I successfully ran my "board detector" sketch on the Micro.
Described here:
Photo:
I connected the ICSP headers together except for the reset wire as described on the page above. That (the purple one) was plugged into D10 on the Micro.
Results (when plugged into the Uno as the target device):
I don't have the wire, but I checked continuity between the Micro's ICSP header and the dedicated pins on the board—they're the same. So I hooked it up with them, and the 328P's RST connected to D10, and uploaded your sketch. All I got was the very first line—"Atmega chip detector."
One interesting thing is that I did see a faint "heartbeat" on the LED I've got connected to the 328P's pin 19 (Arduino 13), which is, of course, SCK. I did not see any such heartbeat before (when trying to use the Micro as an ISP).
Ah. No, there wasn't, and I don't have a 0.1µF. I did scrounge up two green-ceramic 47nFs (code 473). I put on across 7/8 and one across the power rails (capacitance adds in parallel, right?). Still just getting the first line. I tried a 2.2µF. No luck.
WHOA! YES! I specifically ordered a "blank" chip from Virtuabotix—but I just put the 16MHz crystal into the circuit and voilà! Sorry not to have tried that earlier. Now to see if it'll actually flash the chip....
Successfully flashed the fuses—now it's using the internal oscillator! Thank you for your help. Now to what I actually want to do... set up a watch crystal asynchronously! Time to hit the datasheet.
I seem to recall someone doing that, not so long back. a 32.768 KHz crystal or some such thing. Or maybe that was as an input to a timer. One or the other.