PC ---> arduino (seeeduino 168) ---> standalone atmega328
What I mean by 'standalone atmega328' is a small pcb with a 328, 16MHz oscillator and a ISP header. I want to develop my ardiuno program and upload it to the standalone board using arduinoISP, saving having to buy a programmer.
I've triple checked all my connections and I think everything is right. I have set upload.using=arduinoisp in my preferences file and burnt arduinoisp to my arduino.
However, when I try to program the 328, it tries to program the arduino! E.g. I select 328 from the board list and it gives the error:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
When I select 168 from the boards list it ends up programming the arduino!
So it seems that the upload.using=arduinoisp isn't working for me. Any ideas?
The seeeduino is running arduinoISP. (Sorry, just realised I didn't actually say that :-[) I have now run avrdude from the commandline and successfully uploaded the blink example sketch to the atmega328. It seems the arduino IDE is broken, or I am misunderstanding the documentation! What I want to do is press the upload button and have it send the firmware to the 328, via arduinoISP. I thought this would be possible using the 'upload.using=arduinoisp' but it doesn't seem to work.
The blink sketch is also running very slowly, presumably because I haven't set the fuses correctly to match the crystal. I'm using a 16MHz crystal and a one second delay takes 16 seconds. I will see if I can burn the standard arduino fuse values now.
You're right! Disabled the autoreset and now everything is working perfectly.
Thanks very much
If someone with the relevant permissions to could update the arduinoISP page (http://arduino.cc/en/Tutorial/ArduinoISP) it might save other people a headache too! E.g. add a step between 2 and 3: 'Disable auto reset, if available, on the arduinoISP board'.