Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:18 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CP2102 TTL-USB Bridge

Author Message
crackerjack

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 11:54am 18 Jan 2012
Copy link to clipboard 
Print this post

Hi, I recently picked up a couple of USB-UART (TTL level) boards based on the SilLabs CP2102 to interface the Maximite back to a PC via the Serial comm's functions, e.g.


Open "Com2:9600" AS #1
Print #1, 0
Close #1


I am fairly sure I have the hardware connected right:


Maximite Bridge
+------- -----+
| GND <-----> GND |
| PIN 19 <-----> TXD |
| PIN 20 <-----> RXD |
+------- -----+


...and I have TeraTerm open on the COM port my Device Manager says is the Silicon Labs CP210x USB to UART port (COM8) with the Serial port settings as Baud Rate=9600, Data=8 bit, No Parity, 1 Stop bit, No flow control.

I don't have a 'scope with me at present, so I'm guessing somewhat and I can't get any comm's happening.

I've also tried using COM1: from the MM (pins 15 as RX and 16 as TX, crossed over to the Bridge device) - no luck.

I even tried crossing the pins over to what seems like the wrong way (RX - RX, TX - TX) - mostly because I am desperate...

Any tips, experience, or insights offered will be most graciously received...

Cheers, CrackerJack.
 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 12:31pm 18 Jan 2012
Copy link to clipboard 
Print this post

Ignore the Maximite for the minute and plug the cable into the pc on its own.

Short out the tx and rx pins on the loose end and see if you can talk to yourself with your terminal software.

Once you now that works, then take the short off and connect it to the Maximite, then we can go from there.

Cheers

Rohan

Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 05:38pm 18 Jan 2012
Copy link to clipboard 
Print this post

^ what he said. A loopback cable is a good idea when stuck like this.

BTW, you might (read: do) want to be a bit careful about the voltage levels....

JohnEdited by JohnS 2012-01-20
 
crackerjack

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 12:55pm 19 Jan 2012
Copy link to clipboard 
Print this post

Thanks for the responses. I tested as Rohan suggested and all is good - loopback is working (local echo off on the terminal and I see what I type coming back). I had literally 3 minutes to test this. More when I get another three minutes....
 
crackerjack

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 08:39am 21 Jan 2012
Copy link to clipboard 
Print this post

Ok, I know this may not help anybody else, but for the sake of completeness, the problem is solved. As per Rohan's suggestion, I looped-back on the USB-UART bridge - all worked as it should. I tried connecting the Maximite again - still no luck. Got my oscilloscope out just to trace the waveform on the output from the Maximite - all seemed fine. Put the 'scope onto the pin marked TXD of the USB-UART while entering data from the keyboard with TeraTerm. No signal. Put it on the RXD pin and hey, there was the signal... So, it seems the pin marked RXD goes to the pin on the device Receiving. from the USB and the pin marked TXD goes to the pin on the device Transmitting from the USB. Counter-intuitive? Maybe, maybe-not - anyway... all fixed.

The USB-UART bridges were bought from ebay for a very small sum. They are cheap, but nifty little items in this day and age when a serial port on a PC is just not to be found.

Thanks again for the useful input Rohan and John.

Cheers, Lance.
 
rhamer
Senior Member

Joined: 06/06/2011
Location: Australia
Posts: 174
Posted: 09:30am 21 Jan 2012
Copy link to clipboard 
Print this post

  crackerjack said   Ok, I know this may not help anybody else, but for the sake of completeness, the problem is solved. As per Rohan's suggestion, I looped-back on the USB-UART bridge - all worked as it should. I tried connecting the Maximite again - still no luck. Got my oscilloscope out just to trace the waveform on the output from the Maximite - all seemed fine. Put the 'scope onto the pin marked TXD of the USB-UART while entering data from the keyboard with TeraTerm. No signal. Put it on the RXD pin and hey, there was the signal... So, it seems the pin marked RXD goes to the pin on the device Receiving. from the USB and the pin marked TXD goes to the pin on the device Transmitting from the USB. Counter-intuitive? Maybe, maybe-not - anyway... all fixed.

The USB-UART bridges were bought from ebay for a very small sum. They are cheap, but nifty little items in this day and age when a serial port on a PC is just not to be found.

Thanks again for the useful input Rohan and John.

Cheers, Lance.


Glad you got it working.

Your device sounds like it conforms to one of the 75000 versions of the rs232 standard.

Cheers

Rohan
Rohan Hamer
HAMFIELD Software & Hardware Solutions

Makers of the Maximite Expander.

http://www.hamfield.com.au
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 11:29am 21 Jan 2012
Copy link to clipboard 
Print this post

It may go back to the old "is it DCE or DTE" thing. Best ignored, especially once it's working!!

So many times I've wished every device was peer-to-peer without exception (and each end symmetrical, so no DCE/DTE issues, no master/slave, etc).

John
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024