Serial transceiving indication circuit and serial transceiving communication circuit

CN120803994BActive Publication Date: 2026-08-28SHENZHEN HONGDIAN TECH CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510673094.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-08-28
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

[0003]然而,在产品开发的过程以及产品的后期维护过程中,可能会出现一些硬件错误,为了定位这些错误,需要较长的时间或者额外的设备进行辅助调试,调试周期和成本较大

Benefits of technology

[0026]本申请的一种串口收发指示电路及串口收发通信电路,串口收发指示电路通过单向导通二极管D1、RC充放电路、三极管Q1和发光单元,单向导通二极管D1的阴极连接串口信号模块的发送端TX和接收端RX,在串口信号模块的发送端TX和接收端RX进行数据收发的时候,不论是在高波特率还是在低波特率下,发光二极管D2都能闪烁,并且,只需要一个以上的字节数据,发光二极管D2就能点亮,让用户明显看到,且一包数据大于或等于1字节时,只点亮一次,能够大大延长发光二极管D2的使用寿命。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803994B_ABST
    Figure CN120803994B_ABST
Patent Text Reader

Abstract

The application discloses a serial port transceiving indication circuit and a serial port transceiving communication circuit. The serial port transceiving indication circuit comprises a unidirectional conducting diode D1, a resistor, a capacitor C11, a triode Q1 and a light-emitting unit. One end of the resistor R22 is connected to the ground through the capacitor C11, forming an RC charging and discharging circuit. The cathode of the unidirectional conducting diode D1 is connected to the transmitting end and the receiving end of a serial port signal module, and the anode of the unidirectional conducting diode D1 is connected to one end of the resistor R22. The other end of the resistor R22 is connected to the base of the triode Q1, the emitter of the triode Q1 is connected to a power supply, and the collector of the triode Q1 is connected to the light-emitting unit and then connected to the ground. The application can make the light-emitting diode D2 flicker when data is transceived at a high baud rate or a low baud rate, has low cost, can simply and intuitively locate and judge the abnormal state of the serial port, is convenient for maintenance personnel to analyze and locate in the later period, and reduces the maintenance cost of equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of serial communication technology, and in particular to a serial port transceiver indicator circuit and a serial port transceiver communication circuit. Background Technology

[0002] Serial communication is a very common and widely used method of communication between devices in the fields of electronics and computers. Serial ports send and receive bytes bit by bit, using one wire to send data and another wire to receive data simultaneously, making it simple and capable of long-distance communication. Due to the characteristics of serial communication, many products inevitably need to develop serial communication capabilities.

[0003] However, during product development and subsequent maintenance, some hardware errors may occur. Locating these errors requires a considerable amount of time or additional equipment for auxiliary debugging, resulting in a large debugging cycle and high costs.

[0004] Currently, some serial port transceiver indicator circuits connect an LED to a power supply and then connect the transceiver data lines via pull-up resistors. Verification has revealed that at high baud rates (>115200), the LED in this type of serial port transceiver indicator circuit barely emits light due to the extremely high speed. Even at a normal baud rate of 9600, more than 50 bytes of data are needed for the user to clearly observe the LED flickering. Summary of the Invention

[0005] The purpose of this invention is to provide a serial port transceiver indicator circuit and a serial port transceiver communication circuit to solve the technical problems in the prior art.

[0006] The various technical effects that can be produced by the optional technical solutions among the many technical solutions provided by this invention are described in detail below.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] In a first aspect, this application provides a serial port transceiver indicator circuit, including a unidirectional diode D1, a resistor R22, a capacitor C11, a transistor Q1, and a light-emitting unit; one end of the resistor R22 is grounded through the capacitor C11, forming an RC charging and discharging circuit; the cathode of the unidirectional diode D1 is connected to the transmitting end and the receiving end of the serial port signal module, and the anode of the unidirectional diode D1 is connected to one end of the resistor R22; the other end of the resistor R22 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is connected to the power supply, and the collector of the transistor Q1 is connected to the light-emitting unit and then grounded;

[0009] When the transmitting end or the receiving end is at a high level, the transistor Q1 is cut off, so that the light-emitting diode D2 in the light-emitting unit is turned off;

