Go Down

Topic: [Fixed] Unable to upload to AtMega328 on breadboard (Read 4 times) previous topic - next topic

GregM

Mar 02, 2011, 08:12 pm Last Edit: Mar 03, 2011, 04:02 pm by GregM Reason: 1
I've been fiddling around with the Arduino Uno and am now ready to program a ATMega328 (which I got from Sparkfun preprogrammed with the bootloader)

The followed the steps here http://arduino.cc/en/Tutorial/ArduinoToBreadboard
Removed the chip from the uno, wires it to the breadboard, added in 16Mhz xtal, 22pF caps, and applied power.

When I upload I get:
Uploading to IO board
And then after 20 secs
Problem uploading to board.
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expected=0x14, resp=0x51

Any ideas? The guide seems fairly straightforward bit I can't get it working? :(




Loudhvx

#1
Mar 02, 2011, 08:21 pm Last Edit: Mar 02, 2011, 08:45 pm by Loudhvx Reason: 1
I just did that last night (but not on the Sparkfun chips as explained below) and it worked fine, so I know it's doable.

You are uploading a sketch, correct, not the bootloader?

What is your power hookup?  The chip would not run with the reset line connected if the UNO board was not powered. I was using seperate 5v for the breadboard, so I did not share a power line with the UNO, (but still shared ground, of course). When I pulled the USB cable, the UNO would power down and lockup the chip on the breadboard.  Disconnecting the reset line, then power cycling the chip cleared that.

GregM

Correct - uploading a sketch.

Tried this guide - didnt help either.
http://www.ladyada.net/learn/arduino/help.html

A quick question - how do I know the chips I bought really have the bootloader code on them - the label says so but if it doesn't then it wont work.

I mean its supposed to be simple but its not working.

Loudhvx


Correct - uploading a sketch.

Tried this guide - didnt help either.
http://www.ladyada.net/learn/arduino/help.html

A quick question - how do I know the chips I bought really have the bootloader code on them - the label says so but if it doesn't then it wont work.

I mean its supposed to be simple but its not working.


Can you put the chip directly into the UNO? That would test it.

Loudhvx

I also just got the bootloaded SparkFUn atmega328.But I haven't tried it yet.

I'll try to test it later at work.

I was using the chip pulled out of the UNO.

Go Up