I have been using a Nano '328P with the ArduinoISP example sketch, and I can't get the fuses or bootloader written to a brand-new ATmega328 (no P). The new chip is installed on a board of my own design, which has nothing more than the '328 itself, a regulator, some filter caps next to the power pins, and a 16MHz ceramic resonator (with internal caps). Right now, because of the default fuse settings, it's not using the 16MHz resonator, and is instead using an internal 8MHz oscillator with a divide-by-8 circuit, resulting in 1MHz operation (in theory). I have this board hooked up to the Nano in the following configuration:
Nano Custom board
pin 10 to Reset (with 10k Ohm pull-up)
pin 11 to pin 11
pin 12 to pin 12
pin 13 to pin 13
Ground to Ground
+5V to +5V
I've been using LEDs and an oscilloscope to monitor the activity on the SPI/Reset lines, and when I use AVRdude (so I can use the -F feature), I see no activity at all, so I know that neither of the chips are communicating with each other. The device signature and fuse reads always return 0x00's because the lines are being held low for some reason, yet the Nano thinks that it's actually reading data. There was ONE TIME that the Nano happened to read the correct signature, but unfortunately, I didn't use -F that particular time, and it might have been my only chance all day. =(
From what I can see, there could be problems with the Nano as the programmer (due to the lack of communication), and there could be issues with the 1MHz clock. My first idea leads me to think that decreasing the speed at which the Nano probes the new chip might help, because the SPI bus has to operate at less than 1/4 the clock speed of either chip. Now, I want to say that this has nothing to do with the RX/TX baud rate, so does anyone know how to change the ISP speed to something insanely slow?
Other than that, my mechatronics professor and I are both at a loss... I've measured continuity, voltages on all pins, impedance, and I've watched the SCK line give out pulses of about 20-40 clocks, then stop, as if there's something intermittently connecting, but continuity checks out. When I measure the voltages on the resonator pins with the o-scope, both the Nano and my chip give the same results: XTAL1 is about .45V and XTAL2 is about .3V, and neither have any noise (probably because my o-scope can't measure that small of periods). On the new chip, all the pins are tri-stated and have ambient noise of similar amplitude to a floating wire.
Even though the tutorials don't call for it, I've tried all the possible combinations of pull-up/down resistors on the SPI bus/clock with no effect other than making AVRdude read 0xff's instead of 0x00's.
Any ideas, please! I've had no success with this, nor with anything else today- wow, I suck.