[0010] When the transmitting end or the receiving end is at a low level, the transistor Q1 is turned on, so that the light-emitting diode D2 in the light-emitting unit is lit, and the RC charging and discharging circuit is charged.

[0011] When the transmitting end or the receiving end flips from low level to high level, the RC charging and discharging circuit discharges the transistor Q1 and the light-emitting unit, so that the light-emitting diode D2 of the light-emitting unit increases the lighting time and then turns off.

[0012] In some embodiments, the light-emitting unit includes the light-emitting diode D2 and the current-limiting resistor R33. The anode of the light-emitting diode D2 is connected to the collector of the transistor Q1, the cathode of the light-emitting diode D2 is connected to one end of the current-limiting resistor R33, and the other end of the current-limiting resistor R33 is grounded.

[0013] In some embodiments, a current-limiting resistor R11 is further included, one end of which is connected to the anode of the unidirectional conducting diode D1, and the other end of which is connected to one end of the resistor R22.

[0014] Secondly, this application also provides a serial port transceiver communication circuit, including a serial port signal module, a serial port transceiver circuit, and a serial port transceiver indicator circuit as described in any of the first aspects. The serial port signal module includes a transmitting end and a receiving end. The transmitting end and the receiving end are both connected to the serial port transceiver indicator circuit and the serial port transceiver circuit, and the serial port transceiver circuit is connected to a host computer.

[0015] The serial port signal module is used to send raw data to the serial port transceiver circuit and to receive level signals sent by the serial port transceiver circuit.

[0016] The serial port transceiver circuit is used to perform level conversion on the raw data, forward it to the host computer, and send the forwarded data from the host computer to the serial port signal module.

[0017] The serial port transceiver indicator circuit is used to indicate the data transmission and reception status between the serial port signal module and the serial port transceiver circuit.

[0018] In some embodiments, the serial transceiver circuit includes a TTL-to-RS232 circuit, a TTL-to-RS485 circuit, and a TTL-to-USB circuit. The transmitting end is connected to the input terminals of the TTL-to-RS232 circuit, the TTL-to-RS485 circuit, and the TTL-to-USB circuit. The receiving end is connected to the output terminals of the TTL-to-RS232 circuit, the TTL-to-RS485 circuit, and the TTL-to-USB circuit. The TTL-to-RS232 circuit, the TTL-to-RS485 circuit, and the TTL-to-USB circuit are also connected to the host computer via cables.

[0019] In some embodiments, the TTL to RS232 circuit includes a level conversion chip, which is used to convert TTL signals into RS232 signals;

[0020] The first port of the level conversion chip is connected to the third port through capacitor C1; the fourth port of the level conversion chip is connected to the fifth port through capacitor C2; the eleventh port of the level conversion chip is connected to the transmitting end through resistor R1 and to the power supply through resistor R4; the twelfth port of the level conversion chip is connected to the receiving end through resistor R2 and to the power supply through resistor R3; the sixteenth port of the level conversion chip is connected to the power supply, grounded through capacitor C3, and connected to the second port through capacitor C4; the fifteenth port of the level conversion chip is connected to capacitor C3 and grounded; the sixth port of the level conversion chip is grounded through capacitor C5; the fourteenth port of the level conversion chip outputs an RS232 signal through resistor R5; and the thirteenth port of the level conversion chip receives an RS232 signal through resistor R5.

[0021] In some embodiments, the TTL to RS485 converter includes an internal conversion chip and an amplification interface circuit. The internal conversion chip is connected to the transmitting end and the receiving end, and the amplification interface circuit is connected to the internal conversion chip and the transmitting end. The amplification interface circuit is used to amplify the TTL signal from the transmitting end and output it to the internal conversion chip. The internal conversion chip is used to convert the TTL signal into an RS485 differential signal.

[0022] In some embodiments, the amplification interface circuit includes an NPN surface mount silicon transistor. The first terminal of the NPN surface mount silicon transistor is connected to the transmitting terminal through a resistor R20 and to the power supply through a resistor R10, while being grounded through a capacitor C10. The second terminal of the NPN surface mount silicon transistor is connected to the capacitor C10 and grounded. The third terminal of the NPN surface mount silicon transistor is connected to the power supply through a resistor R30 and is connected to the second and third ports of the internal conversion chip.

