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?
Unrelated note: You really should not have AREF connected directly to Vcc.
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.
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.
Thanks for the quick replies everybody! This forum feels like a very friendly place already!
[quote author=Coding Badly link=topic=147654.msg1109507#msg1109507 date=1360314284]
Unrelated note: You really should not have AREF connected directly to Vcc.[/quote]
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.
Riva:
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.