Author Topic: RS232 DTR and RTS pins  (Read 3878 times)

0 Members and 1 Guest are viewing this topic.

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
RS232 DTR and RTS pins
« on: February 07, 2021, 10:02:48 pm »
I'm using the DTR- pin4 and RTS- pin7 pins to control some radio keying and for RTTY "FSK" 
on my 3 com-ports in my PC I can't get the RTS line to go high it is at 0v the DTR pin works fine I can switch that

Running Windows 10  I have tested the RTS line with wsjt-x, MMTTY and CwType  this has all worked before.
« Last Edit: February 07, 2021, 10:40:03 pm by mkube396 »
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: england
Re: RS232 DTR and RTS pins
« Reply #1 on: February 07, 2021, 10:26:03 pm »
DTR is on pin 4, not pin 2

I suspect that you may be reading pin numbers right-to-left instead of left-to-right.

This would mean that RTS is on what you think is pin 8, but is actually pin 7
 

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #2 on: February 07, 2021, 10:41:57 pm »
DTR is on pin 4, not pin 2

I suspect that you may be reading pin numbers right-to-left instead of left-to-right.

This would mean that RTS is on what you think is pin 8, but is actually pin 7

that was a type O DTR is on pin 4 every thing is on the right pin..
still not getting a high single on 7
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: england
Re: RS232 DTR and RTS pins
« Reply #3 on: February 07, 2021, 11:03:09 pm »
That is odd then.

Pin 7 should be about -9 Volts relative to pin 5 when no terminal software is running.
Pin 7 should be about +9 Volts relative to pin 5 when RTS is asserted.
Pin 7 should never be 0V while the PC is powered.

All I can think of is that maybe your cable is faulty, not fully wired, or not wired 1 to 1.

... or are you measuring voltage at the rear of your PC?
« Last Edit: February 07, 2021, 11:06:46 pm by hexreader »
 

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #4 on: February 07, 2021, 11:36:04 pm »
That is odd then.

Pin 7 should be about -9 Volts relative to pin 5 when no terminal software is running.
Pin 7 should be about +9 Volts relative to pin 5 when RTS is asserted.
Pin 7 should never be 0V while the PC is powered.

All I can think of is that maybe your cable is faulty, not fully wired, or not wired 1 to 1.

... or are you measuring voltage at the rear of your PC?

I am checking it right off the 3 ports I was some how hoping this was a windows 10 Problem..  on DTR I get +/- 5v and on RTS I have 0 it is strange.
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: england
Re: RS232 DTR and RTS pins
« Reply #5 on: February 07, 2021, 11:44:13 pm »
I agree that this is strange.

I think I am out of ideas now.

I have known two types of "motherboard to D9" ribbon to be used, but I seem to remember it was very obvious when I had the wrong ribbon connector.
 

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #6 on: February 07, 2021, 11:48:54 pm »
I agree that this is strange.

I think I am out of ideas now.

I have known two types of "motherboard to D9" ribbon to be used, but I seem to remember it was very obvious when I had the wrong ribbon connector.