[0023] In some embodiments, the TTL to USB circuit includes a USB to RS232 serial converter controller, the second port of which is connected to the transmitting end; the third port of which is connected to a power supply and grounded through capacitor C110; and the fourth port of which is connected to the receiving end. The USB to RS232 serial converter controller is used to convert TTL level signals into USB interface signals.

[0024] In some embodiments, the level conversion chip is model SP3232, the internal conversion chip is model TP8485E, and the USB to RS232 serial conversion controller is model PL2303SA.

[0025] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects:

[0026] This application discloses a serial port transceiver indicator circuit and a serial port transceiver communication circuit. The serial port transceiver indicator circuit uses a unidirectional conducting diode D1, an RC charging and discharging circuit, a transistor Q1, and a light-emitting unit. The cathode of the unidirectional conducting diode D1 is connected to the transmitting end TX and the receiving end RX of the serial port signal module. When the transmitting end TX and the receiving end RX of the serial port signal module are transmitting and receiving data, the light-emitting diode D2 can flash regardless of whether it is at a high baud rate or a low baud rate. Moreover, only one byte of data is needed for the light-emitting diode D2 to light up, making it clearly visible to the user. When a data packet is greater than or equal to 1 byte, it only lights up once, which can greatly extend the service life of the light-emitting diode D2.

[0027] The serial port transceiver communication circuit of this application embodiment includes a serial port transceiver indicator circuit that can indicate the data transmission and reception status between the serial port signal module and the serial port transceiver circuit. During data transmission and reception, it can automatically control the flashing of the light-emitting diode D2. This not only saves software overhead and reduces development costs, but also allows the flashing of the light-emitting diode D2 to determine whether the serial port data transmission and reception is normal. This achieves a simple and intuitive way to locate and judge the abnormal state of the serial port, which is convenient for later maintenance personnel to analyze and locate the problem and reduce the maintenance cost of the equipment. Attached Figure Description

[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0029] Figure 1This is a circuit schematic diagram of the serial port transceiver indicator circuit according to an embodiment of this application;

[0030] Figure 2 This is a simulation diagram of the collector of the transistor in the serial port transceiver indicator circuit of this application connected to an oscilloscope;

[0031] Figure 3 This is another simulation diagram of the anode of the unidirectional diode of the serial port transceiver indicator circuit in this application connected to an oscilloscope;

[0032] Figure 4 This is a square wave signal diagram with an input frequency of 11520 Hz displayed on an oscilloscope according to an embodiment of this application.

[0033] Figure 5 This is a simulation diagram of an oscilloscope connected to the cathode of a unidirectional diode according to an embodiment of this application;

[0034] Figure 6 This is a schematic diagram of the serial port transceiver communication circuit according to an embodiment of this application;

[0035] Figure 7 This is a circuit schematic diagram of the TTL to RS232 converter according to an embodiment of this application;

[0036] Figure 8 This is a circuit schematic diagram of the TTL to RS485 converter according to an embodiment of this application;

[0037] Figure 9 This is a circuit schematic diagram of a TTL to USB circuit according to an embodiment of this application. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.

[0039] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "a plurality" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can refer to fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can refer to the internal communication of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0040] To illustrate the technical solution described in this invention, specific embodiments are described below, showing only the parts related to the embodiments of this invention.

[0041] like Figure 1 As shown, this application provides a serial port transceiver indicator circuit 1, including a unidirectional conduction diode D1, a resistor R22, a capacitor C11, a transistor Q1, and a light-emitting unit; one end of the resistor R22 is grounded through the capacitor C11, forming an RC charging and discharging circuit; the cathode of the unidirectional conduction diode D1 is connected to the transmitting end TX and the receiving end RX of the serial port signal module 2, and the anode of the unidirectional conduction diode D1 is connected to one end of the resistor R22; the other end of the resistor R22 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is connected to the power supply, and the collector of the transistor Q1 is connected to the light-emitting unit and then grounded;

[0042] When the transmitting end TX or the receiving end RX is high, transistor Q1 is cut off, so that the light-emitting diode D2 in the light-emitting unit is turned off;

[0043] When the transmitting end TX or the receiving end RX is low, the transistor Q1 is turned on, which makes the light-emitting diode D2 in the light-emitting unit light up and charges the RC charging and discharging circuit.

[0044] When the transmitting end TX or the receiving end RX flips from low level to high level, the RC charging and discharging circuit discharges the transistor Q1 and the light-emitting unit, so that the light-emitting diode D2 of the light-emitting unit increases the lighting time and then turns off.

[0045] Specifically, the unidirectional conduction characteristic of the unidirectional diode D1 allows current to flow from the base of transistor Q1 to the transmitting end TX or the receiving end RX, but does not allow current to flow from the base of transistor Q1 to the light-emitting unit located on the collector branch. Therefore, it can avoid the leakage current caused by the change of high and low levels of the transmitting end TX or the receiving end RX, which could lead to the false lighting of the light-emitting diode D2 of the light-emitting unit.

[0046] In some embodiments, the light-emitting unit includes a light-emitting diode D2 and a current-limiting resistor R33. The anode of the light-emitting diode D2 is connected to the collector of the transistor Q1, the cathode of the light-emitting diode D2 is connected to one end of the current-limiting resistor R33, and the other end of the current-limiting resistor R33 is grounded.

[0047] In some embodiments, the serial port transceiver indicator circuit 1 further includes a current-limiting resistor R11. One end of the current-limiting resistor R11 is connected to the anode of the unidirectional conducting diode D1, and the other end of the current-limiting resistor R11 is connected to one end of the resistor R22. The current-limiting resistor R11 is used to limit the current at the base of the transistor Q1.

[0048] The working principle of the serial port transceiver indicator circuit 1 in this application is as follows:

[0049] When the serial port transceiver communication circuit is working normally, the transmitting end TX or receiving end RX of the serial port signal module 2 is in a high-level state by default. When the transmitting end TX or receiving end RX is high, the transistor Q1 is cut off, and the light-emitting diode D2 of the light-emitting unit is not lit and is in an off state. When the transmitting end TX or receiving end RX is low, the transistor Q1 is turned on, and the light-emitting diode D2 is lit. When the transmitting end TX or receiving end RX flips from low to high, since the 3.3V of the power supply VCC will slowly charge the RC charging and discharging circuit through the transistor Q1 when the transmitting end TX or receiving end RX is low, the RC charging and discharging circuit will discharge when it flips to high. This will cause the transistor Q1 to remain on for a period of time and then turn off. During the period when the transistor Q1 remains on, the light-emitting diode D2 can continue to light up for a period of time after the transmitting end TX or receiving end RX flips from low to high, and then turn off when the transistor Q1 is turned off.

[0050] Please refer to Figure 2 , Figure 2 This is a simulation diagram of the collector of transistor Q1 in serial port transceiver indicator circuit 1 connected to an oscilloscope, inputting a 100us low-level pulse (default level 3.3V) to the transmitting end TX or the receiving end RX.

[0051] 1) Initially, the transmitting end TX or the receiving end RX is at a high level, the transistor Q1 is cut off, and the light-emitting diode D2 remains off.

[0052] 2) Then the transmitting end TX or the receiving end RX is at a low level for 100us. At this time, the transistor Q1 is turned on and the light-emitting diode D2 is lit.

[0053] 3) Next, the transmitting end TX or the receiving end RX flips from low level to high level. At this time, due to the action of resistor R22 and capacitor C11 in the charging and discharging circuit, transistor Q1 is turned on for a period of time and then turned off. As shown in the oscilloscope XSC2 connected to the collector of transistor Q1 and the oscilloscope XSC1 connected to the transmitting end TXV1, after the transmitting end TX or the receiving end RX flips from low level to high level, it is maintained at a high level for about 1ms before slowly decreasing. That is, the light-emitting diode D2 is lit for 1ms before turning off.

[0054] Please refer to the exam Figure 3 , Figure 3 This is another simulation diagram of an oscilloscope connected to the unidirectional diode D1 of the serial port transceiver indicator circuit 1, with the anode connected to a 3.3V power supply. When a square wave signal with a frequency of 115200 Hz (amplitude of 3.3V) is input to the transmitting end TX or the receiving end RX, the LED D2 remains lit when the voltage of the LED D2 is 3.242V. Figure 3 It can be seen that after a low-level pulse (100us) at the transmitting end TX or the receiving end RX, the LED D2 will remain at a high level for about 1ms before slowly decreasing. If there is data during this 1ms, the LED D2 will remain lit until there is no data and then the LED D2 will turn off.

[0055] Please see Figure 4-5 , Figure 4 This is a square wave signal diagram with an input frequency of 11520 Hz displayed on the oscilloscope. Figure 5 This is a simulation diagram of an oscilloscope connected to the cathode of a unidirectional conducting diode D1. After a low-level pulse is input at the transmitting end TX or the receiving end RX, the LED D2 maintains a high level for 1ms while continuously receiving data, causing the LED D2 to remain lit continuously.

[0056] Therefore, in the serial port transceiver indicator circuit 1 of this embodiment, the flickering of LED D2 can be clearly seen at both high and low baud rates; and at a high baud rate (115200), only one or more bytes of data are needed to clearly illuminate LED D2. Clearly, a data packet of ≥1 byte can make LED D2 illuminate, thereby greatly extending the lifespan of LED D2.

[0057] In the embodiments of this application, through a unidirectional conducting diode D1, an RC charging and discharging circuit, a transistor Q1, and a light-emitting unit, the cathode of the unidirectional conducting diode D1 is connected to the transmitting end TX and the receiving end RX of the serial port signal module 2. When the transmitting end TX and the receiving end RX of the serial port signal module 2 are transmitting and receiving data, the light-emitting diode D2 can blink regardless of whether it is at a high baud rate or a low baud rate. Moreover, only one or more bytes of data are needed for the light-emitting diode D2 to light up, making it clearly visible to the user. Furthermore, when a data packet is ≥1 byte, it only lights up once, which can greatly extend the service life of the light-emitting diode D2.

[0058] Please see Figure 6 The present invention also provides a serial port transceiver communication circuit, including a serial port signal module 2, a serial port transceiver circuit 3 and a serial port transceiver indicator circuit 1 as described above. The serial port signal module 2 includes a transmitting end TX and a receiving end RX. The transmitting end TX and the receiving end RX are both connected to the serial port transceiver indicator circuit 1 and the serial port transceiver circuit 3, and the serial port transceiver circuit 3 is connected to the host computer 4.

[0059] The serial port signal module 2 is used to send raw data to the serial port transceiver circuit 3 and to receive the level signal sent by the serial port transceiver circuit 3.

[0060] The serial port transceiver circuit 3 is used to perform level conversion on the raw data, forward it to the host computer 4, and send the forwarded data from the host computer 4 to the serial port signal module 2.

[0061] Serial port transceiver indicator circuit 1 is used to indicate the data transmission and reception status between serial port signal module 2 and serial port transceiver circuit 3.

[0062] It should be noted that the working principle of the serial port transceiver indicator circuit 1 has been described in detail above, and will not be repeated here.

[0063] Serial port signal module 2 is mainly used to complete protocol parsing and data frame processing. For example, it packages raw data into frames according to the standard serial port protocol, or parses received data frames. Here, the raw data is generally generated by the target device connected to serial port signal module 2, and then the raw data is packaged and sent to serial transceiver circuit 3 through serial port signal module 2. When the level signal sent by serial transceiver circuit 3 is received, it is parsed and processed.

[0064] In some embodiments, the serial transceiver circuit 3 includes a TTL to RS232 circuit 31, a TTL to RS485 circuit 32, and a TTL to USB circuit 33. The transmitting end TX is connected to the input of the TTL to RS232 circuit 31, the input of the TTL to RS485 circuit 32, and the input of the TTL to USB circuit 33. The receiving end RX is connected to the output of the TTL to RS232 circuit 31, the output of the TTL to RS485 circuit 32, and the output of the TTL to USB circuit 33. The TTL to RS232 circuit 31, the TTL to RS485 circuit 32, and the TTL to USB circuit 33 are also connected to the host computer 4 via cables.

[0065] In some of these implementations, please refer to Figure 7 The TTL to RS232 circuit 31 includes a level conversion chip U1, which is used to convert TTL signals to RS232 signals.

[0066] The first port of level converter chip U1 is connected to the third port through capacitor C1; the fourth port of level converter chip U1 is connected to the fifth port through capacitor C2; the eleventh port of level converter chip U1 is connected to the transmitting end TX through resistor R1 and to the power supply VCC through resistor R4; the twelfth port of level converter chip U1 is connected to the receiving end RX through resistor R2 and to the power supply VCC through resistor R3; the sixteenth port of level converter chip U1 is connected to the power supply VCC, grounded through capacitor C3, and connected to the second port through capacitor C4; the fifteenth port of level converter chip U1 is connected to capacitor C3 and grounded; the sixth port of level converter chip U1 is grounded through capacitor C5; the fourteenth port of level converter chip U1 outputs an RS232 signal through resistor R5; and the thirteenth port of level converter chip U1 receives an RS232 signal through resistor R5. The model of level converter chip U1 can be SP3232.

[0067] The TTL to RS232 circuit 31 uses a level conversion chip U1 to convert between TTL and RS levels. This conversion makes the TTL level signal compatible with devices that require RS232 levels, thereby extending the communication distance and enhancing the signal's anti-interference capability.

[0068] In some of these implementations, please refer to Figure 8 The TTL to RS485 circuit 32 includes an internal conversion chip U2 and an amplification interface circuit 321. The internal conversion chip U2 is connected to the transmitting end TX and the receiving end RX, and the amplification interface circuit 321 is connected to the internal conversion chip U2 and the transmitting end TX. The amplification interface circuit 321 is used to amplify the TTL signal of the transmitting end TX and output it to the internal conversion chip U2. The internal conversion chip U2 is used to convert the TTL signal into an RS485 differential signal.

[0069] In some embodiments, the amplification interface circuit 321 includes an NPN surface-mount silicon transistor Q2. The first terminal of the NPN surface-mount silicon transistor Q2 is connected to the transmitting terminal TX via resistor R20 and to the power supply VCC via resistor R10, while also being grounded via capacitor C10. The second terminal of the NPN surface-mount silicon transistor Q2 is connected to capacitor C10 and grounded. The third terminal of the NPN surface-mount silicon transistor Q2 is connected to the power supply VCC via resistor R30 and is also connected to the second and third ports of the internal conversion chip U2. The NPN surface-mount silicon transistor Q2 may be an LMUN2213LT1G.

[0070] In some embodiments, the first port of the internal conversion chip U2 is connected to the receiver RX, the fourth port is connected to the transmitter TX, the fifth port is grounded, the sixth port is connected to one end of resistor R50, one end of resistor R60, and one end of resistor R80, the other end of resistor R80 is connected to one end of semiconductor discharge tube D30 and one end of semiconductor discharge tube D20, and the other end of resistor R60 is connected to the power supply VCC; the seventh port is connected to one end of resistor R40, the other end of resistor R50, and one end of resistor R70, the other end of resistor R70 is connected to one end of semiconductor discharge tube D10 and the other end of semiconductor discharge tube D20; the other end of semiconductor discharge tube D10 is grounded, and the other end of resistor R40 is grounded; the eighth port is connected to the power supply VCC and is grounded after being connected to capacitor C20.

[0071] Based on the above circuit, a TTL to RS485 converter 32 is obtained.

[0072] The advantages of the TTL to RS485 converter circuit 32 are:

[0073] 1) Because TTL signals have a short transmission distance, typically only about 2 meters at a baud rate of 9600, and generally not exceeding 12 meters, RS485 uses differential transmission, and the maximum transmission distance can reach 1200 meters, and under appropriate conditions, it can even reach 3000 meters.

