Arduino nano not taking code from computer

Details:

Arduino: Arduino Nano ATMega168
Serial Port: COM4

I connected the arduino nano onto a breadboard and connected Digital Pin 11 and Gnd to an LED and then I just used the blink code and then I just changed the pin in the code to 11, and then I selected the serial port COM4 and then selected the Arduino duemilanove, nano etc…168 in the menu and when I press upload, the RX light on the nano blinks a couple of times, and then just after waiting like 30-45 seconds, then it says uploading fail and then gives me this error…

Binary sketch size: 1231 bytes (of a 14336 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Could you please tell me how to get rid of this error and then how I can actually upload the code onto my arduino?
Plz help :slight_smile:
Thx

Sometimes, the number of times the RX pin blinks differs, but I still get the same error message, and I am not able to upload the code :(

Could you please tell me how to get rid of this error and then how I can actually upload the code onto my arduino?

Make sure you select the comport associated with your arduino and not an internal pc hardware comport (usually 1-4).

I did choose COM4 from port menu but it still does not work! The COM port and board are selected correctly...plz help :)

Vishalapr: Can you short the TX,RX pin your arduino , after that open hyperterminal with associated com port (9600,Databit-8,stop-1,parity-none,Flowcontrol-none). Now type any character from keyboard,if the key is appearing in your hyperterminal text area then your com port is working fine and issue might be on arduino board.

could you please explain in a little more detail, because I am not that great at the arduino... :( What do you mean short out the pins?

The TX,RX pin is placed at left top on Arduino Nano board, If you short TX----->RX the Transmitting Data( what you have typed on hyperterminal ) is goes to RX pin, so hyperterminnal will receive the exact data what you have typed.

So it is a loop back test between: PC(Virtual Comport)TX--------(RX)Arduino FTDI Chip(TX)------------- (RX)PC(Virtual Comport). Check in your PC, you must have:http://www.ftdichip.com/Drivers/VCP.htm driver.

Hope you will solve the problem.

I also have an arduino duemilanove that I use for other projects, and I connected the TX and RX pins with a jumper and in the IDE, I went to Tools-Serial Monitor and then I typed in some things and it returned the same things I typed on the screen, and then I disconnected the jumper and then I did not revieve what I typed in...

Then I took my arduino nano (The one which has the problem and the reason why I created this topic) and then connected the jumper between TX and RX on the breadboard and I did the same, typed in random stuff and I did not get anything that I typed back! I selected the right COM port and board and everything but what I typed in was not returned even though I connected the TX and RX pins :(

So probably the problem is in the connection between the computer and arduino, with the TX and RX pins, and the arduino is just fine...what do I do now? Plz help :)

You have tested arduino duemilanove successfully as we have discussed. I believe you have correctly select the com port for Nano. http://arduino.cc/en/uploads/Main/ArduinoNano30Schematic.pdf

as mention test the Atmega does not play any role, go through the schematic when you type anything on hyperterminal( do not use serial monitor tool) the TX led should blink.

You must also check the comport that you have select control panel > System > Hardware > Device Manager >Port(COM & LPT) select the portno, right click >properties > Manufacture

Manufacture should be FTDI.

disconnect your usb cable from PC and recheck whether you COM port no disappear or not. If it is disappearing then it is confirm that your Arduino Nano FTDI chip is detecting.

and It should be work.

The manufacture is FTDI. I used putty for a communication program like hyperterminal as I had it, and I connected the usb cable and then opened up putty and selected com port and speed (9600) and then as I typed anything in, the Red LED on the nano blinked, RX LED blinked whenever I typed in something, the TX LED did not blink even when I connected them both together with a jumper cable... When I remove the arduino from the PC then the COM port 3 disappears from Device Manager...

On my arduino duemilanove, as I connect it, the inbuilt pin 13 LED blinks a couple of times, whereas with the nano, the inbuilt LED never blinks! Its as if the LED is dead! I wanted to check it, but the arduino was not taking in any code so I could not check...

Plz help :)

Ok I understand , your communication between PC -arduinoNano is working. Problem might at TX or Atmega. You can use your Arduino duemilanove board as FTDI breakout. 1. Mark the Atmega Controller Pin1 and its orientation on Arduino duemilanove, Remove it from your socket. 2. Connect TX,RX , GND, 5V to your arduino Nano and do not connect usb to Arduino Nano. 3. Upload Blink example to Nano Via Arduino duemilanove.

If anything doubt in your mind you can post the details: and go through: http://arduino.cc/en/Tutorial/ArduinoToBreadboard Details: Uploading sketches to an ATmega on a breadboard.

So I take arduino duemilanove ATMEGA and put into a breadboard and then connect TX RX (Pin 0 and 1) and Gnd and 5V to arduino nano, and then where do I connect USB cable? Because u said do not connect USB to arduino nano, and the ATMEGA of duemilanove is connected to the breadboard so where do I connect the USB?

Remove microcontroller from Arduino duemilanove socket now connect usb to Arduino duemilanove.

Oh I get it, so we are using the arduino duemilanove communication pins for uploading code onto nano, but what board do I select in options

You have removed the Atmega Cotroller from arduino duemilanove, duemilanove will behave like a USB serial controller. Your seleted board is now Arduino Nano. As you said your Led13 is never blinked, I am supecting your boot loader might be corrupted, so go through this link: http://arduino.cc/en/Tutorial/ArduinoToBreadboard

You might required to re-burn the Boot file.

Will do it this evening, didn't have time yesterday, will post reply if working or not :)

To reburn the bootloader, do I only need to connect TX, RX ,Gnd and 5V pins or do I need to connect other pins as well? Because in the diagram it shows for the ATMEGA in a duemilanove, but the atmega in the nano is different, if I do need to connect more wires, then what other wires do I need to connect from my duemilanove board, with no ATMEGA, but USB connected and to nano board with ATMEGA.

That's only for to upload your test program i.e. Led Blink .

If you want to burn the bootloader. 1. do not remove microcontroller from arduino duemilanove 2. and connection as mentioned in diagram: 2.1: From arduino IDE tools>Burn bootloader > w/ Arduino as ISP

I connected it as you specified in the diagram, I chose Arduino duemilanove and then the correct serial port, and when I click burn bootloader, then I get this error "avrdude: stk500_getsync(): not in sync: resp=0x00" and as I click burn, then the RX LED on the Arduino duemilanove blinks 2-3 times quickly, and then just the pin 13 LEDs on both boards start blinking 1 second on and 1 second off, synchronized, this is because I think I uploaded the Blink example onto the duemilanove before...how can I burn the bootloader now?

I followed your instructions and used this link to help, and as I follow the steps on that link and use your diagram to connect, http://arduino.cc/en/Tutorial/ArduinoISP

This is the error I get :

avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

As I press burn bootloader, then the RX pin on the duemilanove blinks about 2-3 times and then nothing happens for some time and then the error comes up on screen...what do I do now?