yeah i'm using an add in PCIe with 2 ports and the one off the mother board  :o :-// :palm:
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: england
Re: RS232 DTR and RTS pins
« Reply #7 on: February 08, 2021, 12:06:41 am »
Makes no sense to me  :(

The voltages that I measure on motherboard COM port are:
1 0 
2 0
3 -11
4 -11
5 gnd
6 0
7 -11
8 0
9 0

Plug-in card shows the same results, but -5.8 volts instead of -11

0 Volts is not really zero volts, but floating input that happens to float at about zero volts
« Last Edit: February 08, 2021, 12:08:25 am by hexreader »
 

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #8 on: February 08, 2021, 11:45:51 am »
well I it started working last night There is some software that is Messing up the port on my PC but I have no clue what it is just yet..  it is leaving the DTR pin alone but messing up the RTS pin.

right now if com3 stops working com 4 will work till it wont. then ill plug it in to com 3 and so on.  :-DD
 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 234
  • Country: gy
Re: RS232 DTR and RTS pins
« Reply #9 on: February 08, 2021, 01:16:14 pm »
Windows can be configured to use hardware flow control, software flow control or no flow control - this potentially can cause the hardware control pins in the port to do strange things.

Regarding the com3/com4 switching thing, it's fairly rare to find current production systems with serial ports, if that's what you have make sure the hardware port addresses & interrupt lines do not conflict, if you're using USB adapters those also do strange thing every time they are disconnected & reconnected.
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #10 on: February 09, 2021, 12:09:22 am »
Your software should completely initialize the Com port for your usage.   I'm not sure what language you are programming in but an example can be found here: https://www.daniweb.com/programming/software-development/threads/56329/serial-port-communication-using-c.   It is a start but you may need to read deeper into the documentation.

I use to do exactly the same thing years ago in an older version of Windows and ran into similar problems in that you could not count on port state.   I was under the impression that Windows 10 improved this but maybe not.    In my case I was using one of the hand shaking lines to control an external device.   Nothing fancy at all, more of a trigger than anything.    Back then I even ran into "commercial" software that seemingly could not initialize a serial port correctly.

By the way in an ideal world your software should capture port state at initialization and then set it back when you are done.   I'm pretty sure Microsoft had a howto on doing this and frankly it might not be required anymore.
 
The following users thanked this post: mkube396

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: ru
Re: RS232 DTR and RTS pins
« Reply #11 on: February 10, 2021, 12:19:00 pm »
Maybe I'm wrong, but one signal comes from the PC side, and the other from the connected device. The DTR reports that data has been received and needs to be read, it comes to the PC from the device side, and the RTS signal is used to turn on the transmitter and is fed from the PC side.
And sorry for my English.
 

Offline mkube396Topic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: RS232 DTR and RTS pins
« Reply #12 on: February 10, 2021, 12:44:26 pm »
Maybe I'm wrong, but one signal comes from the PC side, and the other from the connected device. The DTR reports that data has been received and needs to be read, it comes to the PC from the device side, and the RTS signal is used to turn on the transmitter and is fed from the PC side.


the software only brings the DTR High to trigger a transistor to ground a pin to start transmitting.
the RTS line is set high to trigger a transistor to ground a pin to shift the carrier 170Hz and then pulsed to send the data.
« Last Edit: February 10, 2021, 12:45:58 pm by mkube396 »
 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 234
  • Country: gy
Re: RS232 DTR and RTS pins
« Reply #13 on: February 10, 2021, 06:05:56 pm »
Maybe I'm wrong, but one signal comes from the PC side, and the other from the connected device. The DTR reports that data has been received and needs to be read, it comes to the PC from the device side, and the RTS signal is used to turn on the transmitter and is fed from the PC side.

Not correct - both DTR & RTS are sent by the host computer.  What needs to be remembered is the origin of the system - think two computers connected to one another via an analogue telephone circuit with a modem or dataset at each end.

DTR or Data Terminal Ready is asserted by the computer host to inquire if the communication device (the modem or dataset) is ready to receive data for onward transmission, and the dataset would then respond by asserting DSR or Data Set Ready.  Once the DTR/DSR handshake has been completed, the computer host would then assert RTS or Request To Send and wait for the CTS or Clear To Send to be asserted before actually transmitting data.

Generally no DSR meant the dataset was not powered on or present, and no CTS meant the dataset was not connected to it's partner at the other end of the link

Please note that we have only looked at one half on the communications - one computer to it's associated modem or dataset - we have also not touched on how the first dataset makes a connection to the second dataset - that is not really relevant to the discussion, in the old days a human picked up the telephone & dialed the number to establish the connection and then put the phone handset down in an acoustic coupler.

The other half of the communication can be another computer attached to a second modem, a printer attached to a modem, a "dumb terminal" (meaning a display with keyboard but no processing power), again attached to a modem - we are talking pre 1970 technology here - no ethernet, no tcp/ip, no internet - none of the stuff we now take for granted.

Where things get confusing is when the telephone line & modems are removed from the "picture" and the various "hardware handshakes" have to be dealt with - the easiest way is to disable the hardware handshake altogether (it's not really required with a direct cable connection because you don't have to worry about dropped calls), you can also jumper RTS to CTS and/or DTR to DSR as required by the specific situation.

Determining what was actually required would be done on a case by case basis by inserting a breakout box (see below), observing the LEDs and then inserting jumpers as required - once the desired configuration was known the interconnecting cable could/would be hand built.

This is a dying art (it may be dead already), I still have a break out box on the shelf, but haven't used it in maybe twenty years.



By the way, none of this is really relevant to the original poster's dilemma - the PC has to assert DTR and/or RTS - so whatever software he's using has to be told how to do it.

the software only brings the DTR High to trigger a transistor to ground a pin to start transmitting.
the RTS line is set high to trigger a transistor to ground a pin to shift the carrier 170Hz and then pulsed to send the data.

This sounds quite unusual to me - as mentioned above DTR & RTS are control signals - I can see DTR being used to enable the transmitter, but pulsing RTS to actually transmit the data is contrary to normal RS232 usage.  What I would have expected is a UART connected to the RD & TD (receive data & transmit data) lines, and that UART then passing the data to some sort of microcontroller that handled the keying.

Having said that, I will be up front with you and say I have ZERO experience with RTTY, I'm just an old head that grew up in an era when RS232 serial communications were the way it was done.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2735
  • Country: fi
Re: RS232 DTR and RTS pins
« Reply #14 on: February 11, 2021, 05:57:56 pm »
well I it started working last night There is some software that is Messing up the port on my PC but I have no clue what it is just yet..  it is leaving the DTR pin alone but messing up the RTS pin.

right now if com3 stops working com 4 will work till it wont. then ill plug it in to com 3 and so on.  :-DD

Have you updated any hardware?

Have you not updated your software?

If signal levels are flipping when they shouldn't it's Windows that is figuring out what is connected there.
Your software should allocate the port.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf