9
\$\begingroup\$

I'm trying to build this Ambient lighting for PC (original link; updated link). This worked flawlessly on my Arduino Uno. My next step was to make it using "Arduino on a breadboard". So I bought a blank ATmega328 chip and burned the Arduino bootloader (for the board "Arduino Duemilanove w/ ATmega328") onto it using the Arduino IDE and USBasp; and I know this has been loaded properly as this ATmega chip works fine on the Uno.

Then I made the USB-to-serial converter using FT232RL ; but its drivers didn't install on my PC (Windows 7 x64). I suspect I overheated the surface-mount FTDI chip and killed it while hand-soldering it.

So, I've kept it aside, and got USB-to-serial converter bridge (front; back): (Sorry for the poor pictures) I used an additional ST232CN on my breadboard, to convert the voltage levels from RS232 to TTL, as shown in this page. And this works fine, as I verified from a loopback test. And I've connected pin 9 of ST232 to pin 2 of ATmega, and pin 10 to pin 3.

When I tried to upload a blink example from Arduino IDE, I get this error:

Binary sketch size: 1026 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00

When I do the verbose upload (Shift+Upload), I get this error/message:

avrdude: usbdev_open(): did not find any USB device "usb"

Also, I tried adding 1k pull-up resistors at pins 2 and 3 of ATmega, but didn't help. So I guess the problem now is in the serial communication from the ST232 to ATmega? And is there any special connection to the Reset pin of ATmega? I've pulled it up to 5V with a 10k resistor.

\$\endgroup\$
13
  • \$\begingroup\$ A schematic and or picture of your breadboard setup would help. \$\endgroup\$
    – sptrks
    Commented May 1, 2012 at 6:24
  • 3
    \$\begingroup\$ Did you reset the chip just before, at the same time as, or just after commanding the upload? Whenever I've gotten the 'not in sync' error, it was related to that relative timing. For my breadboard, and Eclipse/AVRDude, ungrounding the reset pin just before or just as I click the upload command is the right timing. But also check that your PC really does see the adapter when you plug it in. \$\endgroup\$
    – JRobert
    Commented May 1, 2012 at 17:42
  • 1
    \$\begingroup\$ @potato_in_my_ear - The proper format for posting a solution is not an edit but an answer. Look below, and you'll see a box titled "Your answer" in which to enter it. After entering, people will vote on your answer, and you can 'accept' it by pressing the check mark to the left of the answer. \$\endgroup\$ Commented May 1, 2012 at 21:14
  • 1
    \$\begingroup\$ @potato_in_my_ear: I'm glad that helped. You're a gentleman and a scholar - I'll make my comment an answer. \$\endgroup\$
    – JRobert
    Commented May 2, 2012 at 15:58
  • 2
    \$\begingroup\$ The solution is for people to stop providing answers in comments! \$\endgroup\$ Commented May 2, 2012 at 16:55

6 Answers 6

7
\$\begingroup\$

Whenever I've gotten the 'not in sync' error, it was related to my just missing the reset timing (or forgetting the reset entirely!). For my breadboard, and Eclipse/AVRDude, un-grounding the reset pin just before or at the same time as I click the upload button is the right timing. But also check that your PC really does see the adapter when you plug it in.

Later arduino boards are built to reset whenever a serial connection gets made, and programmatically by the bootloader. This blog article describes how it works, and even more interestingly, how to hack it onto earlier boards. It shouldn't be too hard to put it on a breadboard if you wanted to. The chip needs to have a compatible bootloader, of course (which you've already put into yours). For breadboards, I just do the reset-button / mouse-click dance.

\$\endgroup\$
2
  • \$\begingroup\$ I found some one saying that you can get the avr tool chain to do the reset itself by editing avrdude.conf; here (in comments). But I'm not sure how to do that. Can you help. I hate pressing reset all the time.. \$\endgroup\$
    – Anubis
    Commented Nov 22, 2012 at 4:47
  • \$\begingroup\$ This will require hardware support on the Arduino board or breadboard that later Aduino's have built-in; code alone can't do it. It's based on a capacitor from the serial DTR to the reset and a reset pull-up. If you have a older one or a breadboard, you'll need to add it. This EE StackEx question and the blog article I quoted should point you in the right direction. \$\endgroup\$
    – JRobert
    Commented Nov 28, 2012 at 2:18
2
\$\begingroup\$

As @JRobert said in the comments, the right timing of grounding and ungrounding the reset pin on ATmega did the trick. Keep grounding the reset pin of the ATmega when you click "Upload", and just as it shows "Uploading", unground it.

\$\endgroup\$
1
  • \$\begingroup\$ Just got an arduino mini and I knew that I needed to press the reset button to upload code, but I couldn't find out when!!! This worked for me. Thanks. \$\endgroup\$
    – Sponge Bob
    Commented Aug 16, 2012 at 16:50
0
\$\begingroup\$

I had the same errors I have seen posted on several sites RE: Arduino message "avrdude: stk500_getsync(): not in sync: resp=0x00" or similar.

I found that if I remove whatever is patched into D0 ([D0]DIGITAL pin Zero, farthest away from USB and Power jacks, also reads "RX").

I tried two different computers and got same errors and found out that if: 1- I remove the wire from or open the circuit to [D0] 2- Upload to Arduino 3- re-patch the removed wire or close the open circuit to [D0]

I have only encountered that error when I upload and this is my solution. for now.

Hope it helps.

Feels good to finally give some useful info back to a community!

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Response is a bit unclear: The sentence beginning "I found that if I..." is incomplete, not sure what you are trying to say there. Please edit, thanks. \$\endgroup\$ Commented Nov 1, 2012 at 5:22
  • \$\begingroup\$ This answer refers to having conflicting circuitry connected to the atmega hardware serial pins. \$\endgroup\$ Commented Jul 5, 2013 at 22:57
0
\$\begingroup\$

To fix the "avrdude: stk500_getsync(): not in sync: resp=0x00" error. Just install FTDI Driver version 2.8.24.0. There is some the problems with the new driver v2.8.28.0.

\$\endgroup\$
0
\$\begingroup\$

This fixed my problem, go to Drivers and Setup, replace Boards.txt in arduino IDE...

I have arduino MEGA 2560 R3 and i had the same problem

avrdude: stk500_getsync(): not in sync: resp=0x00

http://arduino.cc/en/Main/ArduinoBoardADK

\$\endgroup\$
-1
\$\begingroup\$

While uploding the codes from Arduino IDE on your computer, please pull out Arduino card's RX pin 0. You will get success code uploading. Plug out RX pin and try. Or, you may be put (maybe) bluetooth's RX to Arduino's RX so TX's are connected each other.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.