not in sync error

Hi All,

I have an Arduino ethernet with a DFRobot I/O expansion shield. The issue I am running into is that in order for me to upload my code I have to disconnect everything and remove the shield, then upload. If I do not do this each and every time I change the code then I get "avrdude: stk500_getsync(): not in sync: resp=0xe0". I've done a little reading and haven't found anything that has helped.

I feel I'm going to go nuts and/or break my setup from connecting and disconnecting the shield over and over to get it to work.

Any input would be most appreciated!!



We've have countless unanswered posts about people receiving messages such as "avrdude: stk500_getsync(): not in sync:", "avrdude: stk500_recv(): programmer is not responding", etc. The website really needs a FAQ about this.

Also, what else happened? Was the code able to upload?

Yep, the code works fine when I upload. When I’m connected the serial monitor also works fine. It just seems to not like having the shield connected when trying to upload, which would be no big deal if I weren’t constantly tweaking and testing the code. I have to unplug everything, remove the shield, plug back in and upload, then unplug, reattach the shield, plug back in and go.

It looks like the DFRobot I/O expansion shield has a SP485CN IC that is connected to the Arduino RX and TX pins. This is probably what is interfering with the upload when the shield is connected. It looks like there are some selections jumpers on the shield that could be used to disconnect the RS485 from the RX and TX pins. I would try the jumpers to see if you can come up with a config that works for you.

Are you thinking I would just adjust the jumpers while it's on to disable that portion so I can upload? Any clue which jumpers? I currently have it setup for RS485 communications.

I would just remove the RS485/RS232 selection jumpers while uploading and then put them back when you are done. If I read the schematic correctly, this should disconnect the SP485CN IC from the RX and TX pins.

Louis Davis is correct. Remove the jumper will disconnect TX/RX to RS485 and any serial device on IO Shield and this allows you uploading code to Arduino.


How about the data transmission through RS485 A & B ?
Is it working properly ?

I have a problem with the bytes. I send 0x01 from Arduino using Serial.write and I receive 0x7F in PC. I don’t know how to correct it. Is it something with Arduino byte order ?