Go Down

Topic: stk500_getsync error (Read 1 time) previous topic - next topic

TheLastMiner105

Hello guys, I been having a problem that has kept me at a stalemate for the past few weeks. I purchased an Arduino pro mini (5v/16MHz) for a project. I have been trying to program it so I made some test code, just to turn on a led as a sign it is working, I tried my Arduino Uno as a programmer but I got a sync error that doesn't work so I got a USB programmer. when I insert the code, I run into a sync error. I have tried what I know. Anyone know anything to confirm it works and where the problem is located? Thanks.


avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x29

pert

How do you have that USB serial adapter wired to your Pro Mini?

TheLastMiner105

How do you have that USB serial adapter wired to your Pro Mini?
GND to GND
3.3V to GND (unsure why but putting it together any other way doesn't add up)
5V to VCC
TX to RX
RX to TX
RST to DTR

https://ibb.co/y0Np22z

pert

putting it together any other way doesn't add up
What do you mean by "doesn't add up"?

TheLastMiner105

What do you mean by "doesn't add up"?
The pins don't connect any other possible way.

pert

I took a look at the USB to TTL serial adapter you bought and I understand now. It's a shame because they came so close to using the standardized "FTDI header" pinout used by the Pro Mini, but for some reason they replaced the CTS pin with a 3.3 V pin. I think it's a really bad idea to connect the 3.3V pin on the adapter to ground because that's a dead short. Best case scenario, there is some protective circuitry in the CH340 that shuts it down when 3.3 V is shorted. Worst case scenario is the short damaged the CH340. Either could be the cause of the error you're getting.

My advice is to bend the 3.3 V pin so that it won't go into the holes on the Pro Mini and cause the short.

From your picture, it's not clear to me whether you have soldered the USB to TTL serial adapter or if you just stick the pins in the holes. You can make the latter work, but you should put press the USB to TTL serial adapter to the side so that all the pins are pressed into firm contact with the sides of the plated through holes on the Pro Mini to get a good contact. You won't get a good contact on all pins if you just stick them in the holes. Even with the pressure, you might get occasional failures. Better is to get a 6x1 female header (or cut down a longer female header to 6x1) and solder it on the Pro Mini. That will provide a reliable connection.


If you ever buy another USB to TTL serial adapter, I recommend you get one which uses the standard "FTDI header" pinout:
  • DTR or RTS
  • RX
  • TX
  • VCC
  • CTS
  • GND

DrAzzy

#6
Jul 23, 2019, 12:07 am Last Edit: Jul 23, 2019, 12:25 am by DrAzzy
@pert - that assumes that "RST" is a typo of "RTS".

If "RST" is something other than RTS or DTR, that won't work. Do we know that "RST" is actually RTS or DTR, not something else?

I recommend these adapters - available on aliexpress, ebay, probably banggood. The defining factors are black PCB, and that little voltage switch. I find them on ebay by searching for "ch340g 6pin", and then identifying the good kind from the pictures (the ones that show a jumper on the end are not usable, as they don't break out DTR or RTS)

https://www.ebay.com/itm/261460684649 - no specific endorsement of this vendor, there are many who sell identical adapters at comparable prices.

There's also a CH340G adapter with the same pin order, green PCB, voltage switch, and a micro USB port (search ch340g micro, and wade through the many arduino clones to find the one I talk about) - here's an example of those, again no specific endorsement of that listing: https://www.ebay.com/itm/202624350255

I pair them with a 6-pin F to F dupont jumper, and male pins on the pro mini (the black ones are dreadfully inconvenient plugged directly into the stationary USB port on your computer without a cable between that and the pro mini - one can of course use a USB extension cable, but the quality on such cables is often pretty poor, and I don't have a shortcut to recognize good ones) - i'd put a 6-pin female header onto the green ones, since the micro USB cable would make it easy to move to where I want it, except I haven't found anyone selling the green boards without male pins already mounted.

Edit: added my recommendations on CH340G serial adapters.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

pert

I noticed that too, and even checked the CH340 datasheet to see if it had a pin named RST, which it doesn't.

TheLastMiner105

I ordered the ch340g, I will update you guys when I get it.

TheLastMiner105

When I plugged it into my pc, it flashed a led and now it's not doing anything, I believe the module fried it'self. I asked the seller about it :/ It does appear it will work if it doesn't happen again.

TheLastMiner105

Hi guys, I got the new one and had to sort out school work. It works, kinda. It's not showing the com port. What should I do to troubleshoot it? Thanks.

pert

Which operating system are you using?

TheLastMiner105

Windows 10, it worked with my Arduino Uno. If I need, I have a computer that has kali and mac os in case that's needed.

pert

Do you see any new device appear in the device tree of Windows Device Manager when you plug your CH340G module into your computer?

TheLastMiner105

No, I tried with and without the pro plugged in.

Go Up