I have an Uno R3 and am unable to upload a sketch to it.
I am getting the following error message when trying to upload to my Uno:
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Users\The Bug\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\hardware/tools/avr/etc/avrdude.conf"
Using Port : \.\COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
I have been able to upload to it in the past with no issues. It seems that this issue started when I tried uploading but did not have the Uno connected to the USB cable. It prompted me to choose a COM port, so I cancelled, connected the UNO, and tried again.
Using 64-bit Windows 7
It passes the transmit/receive loopback test. I have the correct COM port connected. Tried changing the COM port in Device Manager and selected the corresponding one in the Arduino software. I tried pressing the reset button on the board just before it sends the packets during upload. I have verified that I have the correct board selected with the Arduino software. I reinstalled the drivers and also downloaded the latest release from Arduino (arduino-1.0.5-r2) but still no change.
Searching the internet returns thousands of results regarding this issue but none of the suggestions seem to work. The most prominent suggestions I have found are listed above, and none of them have solved my problem.
One thing that I notice is that the default 'Bits per second' rate within Device Manager for that port is 9600, while Arduino shows 115200 during upload. Is this a problem?
I also tried this on a Linux Ubuntu system, which returned the message 'programmer not responding'
Could the bootloader be fried?
So, a year and a half later, I have another working UNO in my possession. I am able to upload to the new one with no problems, so I put its ATMEGA328p on the one mentioned above and got the same errors. Putting the old ATMEGA in my new UNO was a success.
So, now I have confirmed that the bootloader is still intact, and my issue is elsewhere in the hardware on the UNO. So my next endeavor is troubleshooting the circuit(s) that the UNO uses to program the microcontroller. Does anyone have any pointers on this? How does the programming/compiling process work after clicking the 'Upload' button?
hi rubberduino,
great you found a first thing to check.
and great idea to learn more about the inside workings of arduino 8)
ArduinoDocumentation:
The ATmega328 on the Uno comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol
source: ArduinoDocumentation BoardUNO
in short:
ide compiles your sketch and the librarys to the final hex file.
than it uploads this hex to your board -
it uses the 'stk500' protocol for this.
if you reset the ATmega328p it enters the bootloarder.
and than waits for a serial stream from the ide to programm the user area of the flash.
to have this serial stream on the arduino there is a smd chip near the usb-connector to convert from usb to ttl serial.
on older boards it was an FTDI chip. (rectangle chip with pins on two sides)
on newer boards there is a ATmega16u2 programmed to do this task. (square chip with pins on all for sides)
so next thing you can check is:
on your old arduino:
- is the usb-serial converter working
you can test this with the Analog Read Serial example [edit] and the Loop-Back Test Instructions[/edit].
(for Analog Read you don't need a potentiometer. the values will float a little bit... its just to test the serial converter..)
so you program your ATmega with your new board
test with the new board if you are getting messages in the serial monitor
and then put the uC back in your old board. than check again if you getting the messages.
if you are unplugging and repulgging your board sometimes you have to restart the ide (windows/java is messing around with the com ports...) one think to remember is: first close the serial monitor than unplug your board.. (the IDE don't likes it if the com port vanishes during she tries to write/read from it)
if you don't want to switch the uC from one Board to the other you can connect pin 0 & 1 (RX & TX)
so you can have the uC in your new Arduino and connect your old Arduino (remove the uC from there) with your new one.
connections:
OLD |
- |
NEW |
GND |
- |
GND |
5V |
- |
5V |
Pin0 RX |
- |
Pin0 RX |
Pin1 TX |
- |
Pin1 TX |
than only connect one of them at the same time to your computer.
hope that helps.
alternative:
connect the both boards this way:
OLD |
- |
NEW |
GND |
- |
GND |
Pin1 TX |
- |
Pin0 RX |
Pin0 RX |
- |
Pin1 TX |
remove both uC and connect both boards per usb to your computer .
than you can use a second serial monitor - for example putty (for windows)
to send a message from one serial monitor to the other -
make sure you have both monitors set to the same baudrate speed (115200)
have fun 
sunny greetings
stefan