Author Topic: RS232 RX vs TX  (Read 5938 times)

0 Members and 1 Guest are viewing this topic.

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
RS232 RX vs TX
« on: August 03, 2017, 03:54:45 am »
I've gotten confused since my Trimble GPSDO module has something resembling RS232 signals that seem contradictory.

I measure a signal on it's RS232 pin 3, but I guess that depends on which connector you are looking at. It is a female connector and I am counting from top left (large side, well it's the center pin  :-X). That seems consistent with some images I've seen. Data is supposed to come out of that.

Now, I trace that back to my Trimble board where that pin is labeled RX. I'm expecting it to be labeled TX, but I got that info from this site and maybe they mislabeled it, or I am missing something fundamental:

http://tipok.org.ua/node/53


That signal traces to a Sipex 3232 chip pin 13, which is R1 IN. Pin 12 is R1 OUT and it has corresponding TTL pulses.
(https://www.exar.com/ds/sp3222eb_sp3232eb_106_022316.pdf)

Anyway, my RS232 output is coming from Sipex pin 13 R1 IN.

Top it off the data looks as thus.

 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11880
  • Country: us
Re: RS232 RX vs TX
« Reply #1 on: August 03, 2017, 03:58:47 am »
It's not a question of whether it is a male or female connector (standards vary), it is a question of whether the device is a DTE (data terminal equipment) or a DCE (data communication equipment). Depending on which it is, the pin numbers for RX and TX are swapped. (Basically, TX on a DCE connects to TX on the DTE, and RX connects to RX. But if you connect a DTE to a DTE or connect a DCE to a DCE then you have to cross over TX and RX -- use a "crossover cable").
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: RS232 RX vs TX
« Reply #2 on: August 03, 2017, 04:27:58 am »
I make the pin you've indicated 33, which is, as listed, RX. You want 34.
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #3 on: August 03, 2017, 05:39:28 am »
It's not a question of whether it is a male or female connector (standards vary), it is a question of whether the device is a DTE (data terminal equipment) or a DCE (data communication equipment). Depending on which it is, the pin numbers for RX and TX are swapped. (Basically, TX on a DCE connects to TX on the DTE, and RX connects to RX. But if you connect a DTE to a DTE or connect a DCE to a DCE then you have to cross over TX and RX -- use a "crossover cable").

Doesn't this imply then that the Sipex chip R1 IN and R1 OUT are interchangeable? I said that R1 IN has data coming out of it because it connects to an RS232 port that is not connected to anything.

I make the pin you've indicated 33, which is, as listed, RX. You want 34.

I just want to understand why there is data coming out of that pin when it's connected to an input of a serial ttl-RS232 converter chip? I just stick my scope probe on there and see data. Why? If you mean to imply that I should see data on pin 34, then I'd agree with you, but I don't see that.

More editing...  :-//
« Last Edit: August 03, 2017, 01:16:57 pm by metrologist »
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: RS232 RX vs TX
« Reply #4 on: August 03, 2017, 01:53:50 pm »
Either you're measuring 32 (which is ground), or it's not transmitting - trace 34 back and you'll find it goes to T1OUT or T2OUT on the line driver. 34 is to the left on your photo.

What you're seeing on 33 is probably coupled in from something else, they're very short pulses - you should see held levels with RS232, not pulses. The very fact that it goes to R1IN says it's a receive line - it can't transmit.
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #5 on: August 03, 2017, 03:12:31 pm »
Yes, coupled in from somewhere else? There is an interface board that the ribbon cable connects. I have no idea where that data is coming from, though it's rate and duration matches what I would expect from Trimble's TX pin 34. There is no data on either side of pin 33, so what produces that signal is a question?

Maybe the Trimble unit has a fault and it's putting that signal on the Sipex chip R1 OUT. There are very short corresponding TTL pulses on the Sipex R1 OUT pin. I don't know if those pulses originate from the Trimble processor or if the Sipex chip is just passing through what's on R1 IN (which seems likely and would also seem to risk damaging the processor or whatever feeds the Sipex chip).

If that signal is coming from the interface board, I'm still confused because there does not seem to be anything on that board to produce this kind of signal. There is no processor to generate that kind of signal.

But, just to be clear on the topic subject, this is a trimble GPS device. Does that make it a data terminal or data communication device, and which RS232 pin should be emitting data?

Also, what if you are connecting two computers together, which one is which? They both would seem to be DTE, but of course you would use x-over cable to connect.

And since I may have some attention, how to remove that ribbon cable? I forget if the lock needs to slide out or be levered up to release. I know I've busted one before doing it wrong  :palm:

 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: RS232 RX vs TX
« Reply #6 on: August 03, 2017, 03:19:08 pm »
I'm not sure where it's coming from, but that's not normal signals and it's a receiver input pin, so.. Look for signals on T1IN and T2IN.

Two computers would be both DTEs and a null modem cable. I don't know if this can be described as a DTE or a DCE.

That latch tilts up - it can't slide in either direction. It should just pop gently up with a fingernail.
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #7 on: August 03, 2017, 04:03:26 pm »
That makes sense, I'll poke on the 2nd channel pins. Maybe the TX line got grounded.

Thanks!
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2271
  • Country: ca
Re: RS232 RX vs TX
« Reply #8 on: August 03, 2017, 04:16:55 pm »
Every RS-232 connector I've seen is labelled with the pin numbers.  Look close, the numbers are tiny.  The numbers are on both male and female and on the connection side and the solder side.  IDC connectors aren't labelled on the IDC side, of course, since you can't see that side.

I get a headache trying to figure out DCE and DTE.  Instead, I use the rule:  Connect volts to no volts.  You've got pairs of leads such as Tx and Rx, RTS and CTS, DSR and DTR.  The 'output' lead of the pair has voltage on it - maybe continuous, maybe toggling between a positive voltage and a negative voltage.  The 'input' lead of the pair never has voltage on it.  Well, maybe a very small voltage, but you get the idea.  So just remember that you can't connect two 'voltage leads' or two 'no voltage' leads.  You always connect a 'voltage' lead to a 'no voltage' lead.

Works for me.

Ed
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #9 on: August 03, 2017, 05:00:47 pm »
Which RS232 pin on this Trimble unit should have data coming out of it? Right now it's pin 3.
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2271
  • Country: ca
Re: RS232 RX vs TX
« Reply #10 on: August 03, 2017, 05:10:17 pm »
Which RS232 pin on this Trimble unit should have data coming out of it? Right now it's pin 3.

The idea of 'should' is meaningless for the reasons IanB stated above.

Look at pins 2 and 3 on your PC connection (maybe a USB to RS232 converter) and on your GPSDO.  One of the pair on each device will have a voltage on it in the range of 5 to 10 volts.  Usually negative voltage.  Connect that lead to the lead on the other side that has no voltage on it.  Of course, you also have to connect pin 5 to pin 5 for ground.

Ed
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #11 on: August 03, 2017, 05:47:12 pm »
There must be a standard? Trimble and other companies make off the shelf units like this (Thunderbolts, etc.). I cannot imagine everyone first has to measure for voltage and inconsistently use straight or null cables to match individual devices.

Of course, these seem like specialized devices and not consumer type "modems", because they have PPS (and sometimes 10M?) on the pins. I do know that the use of a straight vs. null cable has been the source of much consternation when setting things up.

When I got my device I was not sure which pin was which, even though RX and TX is marked, it's too blurry to read with confidence, and even then I was not sure if RX meant to connect that pin to the receiver on my computer. I probed it because I was not even sure if the levels were RS232 or TTL.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11880
  • Country: us
Re: RS232 RX vs TX
« Reply #12 on: August 03, 2017, 06:08:21 pm »
Device manufacturers often provide a compatible cable with their device.

Otherwise, I think almost everything is a DTE unless it is actually a modem. Therefore a cross-over or null modem cable would most of the time be the correct cable unless you are plugging into a modem. (I think.)
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2271
  • Country: ca
Re: RS232 RX vs TX
« Reply #13 on: August 03, 2017, 06:36:20 pm »
The problem with RS-232 is that the standards are *too* flexible.  They can be interpreted in ways that are mutually incompatible.  Long ago I quit worrying about what it should be.  I just want it to work!

Ed
 
The following users thanked this post: Tom45

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #14 on: August 03, 2017, 09:18:39 pm »
Alright, I can go with that. Both my PC and my GPSDO will be sending data out on RS232 pin 3.

Now to track down why my device has data on its RX pin when there is no transmitting device connected to it.

Thank yous.
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: RS232 RX vs TX
« Reply #15 on: August 03, 2017, 09:35:53 pm »
You are aware that the RS/EIA/(what ever)-232 do have inverted logic? Its really nice that it is still around though, so simple to hook up (with 9V battery and string of wire almost/morse transmit of computers.  ^-^) to devices. Here is rather nice write up on the subject. http://www.radio-electronics.com/info/telecommunications_networks/rs232/signals-voltages-levels.php
« Last Edit: August 03, 2017, 09:39:49 pm by Vtile »
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: RS232 RX vs TX
« Reply #16 on: August 04, 2017, 08:40:42 pm »
When you scope that signal, is anything connected?

it's also possible that a short in the external wiring is mixing two versions of the same data - effectively cancelling out everything but the edges.
Don't ask a question if you aren't willing to listen to the answer.
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #17 on: August 04, 2017, 11:19:38 pm »
I was tracing it all out. I discovered that the signal from a DUT TTL UART goes to a Sipex 2323 chip on a daughter board, and that sends RS232 level data back to the DUT RS232 UART as well as out to the RS232 input pin 3.

There is a goof somewhere, short, misload, or fab layout problem. There is no data out of the RS232 ready UART of the DUT. Maybe the loopback burned something out :-//

Anyway, RS232 port label on the device says P3 is RX and pin 2 is TX. Pin 3 has the spikes.

Beam me up, Scotty!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11880
  • Country: us
Re: RS232 RX vs TX
« Reply #18 on: August 05, 2017, 02:29:28 am »
Anyway, RS232 port label on the device says P3 is RX and pin 2 is TX. Pin 3 has the spikes.

Interesting. According to the reference linked below, pin 3 would be RX on a DB25 male connector, but pin 3 would be TX on a DB9 male connector. I never knew they were inconsistent like that.

http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html#anchor1155222
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #19 on: August 05, 2017, 02:54:20 am »
I've seen that image. I am feeling like you could put a fork and a spoon in front of me and I could not tell the difference. I'd have to see and measure.  :scared:
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2271
  • Country: ca
Re: RS232 RX vs TX
« Reply #20 on: August 05, 2017, 03:39:38 am »
Have you carefully inspected the interface board under strong light and magnification?  Look for bad etching that causes shorts between leads or maybe broken traces.

Did you look at pin 2 of J5 to see if there's a clean signal or at least negative DC on it?

Ed
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #21 on: August 05, 2017, 01:19:32 pm »
The interface board looks very good, it looks new and has large visible traces. Most of the IC's look like they came off a process, but one buffer IC looks like some hand rework and a few components look to be removed, and some were never loaded.

I have a B&L 7-30X benchtop stereo microscope that I use for most soldering and inspection, and a headband magnifier for most hand work and reading fine print.

J5 on the Trimble board? I did not look there as I did not know what the connector was for, but now I look on the Symmetricom thread and see TheSteve is using that port for his comm port. I'll check it, but it is not used in my unit. Would that just tie into pins 33/34 on the ribbon connector? That is UART2 and the TX pin is dead there.

I traced UART3 to the interface board to a Sipex 2323 chip and then back to UART2 and to the RS232 device port, both RX and TX lines. I do not think UART2 and 3 should be connected this way.

I am suspecting there are different versions of this board to interface with different GPS modules and the wrong one was paired. I don't really know, but from the consumer side it does not communicate and you see the pulses in my image on the RS232 port labeled RX pin 3.
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2271
  • Country: ca
Re: RS232 RX vs TX
« Reply #22 on: August 05, 2017, 05:43:54 pm »
J5 on the Trimble board? I did not look there as I did not know what the connector was for, but now I look on the Symmetricom thread and see TheSteve is using that port for his comm port. I'll check it, but it is not used in my unit. Would that just tie into pins 33/34 on the ribbon connector? That is UART2 and the TX pin is dead there.

I don't know if they tie together or not.  I've just got the Trimble board and J5 is the only output I use.  Usually, it seems that BG7TBL just routes RS-232 ports from the GPSDO board to the connector.  But in this case, he used a Sipex 2323 chip.  That suggests that the port on the ribbon connector is *not* tied to J5 since J5 is already at standard RS-232 levels.  Perhaps he decided that since he had to use the ribbon connector for power, he might as well use it for everything.

Ed
 

Online metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2199
  • Country: 00
Re: RS232 RX vs TX
« Reply #23 on: August 17, 2017, 11:32:36 am »
I got another one of these units and I have the exact same signal as shown in my original post here. I have the same signal on J2 pin 1. It's +/-5V and looks like it could be good data if the pulses were stretched out, or rather than going back to zero if the pulse hi/lo were connected...

But the data is still on the RX pin and is actually coming from one of the other uart's from the trimble 50 pin connector, pin 37.

from the website I linked:
36 -- UART3/Debug RxD ??? Voltage: 3.3V TTL
37 -- UART3/Debug TxD (57600 8N1) binary protocol, each 2 seconds bytes that seen as on "TOD EN" command are sent using this port. Voltage: 3.3V TTL. Transfer starts 70ms after PPS pulse. It's duration is 8ms.

So, that Tx routes to a Sipex converter and comes out to a cap. looking like proper data, but after the cap it's these spikes and is being routed back into the trimble RX pins, both the 50 pin header pin 34 and J5 P1, and that is where I would expect to send data from the PC to the Trimble board. ?

J5 Pin 2 and pin 34 (UART2 TxD HIGH VOLTAGE, ready for COM-port!) has -5V, about 200mV of jagged ripple.

I do not think this is a BG7TBL product, but the case is very similar or the same. I didn't think I was nuts but this sort of stuff makes me wonder.  :-//

I believe if I pull the caps from the the Sipex interface, the RS232 port connects properly to the 50-pin header uarts that it should, but there is still no data coming out of the Trimble board there. I also tried pressing the MACT button a few times and monitor during reboots and after a long sit with the ACT led blinking slow and fast.
« Last Edit: August 17, 2017, 08:04:04 pm by metrologist »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf