CN211236201U - RS232 interface state detection circuit - Google Patents
RS232 interface state detection circuit Download PDFInfo
- Publication number
- CN211236201U CN211236201U CN201921884117.5U CN201921884117U CN211236201U CN 211236201 U CN211236201 U CN 211236201U CN 201921884117 U CN201921884117 U CN 201921884117U CN 211236201 U CN211236201 U CN 211236201U
- Authority
- CN
- China
- Prior art keywords
- diode
- triode
- resistor
- interface
- cathode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Electronic Switches (AREA)
Abstract
The utility model discloses a RS232 interface state detection circuitry, it includes resistance R1, resistance R2, resistance R3, resistance R4, diode D1, diode D2, diode D3, triode Q1, triode Q2, RS232 interface and treater; the signal receiving pin RXD of the RS232 interface is connected with the anode of the diode D1 and the cathode of the diode D2; the cathode of the diode D1 is connected with the base electrode of the triode Q1 through a resistor R1, the anode of the diode D2 is connected with the emitter electrode of the triode Q2 through a resistor R2, and the emitter electrode of the triode Q1 and the base electrode of the triode Q2 are grounded; one end of the resistor R3 is connected with a power supply VCC, the other end of the resistor R3 is connected with the anode of the diode D3, the collector of the triode Q1 and the collector of the triode Q2, the cathode of the diode D3 is connected with one end of the resistor R4 and one input end of the processor, and the other end of the resistor R4 is grounded. The utility model discloses can the state of short-term test RS232 interface.
Description
Technical Field
The utility model relates to a RS232 interface field especially indicates a RS232 interface state detection circuit.
Background
In serial communication, both communication parties are required to adopt a standard interface, so that different devices can be conveniently connected for communication. The RS232 interface is currently the most common serial communication interface.
In the prior art, when an RS232 interface of a certain device is connected to RS232 interfaces of other devices through cables, serial communication software or an error code meter needs to be used for receiving and transmitting data to check whether the devices are normally connected. However, if a cable connection failure occurs during the use process, the information sent by the other party may be lost, and the receiving party may not know that the other party sent the information; in the prior art, in order to judge whether the cable is normally connected, the connection state between the RS232 interfaces is continuously detected in real time, and the detection can be realized when the universal asynchronous receiving and transmitting transmitter has data receiving and transmitting data, so that the detection mode is slow, and the response speed of equipment is influenced.
SUMMERY OF THE UTILITY MODEL
An object of the utility model is to provide a RS232 interface state detection circuitry, it need not data receiving and dispatching can realize detecting the state of RS232 interface.
In order to achieve the above purpose, the solution of the present invention is:
an RS232 interface state detection circuit comprises a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1, a diode D2, a diode D3, a triode Q1, a triode Q2, an RS232 interface and a processor; the triode Q1 and the triode Q2 are both NPN type triodes; a signal receiving pin RXD of the RS232 interface is connected with the anode of the diode D1 and the cathode of the diode D2; the cathode of the diode D1 is connected with one end of the resistor R1, the other end of the resistor R1 is connected with the base electrode of the triode Q1, and the emitting electrode of the triode Q1 is grounded; the anode of the diode D2 is connected with one end of the resistor R2, the other end of the resistor R2 is connected with the emitter of the triode Q2, and the base of the triode Q2 is grounded; one end of the resistor R3 is connected with a power supply VCC, the other end of the resistor R3 is connected with the anode of the diode D3, the collector of the triode Q1 and the collector of the triode Q2, the cathode of the diode D3 is connected with one end of the resistor R4 and one input end of the processor, and the other end of the resistor R4 is grounded.
The RS232 interface state detection circuit further comprises a capacitor C1, one end of the capacitor C1 is connected with the negative electrode of the diode D3, and the other end of the capacitor C1 is grounded.
After the above-mentioned scheme is adopted, the utility model discloses when the RS232 interface does not have the external equipment to access, the signal reception pin RXD of RS232 interface does not have the signal this moment, this makes and does not have the potential difference between triode Q1's the base and the grid, also there is not the potential difference between triode Q2's base and the grid, consequently triode Q1 and triode Q2 all end, this makes diode D3 anodal potential pull high and make diode D3 switch on, make diode D3 negative pole output a high level give the treater, and make the treater discern that the RS232 interface does not have the external equipment to access. When the RS232 interface is accessed by external equipment, the RXD (signal receiving pin) of the RS232 interface can receive a signal sent by the external equipment, and the signal is a PWM (pulse-width modulation) signal with positive and negative voltages according to the RS232 level standard; when the positive voltage part of the PWM signal is input into the signal receiving pin RXD, the diode D1 is conducted, the diode D2 is cut off, the triode Q1 is conducted, the triode Q2 is cut off, and the diode D3 is cut off, so that the level of the cathode of the diode D3 is pulled down, the cathode of the diode D3 outputs a low level to the processor, and the processor recognizes that the RS232 interface has external equipment access; when the negative voltage part of the PWM signal is inputted to the signal receiving pin RXD, the diode D1 is turned off, the diode D2 is turned on, the transistor Q1 is turned off, the transistor Q2 is turned on, and the diode D3 is also turned off, so that the cathode of the diode D3 outputs a low level to the processor, and the processor recognizes that the RS232 interface has an external device access.
To sum up, through the utility model discloses a circuit structure, the treater only need be right the utility model discloses a whether the level of diode D3 negative pole detects alright discernment RS232 interface and has the external equipment to insert, compares prior art, the utility model discloses need not data receiving and dispatching and can realize detecting the state of RS232 interface, detection speed is faster.
Drawings
Fig. 1 is a schematic circuit diagram of the present invention.
Detailed Description
In order to further explain the technical solution of the present invention, the present invention is explained in detail by the following embodiments.
As shown in fig. 1, the utility model discloses a RS232 interface state detection circuit, its characterized in that: the device comprises a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1, a diode D2, a diode D3, a triode Q1, a triode Q2, an RS232 interface and a processor; the transistor Q1 and the transistor Q2 are both NPN transistors.
As shown in fig. 1, a signal receiving pin RXD of the RS232 interface is connected to an anode of the diode D1 and a cathode of the diode D2; the cathode of the diode D1 is connected with one end of the resistor R1, the other end of the resistor R1 is connected with the base electrode of the triode Q1, and the emitting electrode of the triode Q1 is grounded; the anode of the diode D2 is connected with one end of the resistor R2, the other end of the resistor R2 is connected with the emitter of the triode Q2, and the base of the triode Q2 is grounded; one end of the resistor R3 is connected with a power supply VCC, the other end of the resistor R3 is connected with the anode of the diode D3, the collector of the triode Q1 and the collector of the triode Q2, the cathode of the diode D3 is connected with one end of the resistor R4 and one input end of the processor, and the other end of the resistor R4 is grounded.
The utility model discloses a theory of operation does:
the utility model discloses when the RS232 interface does not have the external equipment and inserts, the signal reception pin RXD of RS232 interface this moment does not have the signal, this makes there is not the potential difference between triode Q1's the base and the grid, also there is not the potential difference between triode Q2's the base and the grid, consequently triode Q1 and triode Q2 all end, this makes diode D3 anodal potential pull high and make diode D3 switch on, make diode D3 negative pole output a high level give the treater, and make the treater discern that the RS232 interface does not have the external equipment and inserts. When the RS232 interface is accessed by external equipment, the RXD (signal receiving pin) of the RS232 interface can receive a signal sent by the external equipment, and the signal is a PWM (pulse-width modulation) signal with positive and negative voltages according to the RS232 level standard; when the positive voltage part of the PWM signal is input into the signal receiving pin RXD, the diode D1 is conducted, the diode D2 is cut off, the triode Q1 is conducted, the triode Q2 is cut off, and the diode D3 is cut off, so that the level of the cathode of the diode D3 is pulled down, the cathode of the diode D3 outputs a low level to the processor, and the processor recognizes that the RS232 interface has external equipment access; when the negative voltage part of the PWM signal is inputted to the signal receiving pin RXD, the diode D1 is turned off, the diode D2 is turned on, the transistor Q1 is turned off, the transistor Q2 is turned on, and the diode D3 is also turned off, so that the cathode of the diode D3 outputs a low level to the processor, and the processor recognizes that the RS232 interface has an external device access. Further, the utility model discloses still include electric capacity C1, diode D3's negative pole is connected to electric capacity C1's one end, and electric capacity C1's other end ground connection, the signal shake appears in diode D3's negative pole when can preventing this PWM signal switching level through electric capacity C1.
To sum up, through the utility model discloses a circuit structure, the treater only need be right the utility model discloses a whether the level of diode D3 negative pole detects alright discernment RS232 interface and has the external equipment to insert, compares prior art, the utility model discloses need not data receiving and dispatching and can realize detecting the state of RS232 interface, detection speed is faster.
The above embodiments and drawings are not intended to limit the form and style of the present invention, and any suitable changes or modifications made by those skilled in the art should not be construed as departing from the scope of the present invention.
Claims (2)
1. An RS232 interface state detection circuit, characterized in that: the device comprises a resistor R1, a resistor R2, a resistor R3, a resistor R4, a diode D1, a diode D2, a diode D3, a triode Q1, a triode Q2, an RS232 interface and a processor; the triode Q1 and the triode Q2 are both NPN type triodes;
a signal receiving pin RXD of the RS232 interface is connected with the anode of the diode D1 and the cathode of the diode D2; the cathode of the diode D1 is connected with one end of the resistor R1, the other end of the resistor R1 is connected with the base electrode of the triode Q1, and the emitting electrode of the triode Q1 is grounded; the anode of the diode D2 is connected with one end of the resistor R2, the other end of the resistor R2 is connected with the emitter of the triode Q2, and the base of the triode Q2 is grounded; one end of the resistor R3 is connected with a power supply VCC, the other end of the resistor R3 is connected with the anode of the diode D3, the collector of the triode Q1 and the collector of the triode Q2, the cathode of the diode D3 is connected with one end of the resistor R4 and one input end of the processor, and the other end of the resistor R4 is grounded.
2. The RS232 interface status detection circuit of claim 1, wherein: the capacitor C1 is further included, one end of the capacitor C1 is connected with the cathode of the diode D3, and the other end of the capacitor C1 is grounded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201921884117.5U CN211236201U (en) | 2019-11-04 | 2019-11-04 | RS232 interface state detection circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201921884117.5U CN211236201U (en) | 2019-11-04 | 2019-11-04 | RS232 interface state detection circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN211236201U true CN211236201U (en) | 2020-08-11 |
Family
ID=71934547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201921884117.5U Active CN211236201U (en) | 2019-11-04 | 2019-11-04 | RS232 interface state detection circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN211236201U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116500512A (en) * | 2023-06-27 | 2023-07-28 | 湖南腾方中科科技有限公司 | Detection system for connection state of high-density connector |
-
2019
- 2019-11-04 CN CN201921884117.5U patent/CN211236201U/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116500512A (en) * | 2023-06-27 | 2023-07-28 | 湖南腾方中科科技有限公司 | Detection system for connection state of high-density connector |
CN116500512B (en) * | 2023-06-27 | 2023-09-22 | 湖南腾方中科科技有限公司 | Detection system for connection state of high-density connector |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3683688B1 (en) | Corrosion protection circuit for serial bus connector | |
CN110928823A (en) | Level conversion circuit | |
CN211236201U (en) | RS232 interface state detection circuit | |
CN207398814U (en) | Undervoltage overvoltage protection circuit and power supply system | |
CN203785804U (en) | Three-wire remote temperature measuring circuit based on digital temperature sensor | |
CN109445505B (en) | DALI bus power supply circuit | |
CN203688086U (en) | Two-line remote temperature measuring circuit based on digital temperature sensor | |
CN215268318U (en) | CAN bus resistance matching circuit | |
CN212989475U (en) | Power failure detection circuit and power consumption equipment | |
CN114928029A (en) | Temperature detection circuit and chip, battery protection circuit, chip and device | |
CN211180610U (en) | Fault information latch circuit | |
CN209046639U (en) | A kind of data transmit-receive circuit and communication instrument | |
CN205071002U (en) | Light module power supply circuit and communications facilities | |
CN108322239B (en) | Close-range unidirectional power supply reverse communication circuit structure | |
CN106843434B (en) | A kind of circuit using serial communication control cpu reset | |
CN219351715U (en) | Magnetic induction wireless transmitter | |
CN108879598B (en) | USB interface protection circuit and electronic equipment | |
CN219960578U (en) | Single-wire communication circuit | |
CN103529341A (en) | Remote control loop detection circuit for negative control terminal | |
CN205283515U (en) | Adaptive pairs circuit | |
CN218956772U (en) | Signal output circuit and intelligent power module | |
CN210518243U (en) | EC reset circuit and electronic equipment based on composite signal | |
CN203519751U (en) | Remote control loop detection circuit for load control terminal | |
CN212622777U (en) | Voltage drop detection circuit and electronic device | |
CN105739661B (en) | Voltage conversion circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |