Go Down

Topic: TTL UART CP2102 Converter [SOLVED] (Read 10437 times) previous topic - next topic

g0bl1n

Dec 22, 2012, 08:45 am Last Edit: Dec 22, 2012, 06:52 pm by g0bl1n Reason: 1
I know there are a bizilion USB to TTL converters out there.  I bought some of these to program some Pro Mini's (328 5v 16 MHz).

I haven't had any luck programming with these on any type of Arduino (tried an Uno).  I keep getting "avrdude: stk500_recv(): programmer is not responding" error.  I made sure to select the right board type and the programmer is showing up as a serial port.

I've been searching the forums for anyone that has used the type of converter I've bought but I haven't found any topics.

I'm using Ubuntu 12.04.  I get blinking lights on the programmer.  I know the Arduinos I have are good because I can program them with a FTDI programmer I got from Sparkfun.

Current Setup (I've tried switching tx/rx pins)
SERIAL           Arduino
RST                DTR
TXD                RXI
RXD                TXO
GND               GND
5V                  VCC

Anyone used these before?  Anything special you had to do to get these programming?

Thanks for any help!

P18F4550

I dont think RST on these is Arduino RST, it's a reset for the ttl converter, I read that on the forum somewhere, to program my arduino i press compile and as soon as the sketch size apears in the IDE i press reset on arduino and the sketch loads

Erni

I have tried manual reset as P18F4550 describe.
Another possibility is to connect a 0.1uf cap from DTR to reset on the Arduino


g0bl1n

Ok I see what you mean, if I hold down the reset on the Arduino and click upload and then release the reset button it programs fine.  Adding a capacitor between DTR and RST seems to do the trick!

Thanks for the help!

bperrybap

Pin 9, the RST pin on the cp2102 is the reset input to the chip.
This is more than likely what is is hooked to the header pin labeled RST.
To be sure you could verify it against the datasheet.
https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf
See if the RST header pin is wired to pin 9 (RST) of the chip.
See page 7 of the chip spec to see the pinouts for the chip.

It is unfortunate that the designers of so many of these cp2102 boards have done this
as there is no real need to put this input signal on the header.
Perhaps they were dyslexic and thought they were hooking up the RTS signal
which would have been much better or perhaps they simply don't understand
what this signal is used for.

Other cp2102 boards like this:
http://www.ebay.com/itm/USB-2-0-to-UART-TTL-6PIN-Module-Serial-Converter-CP2102-NEW-/180925940394?pt=US_Floppy_Zip_Jaz_Drives&hash=item2a2006c2aa
provide breakout for the control lines and you can re-wire things to use RTS or DTR.
I have several of these  cp2102 boards and they will work with auto-reset if
you re-wire it to use DTR or RTS.
(I recommend using RTS as it offers some benefits over DTR).

For your board, if the header pin is the cp2102 RST input signal (which it probably is)
I'd recommend not wiring it up to anything as auto-reset to the AVR will never work and
there is no need to reset the cp2102, including when the arduino is reset.

--- bill

bperrybap

Just one followup.
If you are really ambitious,  you could get auto-rest to work with this board.
You have cut the trace from the cp2102 to the RST header pin
and then solder a tiny wire from the RST header pin to pin 24 (RTS) or pin 28 (DTR) on the
cp2102.
Then if you have a cap between this "RST" header pin and  the RESET pin on the AVR
auto reset will work.
The pro mini should already have the cap between the pin it labels as "DTR" pin and the arduino
RESET pin.

--- bill

Paul__B

Just got caught on that one myself, after buying a module along with a "Dupont" cable with not one, but two faulty crimps, so having to follow an extensive process to get it working properly.  Fortunately, I had a working system and was just swapping a five pin (actually, PL2303) adapter to a six pin one with the intent to make the download process "automatic".

And that modification works beautifully - cut the trace from "RST" to pin 9, solder the "RST" pin to the RTS "thru".  I used a piece of self-fluxing enamelled wire, almost invisible on the board.

This is clearly a gross design blunder in these "knock-off" boards which appear to follow about two or three designs but are marketed by a myriad of vendors, as are the Arduino Pro Mini boards themselves.  The original designs such as the Sainsmart (FTDI chipset) appear to be problem-free and the sixth pin is labelled not "RST" but "RTS" - as it should be.

Candice

Just to add to this thread, I posted the other day on the "general electronics" part of the forum that there are some Chinese sellers on ebay now selling working CP2102 usb serial converters (no DTR mod required).  They look like this:



You just have to trawl through ebay until you find one, and because they are new, they're not as cheap as the modable converters (I've seen them for between $4 and 8$).  Be careful when looking for them as there a similar converters which looks almost the same but still requires the DTR mod.  Here are pics of the two converters side by side:




Paul__B

What these "newer" converters actually provide is a genuine implementation of the pinout of the FTDI FT232 leads which directly match the interface connections of the Mini Pro and similar devices.

This in effect "sacrifices" the 3.3V pin for the CTS signal which is in fact an input to the USB adaptor and connects to a second ground line on the Arduino device as it is not otherwise useful in this application (CTS is simply ignored by the software).

Personally, as the "faulty" versions are readily modified and cost less than US$1.50 (for the PL2303 version which is admittedly more difficult to modify; or US$2.11 for the CP2102), I tend to "run" with that. :D

bperrybap

RTS is a much better pin to use for Auto-reset than DTR.
The days of needing to use DTR for auto reset have long passed. I wish
everyone would stop using it and switch their designs over to RTS.
Using RTS allows the option of opening the serial connection
without resetting the target while DTR does not.

--- bill

sej7278

i use this one from ebay, just soldered a pin header onto the DTR pad, no tracks to cut or anything, currently under $3

Candice

@Paul__B

Quote
Personally, as the "faulty" versions are readily modified and cost less than US$1.50 (for the PL2303 version which is admittedly more difficult to modify; or US$2.11 for the CP2102), I tend to "run" with that.


Hello to a fellow New South Welshperson.  Unfortunately, I'm living in the middle of nowhere in NL at the moment, and buying ebay stuff that comes from China to the EU seems to be hit and miss - dependent on the price of the item.  What I've noticed is that Chinese ebay sellers with the lowest prices tend to have massive amounts of negatives and neutrals for non-delivery.  I've risked it a couple of times and indeed the items never arrived or took 6 weeks to get here.  I got refunds for the non-deliveries, but the issue is the amount of time you lose waiting for something that is never going to arrive.  My father back in AU has better luck with ebay buys/deliveries from China (timewise), and of course AU is closer to China geographically so that's to be expected.  But for me over here, parsimony has a time dimension.  =(

The other thing is that the modules that I posted above came into my possession as a result of an ebay bait and switch.  The modules that I ordered from the Chinese ebay seller were the "faulty" ones (the usual CP2102 "Baite" modules that a lot of posters here seem to be modding because of the ease of soldering from the DTR pad that is provided) BUT what I got was the the modules pictured above (and I didn't have to pay $4-$8 to get 'em ;) ).  It was a pleasant surprise that I only had to mod one module.

I have also found that you release the button on the arduino when the led flashes on the CP210x  I am using an older version of the CP210x and this took several tries to figure out, but it is now working correctly.

Go Up