Problem programming Atmega328-PU on breadboard

All,

Did a quick forum search but could not find anything helpful, please forgive me for missing anything obvious - my first attempt at ISP.

I'm trying to program an Atmega 328-PU on breadboard (with 16MHz crystal & caps) using a Nano 3.0 (Atmega328) as the ISP and using ArduinoISP sketch.

I seem to have the ArduinoISP sketch running OK. I have set up 3 leds as suggested in the tutorial and the "heartbeat" led is pulsing. If I reset the Nano, the "programming" and "error" leds each flash briefly before the heartbeat starts pulsing again.

I also seem to have the reset disable 10uF cap on the Nano also working (if I try uploading another sketch I get a "not responding" error as expected).

I am trying to upload the "Blink" sketch to the 328 on the breadboard. I have attached the reset (with 10K pullup), the MOSI, MISO and SCK connections made to pins 10, 11, 12 & 13 on the Nano in that order.

When I attempt to upload using programmer, I get the message:

Binary sketch size: 1,072 bytes (of a 30,720 byte maximum)
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.

Can someone please suggest how I can figure out what's wrong here?

Thanks,

Paul

You are attempting to program a 328, while the program is looking for a 328P.

Try NickGammon's bootloader sketch, I think it allows either chip type.

You can change the processor type in boards.txt to match your hardware.

CrossRoads:
You are attempting to program a 328, while the program is looking for a 328P.

Ah-ha! That's a real "gotcha" for newbies, isn't it! Thanks, CrossRoads!

Well, I've followed these instructions and changed avrdude.conf and boards.txt.

http://forum.arduino.cc/index.php?topic=58670.msg701645#msg701645

It seems to be working! I'll know for sure if everything's OK once I have time to do more testing.

CrossRoads:
Try NickGammon's bootloader sketch, I think it allows either chip type.
Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer

You suggested that to me before, CrossRoads, in another thread, but I still don't think that's an option for me because I use Ubuntu and that sketch requires a piece of software on the PC that appears only to be available for Windows & Mac.

@PaulRB:

You may wish to consider just using the Arduino-ISP sketch to load a bootloader to the naked ATmega328P-PU and then using serial via the GUI to upload your sketches. You simply need a USB FTDI TTL adapter or any of the cheap imitation products available from eBay. Eventually, you are going to want to put that naked chip into something other than a solderless breadboard and serial w/ bootloader is easier to program than bringing out the AVRISP lines to a connector. Just my opinion...

Ray

Typically, the AVRISP lines are available at connectors any, as D11-12-13, +5, Gnd, Reset.
Just need a breakout cable with "flying leads" from the programmer to the discrete header locations if a seperate ICSP header was not included.

Further testing reveals its definitely working! Thanks again CrossRoads & Ray.

Still don't really understand the advantage of paying for a separate usb to ttl serial or usbisp! Now I know isp programming is quite easy and only needs one more wire than serial, my Nano seems to be all I need right now. Maybe future projects will reveal the advantages to me...

Maybe future projects will reveal the advantages to me...

All of my designs use the 1st (or only) physical TTL output port @9600 BAUD for diagnostics for PC terminal/Arduino monitor. As this port on my design is always available on a header with Gnd, adding just 1 additional pin (3-pin connector) makes serial programming very convenient, even for projects constructed in their final enclosures.

Ray

You can't do serial debugging thru the ICSP, hence the need for the serial port.
You can't bootload via the serial port, hence the need for the ICSP port.
USB/Serial adapter & AVR Programmer are just tools to make life easier.