Problem uploading sketches with arduino as ISP(Kind of SOLVED)

I have a custom PCB w/ an Atmega328p-au and ICSP header that I need to upload sketches to. It's a blank MCU setup for 5v w/ a 16mhz resonator. I thought I would try to upload sketches to another working arduino nano to make sure my wiring and process is ok before trying to upload sketches to the custom PCB, but it's the same result.

I'm on Arduino IDE 1.6.2. I wired them up using those male pin chinese jumpers. 24awg or so.

programmer - target
MISO - MISO
VCC - 5V
SCK - SCK
MOSI - MOSI
D10 - RESET

Ended up with wrong device signature( 0xfffff) and things like programmer not responding and error initializing expected 0x14 and avrdude: stk500_getsync(): not in sync: resp=0x00. I would think it was bad wiring/soldering/etc., but I resoldered and checked everything 20 times.

Any help is greatly appreciated. :slight_smile: I used this guide to use the nano as an ISP.

http://letsmakerobots.com/content/make-arduino-isp-programmer

Read this:
http://forum.arduino.cc/index.php?topic=317138.0

It points to bad wiring, but I triple checked everything. I'll try again today and take a picture. :slight_smile: Thanks!

It is not necessarily bad wiring. There could be multiple causes like:

c:>avrdude -P COM3 -b 19200 -c avrisp -p m328p -n
Error:
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
*avrdude: initialization failed, rc=-1 *
Double check connections and try again, or use -F to override this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude done. Thank you.
Reason: The Target AVR is not powered or does not exist. This message is also useful for testing, before connecting any Target AVR, that Arduino Uno + ArduinoISP work as an ISP programmer and the connection to the PC is proper.

c:>avrdude -P COM3 -b 19200 -c avrisp -p m328p -n
Error:
avrdude: stk500_getsync(): not in sync: resp=0xf0
avrdude done. Thank you.
Reason: Arduino Uno needs a Reset.

c:>avrdude -P COM3 -b 19200 -c avrisp -p m328p -n
Error:
avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.14s
avrdude: Device signature = 0xffffff (Device signature = 0x000000)
*avrdude: Yikes! Invalid device signature. *
Double check connections and try again, or use -F to override this check.
Reasons:
a) ISP connections (SS, MOSI, MISO, SCK) -> (RESET, MOSI, MISO, SCK), between Arduino
Uno and the Target AVR, are not good, wrong wiring.
b) The AVR oscillator (external) does not work.

Thanks for the tips. :slight_smile: I tried for awhile with these nanos and it just wouldn't work..... I dusted off a mega2560 and it worked first try with same wiring. Not sure what's up with that, but I"m happy. I really appreciate the help.

When you buy off the shelf Atmel's from places like Digikey, mouser, you may need to set the fuses . I use AVR Burn-o-mat: AVR8 Burn-O-Mat avrdude GUI

You can also use Tools>Burn Bootloader in the Arduino IDE to set the fuses, this will also upload the bootloader but it will be erased when you Upload Using Programmer. Note that Upload Using Programmer doesn't set fuses.