Go Down

Topic: Can't upload to breadboard Arduino (Read 989 times) previous topic - next topic

PetriH

Hi everybody! This is my first post to the forums.

I've been trying to setup standalone Arduino on a breadboard but I cannot get uploading to work. I've been following the tutorial at http://arduino.cc/en/Main/Standalone with the exception that I've got USB2Serial adapter from Arduino store (this one http://store.arduino.cc/eu/index.php?main_page=product_info&cPath=11&products_id=143).

When I try to upload a sketch I get the following error:
avrdude: stk500_recv(): programmer is not responding

The Atmega328P I ordered is preloaded with the Optiboot bootloader (at least that's what the electronics store said on their store page).

When I press the reset button, the led attached to digital pin 13 blinks twice, so I think the microcontroller is working properly. When I try to upload, the RX led on the USB2Serial board flickers for some time, but I think the Atmega is not reset (at least the led on pin 13 does not blink).

There seem to be some conflicting info on the net how the automatic reset should be wired. I added a pull-up resistor to the Atmega reset pin and connected the EXT reset pin of the USB2Serial via a 0.1uF capasitor to the reset pin. Is this correct?

Another possibility is that the Atmega is not loaded with a bootloader. Is there a way to verify that the bootloader is present?

Nick Gammon

I can't see anything obviously wrong,  but you may get some tips from this page:

http://www.gammon.com.au/forum/?id=11637

Coding Badly


Unrelated note: You really should not have AREF connected directly to Vcc.

Quote
When I try to upload, the RX led on the USB2Serial board flickers for some time, but I think the Atmega is not reset (at least the led on pin 13 does not blink).


Try uploading using a manual reset.  Hold the reset button, click Upload, when Uploading is displayed, release the reset button.

Riva

The way you describe the reset circuit sounds correct.
When you press the reset button and the D13 LED flashes twice that sounds like the bootloader is present.
If you try to upload a sketch does the D13 LED blink twice the same as when the reset button is pressed? If it does then this would indicate the auto reset is working.
Have you tried swapping the RX/TX wires? It's impossible to see where they are connected on the USB2Serial adaptor and you may have them the wrong way round.

PetriH

Thanks for the quick replies everybody! This forum feels like a very friendly place already!


Unrelated note: You really should not have AREF connected directly to Vcc.

Oh, good to know! Hmm, the tutorial I linked had the AREF connected to Vcc... I guess it should remain unconnected?

I tried to manually reset the board while uploading but either I couldn't get the timing right or something else is wrong.


If you try to upload a sketch does the D13 LED blink twice the same as when the reset button is pressed?


Nope. So there must be something wrong with the autoreset then... which is odd because the wiring is pretty simple. I will have to double check everything when I get back home from work.

I also tried swapping TX & RX but it didn't help.


PetriH

Problem solved! The culprit was a blown capacitor. Thanks to all for the tips that helped me to get on the right track.

Coding Badly

Oh, good to know! Hmm, the tutorial I linked had the AREF connected to Vcc... I guess it should remain unconnected?


Until you decide which reference setting(s) you will be using, yes.

JoeO


Problem solved! The culprit was a blown capacitor. Thanks to all for the tips that helped me to get on the right track.


Out of curiosity, which capacitor was blown?  They all look brand new.

PetriH

It was the one connected to the reset pin (autoreset wasn't working). I swapped it to a new one and it started working.

Go Up