Programming an ATMEGA328

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
johns83
 
Posts: 3
Joined: Wed Jun 12, 2013 9:22 pm

Programming an ATMEGA328

Post by johns83 »

Hello,

Sorry, this is probably a really stupid question, but I am an absolute beginner with this stuff. I just bought and assembled the USBtinyISP.

Using the test command

avrdude -c usbtiny -p m8

I get the response

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

Which the tutorial indicates is good.

I have a spare ATMEGA328 chip, which has previously had the Arduino Uno boot loader uploaded to it. My question is, do I need to wire up any extra components to program the board, or is hooking it up to the 6 USBtinyISP pins sufficient? When I do this, and enter the command

avrdude -c usbtiny -p m328p


I get the same response as above, which I believe indicates that the programmer works, but cannot communicate with the chip. I have verified the connections several times.

Do I need to hook up crystals and such to the ATMEG328?

Anything else that I need to know?

Thanks for your help!

johns83
 
Posts: 3
Joined: Wed Jun 12, 2013 9:22 pm

Re: Programming an ATMEGA328

Post by johns83 »

Anybody?

I am very confused. I wired up a breadboard like it shows here

http://blog.thelifeofkenneth.com/2012/0 ... board.html

and still nothing.

When I put the chip on an Arduino Uno board, and connect the USBtinyISP to the ICSP headers, it works just fine. I get a device signature and everything. When connected to my breadboard, i get a device signature of 0x000000, by the way.

I checked continuity from the Arduino's ICSP pins to the Atmega328 Pins, to check that I have it connected right on the breadboard, and eveything on the Arduino is connected just as I have it on the breadboard, with the exception of the AREF pin, which I have tied to VCC.

Here is a picture of my breadboard. I have tried to chow the connections to the USBtinyISP, but its not that clear. it is color coded, though...

Image


Can anyone offer any insight? I'm really stumped here.

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Programming an ATMEGA328

Post by adafruit_support_rick »

Are you sure your clock is running? Hard to exactly see how you have everything wired, but it looks right.
You might want to refer to our ArduinoISP tutorial to double-check your wiring. For that, an arduino provides the SPI signals, instead of a USBTiny, but it's ultimately the same thing.

You might try different jumper wires and breadboard sockets. If you've got a multimeter, try to establish whyether on not you've got continuity between the target chip and the USBtiny pins. Also, make sure you've got the correct voltages, continuity with GND, etc.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”