Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to detect the DB9 serial TTL insertion?

Status
Not open for further replies.

tony_lth

Advanced Member level 5
Joined
Jul 28, 2010
Messages
2,088
Helped
377
Reputation
756
Reaction score
368
Trophy points
1,363
Location
Beijing
Activity points
12,635
Hi, ALL,
I have a STM32 UART TTL signal, which is a 9pin signal, including DCD/RXD/TXD/DSR/DTR/CTS/RTS/RI/GND signlas.
Now I have two DB9 ports, which both can output the STM32 UART TTL signal.
And the 1st port have the high priority than the 2nd port.
I knew a design, that if detect the 1st port is inserted a effective cable, then switch the STM32 TTL signals to the 1st port.
If no connection on the 1st port, the 2nd port is used, and the STM32 signals are switched to the 2nd port.
But I don't know, how to detect the 1st port is connected or not?
Pls comment.
Thanks.
Tony Liu

- - - Updated - - -

Hi, ALL,
I have an idea, that is using the OR-gates to OR the 8 signals of the TTL signals.
If only one signal is high level, the OR gates will be high level signal, that will switch the SPDT IC to swicth the STM32 signals to the 1st port.
Is this idea ok?
Best,
Tony Liu
Attachments are the 4 input OR gates IC and 2 input OR IC for my idea.
 

Attachments

  • 74LVC32A.pdf
    717.4 KB · Views: 46
  • sn74lvc2g32.pdf
    1,001.1 KB · Views: 41

If these are not connected to dial-up modems, the RI (Ringing Indication) signal is free to use. Just add a pull-up resistor on the socket and ground it in the plug, you can then read the RI state to see if the plug is inserted or not.

Brian.
 
Hi, betwixt and ALL,
But my modem needs use "ATD1234;" to setup the link, and on the HyperTerminal can see "RING" display, so I think "RI" is used and can't be the detection of the UART connection.
Any other suggestion?
Thanks,
Tony Liu

- - - Updated - - -

PS: Any IC solution is also OK.

- - - Updated - - -

Another solution, since DSR/DTR/DCD/RI is active low, so the solution could be:
1. Pull up the four pins
2. Invert the four pins, and OR the four invert, then using the OR result as the enable signal to control the switch.
How about this idea?
 

I finally solved this problem.
Through monitoring every pin status.
Good luck.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top