[0074] 2) TTL signals are single-ended signals and are susceptible to electromagnetic interference, which can lead to data errors or loss. The TTL to RS485 circuit 32 adopts balanced transmission and differential reception, which can effectively suppress common-mode interference and is suitable for use in complex electromagnetic environments.

[0075] 3) Normally, a TTL interface can only connect one transceiver, while a TTL to RS485 circuit 32 supports a maximum of 32 drivers and 32 receivers in parallel, which is suitable for multi-point interconnection.

[0076] In some of these implementations, please refer to Figure 9The TTL to USB circuit 33 includes a USB to RS232 serial converter controller U3. The second port of the USB to RS232 serial converter controller U3 is connected to the transmitting end TX; the third port of the USB to RS232 serial converter controller U3 is connected to the power supply VCC3 and grounded through capacitor C110; the fourth port of the USB to RS232 serial converter controller U3 is connected to the receiving end RX. The USB to RS232 serial converter controller U3 is used to convert TTL level signals to USB interface signals. The model of the USB to RS232 serial converter controller U3 is PL2303SA.

[0077] In some embodiments, the first port of the USB to RS232 serial converter controller U3 is grounded, the seventh port is connected to power supply VCC5 and grounded through capacitor C31, and the eighth port is connected to power supply VCC3 and grounded through capacitor C21.

[0078] The main function of the TTL to USB circuit 33 is to convert TTL level signals into USB interface signals for data transmission and communication on the computer. This conversion circuit is typically used to communicate with peripherals such as microcontrollers, single-chip microcomputers, and sensors, enabling the computer to acquire, control, and process data with TTL-based devices.

[0079] The serial port transceiver communication circuit of this application embodiment includes a serial port transceiver indicator circuit 1 that can indicate the data transmission and reception status between the serial port signal module 2 and the serial port transceiver circuit 3. During data transmission and reception, it can automatically control the flashing of the light-emitting diode D2. This not only saves software overhead and reduces development costs, but also allows the flashing of the light-emitting diode D2 to determine whether the serial port data transmission and reception is normal. This achieves a simple and intuitive way to locate and judge the abnormal state of the serial port, which is convenient for later maintenance personnel to analyze and locate the problem and reduce the maintenance cost of the equipment.

[0080] The example provided is merely a specific case and does not imply that this application is implemented in this way.

[0081] The above description is merely a preferred embodiment of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A serial port transceiver indicator circuit, characterized in that, The device includes a unidirectional diode D1, a resistor R22, a capacitor C11, a transistor Q1, and a light-emitting unit. One end of the resistor R22 is grounded through the capacitor C11, forming an RC charging and discharging circuit. The cathode of the unidirectional diode D1 is connected to the transmitting and receiving ends of the serial port signal module, and the anode of the unidirectional diode D1 is connected to one end of the resistor R22. The other end of the resistor R22 is connected to the base of the transistor Q1, the emitter of the transistor Q1 is connected to the power supply, and the collector of the transistor Q1 is connected to the light-emitting unit and then grounded. When the transmitting end or the receiving end is at a high level, the transistor Q1 is cut off, so that the light-emitting diode D2 in the light-emitting unit is turned off; When the transmitting end or the receiving end is at a low level, the transistor Q1 is turned on, so that the light-emitting diode D2 in the light-emitting unit is lit, and the RC charging and discharging circuit is charged. When the transmitting end or the receiving end flips from low level to high level, the RC charging and discharging circuit discharges the transistor Q1 and the light-emitting unit, so that the light-emitting diode D2 of the light-emitting unit increases the lighting time and then turns off; The light-emitting unit includes the light-emitting diode D2 and the current-limiting resistor R33. The anode of the light-emitting diode D2 is connected to the collector of the transistor Q1, the cathode of the light-emitting diode D2 is connected to one end of the current-limiting resistor R33, and the other end of the current-limiting resistor R33 is grounded. It also includes a current-limiting resistor R11, one end of which is connected to the anode of the unidirectional conducting diode D1, and the other end of which is connected to one end of the resistor R22.

