Programming a ATmega328P on a breadboard - or AVR microcontrollers in general

What I am trying to do is program the ATmega328P on a breadboard. I have followed the schematic by which the Duemilanove board was wired to no avail.

I have a SparkFun AVR Pocket Programmer that works fine. I am able to successfully program, using ISP, the ATmega328P on the Arduino Duemilanove board. Further, I am able to remove the stock controller, replace it with a new controller (same model and same chip I am attempting to program on the breadboard), and program successfully as well.

I directly connect the following:

  • MISO to pin 18
  • SCK to pin 19
  • RESET to pin 1
  • VCC to pin 7
  • MOSI to pin 17
  • GROUND to pin 8

I have tried tying AREF to VCC and both GROUNDs together - still nothing. I also tried programming the board by powering it externally (i.e. removing VCC from the ISP connector). The pins I have described above are the only connections. Is there something I am missing here?

There error I get is:

Where I have read this result indicates that the programmer cannot connect to the target board.

I tried looking over the schematic further to see if there were any extra connections that I was missing(i.e. some other grounded or 5V supplied pin I would otherwise be bypassing by tying VCC directly to pin 7); I could not find anything. Any suggestions?

Here is the verbose (-v flag) avrdude output:

Hello sherrellbc,
have you tried putting 10uF capacitor between RESET & GND?

I have tried placed a pull-up resistor in this manner, but have not tried a capacitor. What would be the reason for a cap?

nightcrawler218:
have you tried putting 10uF capacitor between RESET & GND?

No, wrong context.

More to the point, where are the 16 MHz crystal and capacitors?

Nick knows! Read up on it.

Remove the '-P usb' option. Add '-B 4 -v' and report back the avrdude output.

Paul__B:
More to the point, where are the 16 MHz crystal and capacitors?

I think Paul is barking up the right tree here. What happens if you program the Duemilanove with the Blink sketch, then remove the ATmega328P from the Duemilanove and put it in the breadboard circuit? Does it continue run there?

Nick knows! Read up on it.

I nominate Nick Knows™ as an Official Arduino Forum Meme.

Nick Knows

I second that motion.

I just registered nickknows.com ... anyone want to buy it?

j/k :smiley:

I just registered nickknows.com ... anyone want to buy it?

That's a hoot!

When Nick becomes old and forgetful, we can apply for an alias record for redirect to, "nickknew.com"