RS232 DTR and RTS pins  - Page 1
Forum section: electronics / beginners

author: mkube396
author_rank: Regular Contributor
timestamp: February 07, 2021, 10:02:48 pm
content: 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 thatRunning Windows 10 I have tested the RTS line with wsjt-x, MMTTY and CwType this has all worked before.

author: hexreader
author_rank: Frequent Contributor
timestamp: February 07, 2021, 10:26:03 pm
content: DTR is on pin 4, not pin 2I 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

author: mkube396
author_rank: Regular Contributor
timestamp: February 07, 2021, 10:41:57 pm
content: Quote from: hexreader on February 07, 2021, 10:26:03 pmthat was a type O DTR is on pin 4 every thing is on the right pin..still not getting a high single on 7

author: hexreader
author_rank: Frequent Contributor
timestamp: February 07, 2021, 11:03:09 pm
content: 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?

author: mkube396
author_rank: Regular Contributor
timestamp: February 07, 2021, 11:36:04 pm
content: Quote from: hexreader on February 07, 2021, 11:03:09 pmI 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.

author: hexreader
author_rank: Frequent Contributor
timestamp: February 07, 2021, 11:44:13 pm
content: 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.

author: mkube396
author_rank: Regular Contributor
timestamp: February 07, 2021, 11:48:54 pm
content: Quote from: hexreader on February 07, 2021, 11:44:13 pmyeah i'm using an add in PCIe with 2 ports and the one off the mother board

author: hexreader
author_rank: Frequent Contributor
timestamp: February 08, 2021, 12:06:41 am
content: Makes no sense to meThe voltages that I measure on motherboard COM port are:1 02 03 -114 -115 gnd6 07 -118 09 0Plug-in card shows the same results, but -5.8 volts instead of -110 Volts is not really zero volts, but floating input that happens to float at about zero volts

author: mkube396
author_rank: Regular Contributor
timestamp: February 08, 2021, 11:45:51 am
content: 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.

author: fordem
author_rank: Regular Contributor
timestamp: February 08, 2021, 01:16:14 pm
content: 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.

author: wizard69
author_rank: Super Contributor
timestamp: February 09, 2021, 12:09:22 am
content: 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: February 10, 2021, 12:19:00 pm
content: 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.

author: mkube396
author_rank: Regular Contributor
timestamp: February 10, 2021, 12:44:26 pm
content: Quote from: S. Petrukhin on February 10, 2021, 12:19:00 pmthe 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.

author: fordem
author_rank: Regular Contributor
timestamp: February 10, 2021, 06:05:56 pm
content: Quote from: S. Petrukhin on February 10, 2021, 12:19:00 pmNot 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 linkPlease 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.Quote from: mkube396 on February 10, 2021, 12:44:26 pmThis 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.

author: m k
author_rank: Super Contributor
timestamp: February 11, 2021, 05:57:56 pm
content: Quote from: mkube396 on February 08, 2021, 11:45:51 amHave 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.