2. A serial port transceiver communication circuit, characterized in that, It includes a serial port signal module, a serial port transceiver circuit, and a serial port transceiver indicator circuit as described in claim 1. The serial port signal module includes a transmitting end and a receiving end. The transmitting end and the receiving end are both connected to the serial port transceiver indicator circuit and the serial port transceiver circuit, and the serial port transceiver circuit is connected to a host computer. The serial port signal module is used to send raw data to the serial port transceiver circuit and to receive level signals sent by the serial port transceiver circuit. The serial port transceiver circuit is used to perform level conversion on the raw data, forward it to the host computer, and send the forwarded data from the host computer to the serial port signal module. The serial port transceiver indicator circuit is used to indicate the data transmission and reception status between the serial port signal module and the serial port transceiver circuit.

3. The serial port transceiver communication circuit according to claim 2, characterized in that, The serial transceiver circuit includes a TTL to RS232 circuit, a TTL to RS485 circuit, and a TTL to USB circuit. The transmitting end is connected to the input terminals of the TTL to RS232 circuit, the TTL to RS485 circuit, and the TTL to USB circuit. The receiving end is connected to the output terminals of the TTL to RS232 circuit, the TTL to RS485 circuit, and the TTL to USB circuit. The TTL to RS232 circuit, the TTL to RS485 circuit, and the TTL to USB circuit are also connected to the host computer via cables.

4. The serial port transceiver communication circuit according to claim 3, characterized in that, The TTL to RS232 circuit includes a level conversion chip, which is used to convert TTL signals into RS232 signals; The first port of the level conversion chip is connected to the third port through capacitor C1; the fourth port of the level conversion chip is connected to the fifth port through capacitor C2; the eleventh port of the level conversion chip is connected to the transmitting end through resistor R1 and to the power supply through resistor R4; the twelfth port of the level conversion chip is connected to the receiving end through resistor R2 and to the power supply through resistor R3; the sixteenth port of the level conversion chip is connected to the power supply, grounded through capacitor C3, and connected to the second port through capacitor C4; the fifteenth port of the level conversion chip is connected to capacitor C3 and grounded; the sixth port of the level conversion chip is grounded through capacitor C5; the fourteenth port of the level conversion chip outputs an RS232 signal through resistor R5; and the thirteenth port of the level conversion chip receives an RS232 signal through resistor R5.

5. The serial port transceiver communication circuit according to claim 4, characterized in that, The TTL to RS485 converter includes an internal conversion chip and an amplification interface circuit. The internal conversion chip is connected to the transmitting end and the receiving end, and the amplification interface circuit is connected to the internal conversion chip and the transmitting end. The amplification interface circuit is used to amplify the TTL signal from the transmitting end and output it to the internal conversion chip. The internal conversion chip is used to convert the TTL signal into an RS485 differential signal.

6. The serial port transceiver communication circuit according to claim 5, characterized in that, The amplification interface circuit includes an NPN surface mount silicon transistor. The first terminal of the NPN surface mount silicon transistor is connected to the transmitting terminal through resistor R20 and to the power supply through resistor R10, and is grounded through capacitor C10. The second terminal of the NPN surface mount silicon transistor is connected to capacitor C10 and grounded. The third terminal of the NPN surface mount silicon transistor is connected to the power supply through resistor R30 and is connected to the second and third ports of the internal conversion chip.

7. The serial port transceiver communication circuit according to claim 5, characterized in that, The TTL to USB circuit includes a USB to RS232 serial converter controller. The second port of the USB to RS232 serial converter controller is connected to the transmitting end; the third port of the USB to RS232 serial converter controller is connected to the power supply and grounded through capacitor C110; the fourth port of the USB to RS232 serial converter controller is connected to the receiving end; the USB to RS232 serial converter controller is used to convert TTL level signals into USB interface signals.

8. The serial port transceiver communication circuit according to claim 6, characterized in that, The level conversion chip is model SP3232, the internal conversion chip is model TP8485E, and the USB to RS232 serial conversion controller is model PL2303SA.

Citation Information

Patent Citations

  • Detection circuit for preventing wrong wiring of pressure sensor

    CN116299071A

  • Automatic receiving and sending control and indication circuit of RS485 serial port

    CN204009870U