TTL circuit compatible with multiple communication protocols
By designing a TTL circuit compatible with multiple communication protocols, seamless connection and debugging with various communication protocol devices were achieved. This solved the limitations of existing TTL circuits in terms of compatibility and versatility, reduced hardware costs and system complexity, and ensured the stability and flexibility of communication signals.
Patent Information
- Application Number
- CN202511069580.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-28
AI Technical Summary
Existing TTL circuits have limitations in terms of communication protocol compatibility and universality, making it difficult to meet the diverse and flexible communication needs of modern electronic devices. This leads to increased hardware costs and system complexity, and the compatibility differences between different communication modules may cause communication failures.
A TTL circuit compatible with multiple communication protocols was designed, including a mode selection module, a main control module, and a multi-protocol conversion module. The mode selection module outputs a mode selection command, the main control module outputs a mode switching signal, and the multi-protocol conversion module switches the communication mode, realizing the connection and debugging with various communication protocol devices without the need for additional dedicated communication conversion equipment.
It improves the compatibility and versatility of TTL circuits, reduces hardware costs and system complexity, avoids signal interference caused by incompatibility between communication modules, and ensures the stability and flexibility of communication signals.
Smart Images

Figure CN121029645A_ABST
Abstract
Description
[Technical Field] This invention relates to the field of communication circuit technology, and in particular to a TTL circuit compatible with multiple communication protocols. [Background Technology] In the field of communication for modern electronic devices, TTL circuits are increasingly widely used. However, most existing TTL circuits only integrate TTL-to-serial conversion functionality. When users need to connect and debug devices with different communication protocols, especially in applications such as IoT terminal development and industrial automation control that require multi-protocol switching, additional communication conversion equipment is often required. This not only increases hardware costs but also leads to increased system integration complexity. Furthermore, the compatibility differences between different communication modules are significant. This incompatibility may cause communication failures, affecting the normal operation of equipment and thus increasing the difficulty of system debugging and maintenance costs. [Summary of the Invention] To address the limitations of current TTL circuits in terms of communication protocol compatibility and versatility, which makes it difficult to meet the diverse and flexible communication needs of modern electronic devices, this invention proposes a TTL circuit compatible with multiple communication protocols.
[0001] This invention is achieved by the following technical solution: A TTL circuit compatible with multiple communication protocols, including The mode selection module is used to output mode selection instructions; The main control module has its control signal input terminal connected to the output terminal of the mode selection module. The main control module is used to output a mode switching signal according to the mode selection command to switch the communication mode of the TTL circuit. A multi-protocol conversion module is provided, the input of which is connected to the control signal output of the main control module, and the output of which is used to switch the communication mode according to the mode switching signal.
[0002] By adopting the above technical solution, the main control module will output the corresponding mode switching signal according to the mode selection command input by the user. After receiving the mode switching signal, the multi-protocol conversion module can switch to the communication mode required by the user. This enables the TTL circuit to communicate and debug with devices of various communication protocols without the need for additional dedicated communication conversion equipment, which greatly improves the compatibility and versatility of the TTL circuit. Secondly, since the TTL circuit can realize the conversion between multiple communication protocols without replacing dedicated communication equipment or corresponding communication modules, it avoids the risk of signal interference caused by different compatibility between communication modules, which leads to unstable communication signal transmission.
[0003] As described above, a TTL circuit compatible with multiple communication protocols includes a mode selection module comprising a push-button switch KEY1 and a resistor R7. The first terminal of the push-button switch KEY1 is grounded, the second terminal of the push-button switch KEY1 is connected to one end of the resistor R7, and the other end of the resistor R7 is connected to the control signal input terminal of the main control module.
[0004] As described above, a TTL circuit compatible with multiple communication protocols includes a multi-protocol conversion module comprising: The first communication mode unit has its input terminal connected to the first control signal output terminal of the main control module, and its output terminal is used to execute the serial port UART communication mode. The second communication mode unit has its input terminal connected to the second control signal output terminal of the main control module, and its output terminal is used to execute a custom communication mode. The third communication mode unit has its input terminal connected to the third control signal output terminal of the main control module, and its output terminal is used to execute the IIC communication mode.
[0005] As described above, in a TTL circuit compatible with multiple communication protocols, the first communication mode unit includes: USB interface, the input end of which is connected to a USB device to obtain USB information from the USB device; The UART communication protocol subunit has its input end connected to the output end of the USB interface, and is used to convert the USB information into UART communication information. The first communication subunit has its input terminal connected to the serial communication terminal of the UART communication protocol subunit, and its controlled terminal connected to the first control signal output terminal of the main control module. After receiving the first control signal output by the main control module, the first communication subunit executes the serial UART communication mode.
[0006] As described above, a TTL circuit compatible with multiple communication protocols includes a UART communication protocol subunit comprising a UART protocol conversion chip U2, resistors R5 and R6. The positive output terminal of the USB interface is connected to the positive input terminal of the USB interface, and the negative output terminal of the USB interface is connected to the negative input terminal of the UART interface. The first serial communication terminal of the UART interface is connected to one end of resistor R5, and the other end of resistor R5 is connected to the input terminal of the first communication subunit. The second serial communication terminal of the UART interface is connected to one end of resistor R6, and the other end of resistor R6 is connected to the input terminal of the first communication subunit.
[0007] As described above, a TTL circuit compatible with multiple communication protocols includes a second communication mode unit comprising a communication interface J3, a MOSFET Q3, and a MOSFET Q8. The first control signal output terminal of the main control module is connected to the gates of the MOSFETs Q3 and Q8, respectively. The first serial communication terminal of the UART communication protocol subunit is connected to the source of the MOSFET Q3, the drain of the MOSFET Q3 is connected to the second port of the communication interface J3, the first serial communication terminal of the UART communication protocol subunit is connected to the source of the MOSFET Q8, and the drain of the MOSFET Q8 is connected to the fourth port of the communication interface J3.
[0008] As described above, in a TTL circuit compatible with multiple communication protocols, the second communication mode unit includes: The data transmission subunit has its controlled end connected to the communication control end of the main control module and its input end connected to the serial communication end of the UART communication protocol subunit. The data transmission subunit is used to upload the communication data of the main control module to the USB device or download the communication data of the USB device to the main control module. The second communication subunit has its controlled end connected to the second control signal output end of the main control module, and its data communication end connected to the data communication end of the main control module. The second communication subunit is used to control the sending and receiving of communication data in a custom communication mode.
[0009] As described above, a TTL circuit compatible with multiple communication protocols includes a data transmission subunit comprising MOSFETs Q1 and Q2. The first communication control terminal of the main control module is connected to the gate of MOSFET Q1, the source of MOSFET Q1 is connected to the first signal terminal of the main control module, the drain of MOSFET Q1 is connected to the second serial communication terminal of the UART communication protocol subunit, the second communication control terminal of the main control module is connected to the gate of MOSFET Q2, the source of MOSFET Q2 is connected to the second signal terminal of the main control module, and the drain of MOSFET Q2 is connected to the first serial communication terminal of the UART communication protocol subunit.
[0010] As described above, in a TTL circuit compatible with multiple communication protocols, the second communication sub-unit includes a MOS transistor Q10. The second control signal output terminal of the main control module is connected to the gate of the MOS transistor Q10, the drain of the MOS transistor Q10 is connected to the fourth port of the communication interface J3, and the source of the MOS transistor Q10 is connected to the data communication terminal of the main control module.
[0011] As described above, a TTL circuit compatible with multiple communication protocols includes a third communication mode unit comprising an emulator interface J7, MOSFETs Q5, Q6, and Q7. The third control signal output terminal of the main control module is connected to the gates of MOSFETs Q5, Q6, and Q7, respectively. The drain of MOSFET Q5 is connected to the first port of the emulator interface J7, and the source of MOSFET Q5 is connected to the first port of the communication interface J3. The drain of MOSFET Q6 is connected to the second port of the emulator interface J7, and the source of MOSFET Q6 is connected to the second port of the communication interface J3. The drain of MOSFET Q7 is connected to the fourth port of the emulator interface J7, and the source of MOSFET Q7 is connected to the fourth port of the communication interface J3.
[0012] Compared with existing technologies, the TTL circuit compatible with multiple communication protocols proposed in this invention has the following advantages: 1. The TTL circuit proposed in this invention allows the main control module to output a corresponding mode switching signal based on the user's input mode selection command. After receiving the mode switching signal, the multi-protocol conversion module can switch to the communication mode required by the user. This enables the TTL circuit to communicate and debug with devices using various communication protocols without the need for additional dedicated communication conversion equipment, greatly improving the compatibility and versatility of the TTL circuit. Secondly, since the TTL circuit can achieve conversion between multiple communication protocols without replacing dedicated communication equipment or corresponding communication modules, it avoids the risk of signal interference caused by incompatibility between different communication modules, which could lead to unstable communication signal transmission.
[0013] 2. The multi-protocol conversion module proposed in this invention integrates three different communication modes without the need for additional configuration of other communication protocol devices, thus reducing hardware costs and system complexity. Secondly, in addition to supporting common UART and IIC communication protocols, it can also customize communication protocols according to the design requirements of actual products, thereby greatly improving the compatibility, versatility and market adaptability of the TTL circuit. [Attached Image Description] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0014] Figure 1 This is a circuit structure block diagram of the present invention; Figure 2 This is the circuit schematic diagram of the present invention.
Detailed Implementation Methods
[0015] Specific embodiments, combined with Figures 1 to 2 As shown, the technical solution of the present invention is further illustrated. A TTL circuit compatible with multiple communication protocols includes a mode selection module 100, a main control module 200, and a multi-protocol conversion module 300. The mode selection module 100 is used to output a mode selection command. The control signal input terminal of the main control module 200 is connected to the output terminal of the mode selection module 100. The main control module is used to output a mode switching signal according to the mode selection command to switch the communication mode of the TTL circuit. The input terminal of the multi-protocol conversion module 300 is connected to the control signal output terminal of the main control module 200. The output terminal of the multi-protocol conversion module 300 is used to perform communication mode switching according to the mode switching signal.
[0016] In this embodiment, the main control module outputs a corresponding mode switching signal based on the user's input mode selection command. After receiving the mode switching signal, the multi-protocol conversion module can switch to the communication mode required by the user. This enables the TTL circuit to communicate and debug with devices of various communication protocols without the need for additional dedicated communication conversion equipment, greatly improving the compatibility and versatility of the TTL circuit. Secondly, since the TTL circuit can achieve conversion between multiple communication protocols without replacing dedicated communication equipment or corresponding communication modules, it avoids the risk of signal interference caused by incompatibility between different communication modules, which could lead to unstable communication signal transmission.
[0017] Furthermore, as a preferred embodiment of this solution and not a limitation thereof, the mode selection module 100 includes a push button switch KEY1 and a resistor R7. The first end of the push button switch KEY1 is grounded, the second end of the push button switch KEY1 is connected to one end of the resistor R7, and the other end of the resistor R7 is connected to the control signal input terminal (i.e., the MODE_KEY terminal) of the main control module 200.
[0018] Specifically, the TTL circuit in this embodiment has three communication modes: serial UART communication mode, custom communication mode, and IIC communication mode. The communication mode of the TTL circuit can be selected by using the button switch KEY1. When the TTL circuit in this embodiment is initially running, its communication mode is the serial UART communication mode by default. When it is necessary to switch the communication mode of the TTL circuit, press and hold button KEY1 for 2 seconds. At this time, the communication mode of the TTL circuit will switch from the serial UART communication mode to the custom communication mode. If button KEY1 is pressed and held for 2 seconds again, the communication mode of the TTL circuit will switch from the custom communication mode to the IIC communication mode, and so on. Every time button KEY1 is pressed and held for 2 seconds, the communication mode of the TTL circuit will switch once.
[0019] In this embodiment, the user can switch the communication mode simply by pressing the button switch KEY1, without the need for complex software configuration, which lowers the barrier to entry. Secondly, the circuit structure is simple, which reduces the risk of failure caused by complex circuits.
[0020] Furthermore, as a preferred embodiment of this solution and not a limitation thereof, the multi-protocol conversion module 300 includes a first communication mode unit 310, a second communication mode unit 320, and a third communication mode unit 330. The input terminal of the first communication mode unit 310 is connected to the first control signal output terminal of the main control module 200, and the output terminal of the first communication mode unit 310 is used to execute the serial port UART communication mode. The input terminal of the second communication mode unit 320 is connected to the second control signal output terminal of the main control module 200, and the output terminal of the second communication mode unit 320 is used to execute the custom communication mode. The input terminal of the third communication mode unit 330 is connected to the third control signal output terminal of the main control module 200, and the output terminal of the third communication mode unit 330 is used to execute the IIC communication mode.
[0021] In this embodiment, the multi-protocol conversion module integrates three different communication modes without the need for additional communication protocol devices, reducing hardware costs and system complexity. Secondly, in addition to supporting common UART and IIC communication protocols, it can also customize communication protocols according to the design requirements of actual products, thereby greatly improving the compatibility, versatility and market adaptability of the TTL circuit.
[0022] In a preferred embodiment, the first communication mode unit 310 includes a USB interface J1, a UART communication protocol subunit 311, and a first communication subunit 312. The input end of the USB interface J1 is connected to a USB device to obtain USB information from the USB device. The input end of the UART communication protocol subunit 311 is connected to the output end of the USB interface J1 and is used to convert the USB information into UART communication information. The input end of the first communication subunit 312 is connected to the serial communication end of the UART communication protocol subunit 311. The controlled end of the first communication subunit 311 is connected to the first control signal output end of the main control module 200. After receiving the first control signal output by the main control module 200, the first communication subunit 311 executes the serial UART communication mode.
[0023] The USB device includes a communication device with a USB port for communication or a USB host.
[0024] Alternatively, the UART communication protocol subunit 311 includes a UART protocol conversion chip U2, resistors R5 and R6. The positive USB signal output terminal (i.e., the second port) of the USB interface J1 is connected to the positive USB signal input terminal (i.e., the D+ terminal) of the UART protocol conversion chip U2. The negative USB signal output terminal (i.e., the third port) of the USB interface J1 is connected to the negative USB signal input terminal (i.e., the D- terminal) of the UART protocol conversion chip U2. The first serial communication terminal (i.e., the TXD terminal) of the UART protocol conversion chip U2 is connected to one end of the resistor R5, and the other end of the resistor R5 is connected to the input terminal of the first communication subunit 312. The second serial communication terminal (i.e., the TXD terminal) of the UART protocol conversion chip U2 is connected to one end of the resistor R6, and the other end of the resistor R6 is connected to the input terminal of the first communication subunit 312.
[0025] The UART protocol conversion chip U2 is preferably of model CH340N.
[0026] Alternatively, the first communication subunit 311 includes a communication interface J3, a MOS transistor Q3, and a MOS transistor Q8. The first control signal output terminals (i.e., TCON2 and TCON3 terminals) of the main control module 200 are respectively connected to the gates of the MOS transistors Q3 and Q8. The first serial communication terminal (i.e., TXD terminal) of the UART communication protocol subunit 312 is connected to the source of the MOS transistor Q3. The drain of the MOS transistor Q3 is connected to the second port of the communication interface J3. The first serial communication terminal (i.e., RXD terminal) of the UART communication protocol subunit 312 is connected to the source of the MOS transistor Q8. The drain of the MOS transistor Q8 is connected to the fourth port of the communication interface J3.
[0027] Specifically, the USB device transmits USB information to the UART protocol conversion chip U2 through the positive output terminal (second port) and negative output terminal (third port) of the USB interface J1. After receiving the USB information, the positive input terminal (D+ terminal) and negative input terminal (D- terminal) of the USB interface J1 perform data analysis and processing, convert it into UART communication information, and then connect it to the input terminal of the first communication subunit 311 through the first serial communication terminal (TXD terminal) and the second serial communication terminal (RXD terminal) of the UART protocol conversion chip U2. If the communication mode of the TTL circuit is serial UART communication mode at this time, the first control signal output terminal (TCON2 terminal and TCON3 terminal) of the main control module 200 outputs the first control signal. After the gate of MOSFET Q3 and the gate of MOSFET Q8 receive the first control signal, they are turned on. Since the source of MOSFET Q3 and the source of MOSFET Q8 receive the UART communication information output by UART protocol conversion chip U2, the communication interface J3 will receive the UART communication information. That is, the external device can realize serial UART communication mode through the communication interface J3.
[0028] In this embodiment, the UART protocol conversion chip U2 is a USB bus conversion chip that can establish a stable USB to UART communication link. During the transmission and conversion of communication data, it can effectively reduce data loss, errors and communication interruptions, ensuring the reliability and quality of communication data transmission. Secondly, by controlling the conduction states of the gates of MOSFETs Q3 and Q8, the serial UART communication mode can be turned on or off. This enables precise control over the data transmission process, ensuring accurate sending and receiving of communication data. Furthermore, the MOSFETs have fast switching response characteristics, allowing for rapid mode switching, thereby improving data transmission efficiency and real-time performance, and meeting the requirements of high-speed data communication.
[0029] In a preferred embodiment, the second communication mode unit 320 includes a data transmission subunit 321 and a second communication subunit 322. The input terminal of the data transmission subunit 321 is connected to the communication control terminal of the main control module 200, and the output terminal of the data transmission subunit 321 is connected to the serial communication terminal of the UART communication protocol subunit 312. The data transmission subunit is used to upload communication data of the main control module 200 to a USB device or download communication data of the USB device to the main control module 200. The controlled terminal of the second communication subunit 322 is connected to the second control signal output terminal of the main control module 200, and the data communication terminal of the second communication subunit 322 is connected to the data communication terminal of the main control module 200. The second communication subunit is used to control the sending and receiving of communication data in a custom communication mode.
[0030] Alternatively, the data transmission subunit 321 includes MOS transistors Q1 and Q2. The first communication control terminal (i.e., the third terminal) of the main control module 200 is connected to the gate of the MOS transistor Q1, the source of the MOS transistor Q1 is connected to the first signal terminal (i.e., the first terminal) of the main control module 200, the drain of the MOS transistor Q1 is connected to the second serial communication terminal (i.e., the RXD terminal) of the UART communication protocol subunit 312, the second communication control terminal (i.e., the fourth terminal) of the main control module 200 is connected to the gate of the MOS transistor Q2, the source of the MOS transistor Q2 is connected to the second signal terminal (i.e., the second terminal) of the main control module 200, and the drain of the MOS transistor Q2 is connected to the first serial communication terminal (i.e., the TXD terminal) of the UART communication protocol subunit 312.
[0031] Alternatively, the second communication subunit 322 includes a MOS transistor Q10, the second control signal output terminal (i.e., MCON3 terminal) of the main control module 200 is connected to the gate (i.e., the controlled terminal) of the MOS transistor Q10, the drain of the MOS transistor Q10 is connected to the fourth port of the communication interface J3, and the source of the MOS transistor Q10 is connected to the data communication terminal (i.e., RX terminal) of the main control module 200.
[0032] Specifically, if the communication mode of the TTL circuit is a custom communication mode, the second control signal output terminal (MCON3 terminal) of the main control module 200 outputs a second control signal. After the gate of the MOS transistor Q10 receives the second control signal, it turns on. At this time, the user can send the custom communication protocol data through the communication interface J3 according to the communication protocol requirements of the actual product. After the drain of the MOS transistor Q10 receives the custom communication protocol data sent by the communication interface J3, it will transmit it to the data communication terminal (RX terminal) of the main control module 200. Then the user sends the custom communication protocol data to the main control module 200. At this time, the first communication control terminal (i.e., the third terminal) of the main control module 200 outputs a communication control signal. After the gate of the MOS transistor Q1 receives the communication control signal, it turns on and sends the custom communication protocol data to the second serial communication terminal (RXD terminal) of the UART protocol conversion chip U2. After the UART protocol conversion chip U2 receives the custom communication protocol data, it sends it to the USB device through the USB interface J1. When communication data on the USB device needs to be sent to an external device, the second communication control terminal (i.e., terminal 4) of the main control module outputs a second communication control signal. After receiving the second communication control signal, the gate of MOS transistor Q2 turns on. At this time, the first serial communication terminal (TXD terminal) of the UART protocol conversion chip U2 downloads the communication data on the USB device to the main control module 200. At this time, the second control signal output terminal (MCON3 terminal) of the main control module 200 outputs a second control signal. After receiving the second control signal, the gate of MOS transistor Q10 turns on. The main control module 200 downloads the communication data on the USB device to the external device through the communication interface J3. That is, the user can obtain the communication data with the USB device through the external device.
[0033] In this embodiment, the custom communication mode of the TTL circuit allows users to customize the data frame structure and communication protocol of the communication data according to the communication protocol requirements of the actual product, so as to adapt to application scenarios with special communication requirements and not be limited by fixed standard protocols. Secondly, by controlling the conduction state of the MOSFET, the custom communication mode can be turned on or off, as well as the sending and receiving of communication data. This enables precise control over the communication data transmission process, ensuring accurate sending and receiving of communication data. Furthermore, the MOSFET has a fast switching response characteristic, which can quickly achieve mode switching, thereby improving the efficiency and real-time performance of data transmission and meeting the needs of high-speed data communication.
[0034] In some preferred embodiments, the second communication subunit 322 further includes a MOS transistor Q9, the backup control signal output terminal (i.e., MCON2 terminal) of the main control module 200 is connected to the gate of the MOS transistor Q9, the drain of the MOS transistor Q9 is connected to the second port of the communication interface J3, and the source of the MOS transistor Q9 is connected to the backup data communication terminal (i.e., TX terminal) of the main control module 200.
[0035] In this embodiment, the custom communication mode is designed with a backup communication control channel, so that when MOSFET Q10 malfunctions, the backup control channel of MOSFET Q9 can take over the communication control of MOSFET Q10, preventing the entire communication system from being paralyzed due to a single communication link failure, ensuring communication continuity and improving system reliability.
[0036] In a preferred embodiment, the third communication mode unit 330 includes an emulator interface J7, MOSFETs Q5, Q6, and Q7. The third control signal output terminals (i.e., DCON1, DCON2, and DCON3) of the main control module 200 are respectively connected to the gates of MOSFETs Q5, Q6, and Q7. The drain of MOSFET Q5 is connected to the first port of the emulator interface J7, the source of MOSFET Q5 is connected to the first port of the communication interface J3, the drain of MOSFET Q6 is connected to the second port of the emulator interface J7, the source of MOSFET Q6 is connected to the second port of the communication interface J3, the drain of MOSFET Q7 is connected to the fourth port of the emulator interface J7, and the source of MOSFET Q7 is connected to the fourth port of the communication interface J3.
[0037] Specifically, if the TTL circuit is in IIC communication mode, the user can connect the emulator to emulator interface J7 and the device under test (DUT) to communication interface J3 to debug the DUT. The specific communication link is as follows: When in IIC communication mode, the third control signal output terminals (DCON1, DCON2 and DCON3) of the main control module 200 output the third control signal. At this time, the gates of MOSFET Q5, MOSFET Q6 and MOSFET Q7 receive the third control signal and are turned on. At this time, a communication link is established between the emulator interface J7 and the communication interface J3, so that the device under test can be tested through the emulator.
[0038] In this embodiment, the IIC communication mode of the TTL circuit is mainly used for debugging the device under test. That is, by establishing a communication link between the simulator interface J7 and the communication interface J3, the device under test can be tested for communication, making the debugging process more efficient and convenient. It can also quickly discover and solve problems that occur in the device under test during the IIC communication process, thereby greatly shortening the product development cycle. Secondly, the communication link established by the MOSFET can limit and isolate the fault to a certain extent if the simulator or the device under test has abnormal current or voltage during the debugging process, thus preventing damage to the device under test and providing high test safety.
[0039] It should be noted that the above description of the application scenarios of the IIC communication mode of this TTL circuit in equipment debugging is not intended to limit the specific application scope, but rather to provide a better implementation scenario. In actual use, it can also be applied to other scenarios, such as communication connections between two products to achieve mutual control between the products.
[0040] Furthermore, as a preferred embodiment of this solution and not a limitation, the main control module 200 includes a main control chip U1, and the model of the main control chip U1 is preferably SC95F761BP48R.
[0041] Furthermore, as a preferred embodiment of this solution and not a limitation, it also includes a communication mode indicator module 400. The communication mode indicator module 400 includes LED3, LED4, LED5, resistors R8, R9, and R10. The first indicator terminal (i.e., the 13th terminal) of the main control module 200 is connected to one end of the resistor R8, and the other end of the resistor R8 is connected to the positive terminal of the LED3. The negative terminal of the LED3 is grounded. The second indicator terminal (i.e., the 14th terminal) of the main control module 200 is connected to one end of the resistor R9, and the other end of the resistor R9 is connected to the positive terminal of the LED4. The negative terminal of the LED4 is grounded. The third indicator terminal (i.e., the 15th terminal) of the main control module 200 is connected to one end of the resistor R10, and the other end of the resistor R10 is connected to the positive terminal of the LED5. The negative terminal of the LED5 is grounded.
[0042] Specifically, when the communication mode of the TTL circuit is serial UART communication mode, the first indicator terminal (i.e., the 13th terminal) of the main control module 200 outputs the first indicator signal, and the light-emitting diode LED3 lights up after receiving the first indicator signal; When the communication mode of the TTL circuit is the custom communication mode, the second indicator terminal (i.e., the 14th terminal) of the main control module 200 outputs the second indicator signal, and the light-emitting diode LED4 lights up after receiving the second indicator signal; When the communication mode of the TTL circuit is IIC communication mode, the third indicator terminal (i.e., terminal 15) of the main control module 200 outputs the third indicator signal, and the light-emitting diode LED4 lights up after receiving the third indicator signal.
[0043] In this embodiment, the user can intuitively know the current communication mode of the TTL circuit by observing the on / off status of different LEDs. This allows the user to confirm whether the current communication mode meets the current usage requirements, avoiding mismatches that could lead to malfunctions. Alternatively, the user can check whether the communication mode can be switched normally, enabling timely troubleshooting and repair.
[0044] Those skilled in the art should understand that the above description is one embodiment provided in conjunction with specific content, and does not imply that the specific implementation of the present invention is limited to these descriptions. Furthermore, due to differences in industry naming conventions, the invention is not limited to the above names or English names. Any methods or structures similar to or identical to those of the present invention, or any technical deductions or substitutions made based on the concept of the present invention, should be considered within the scope of protection of the present invention.
Claims
1. A TTL circuit compatible with multiple communication protocols, characterized in that, include: The mode selection module is used to output mode selection instructions; The main control module has its control signal input terminal connected to the output terminal of the mode selection module. The main control module is used to output a mode switching signal according to the mode selection command to switch the communication mode of the TTL circuit. A multi-protocol conversion module is provided, the input of which is connected to the control signal output of the main control module, and the output of which is used to switch the communication mode according to the mode switching signal.
2. The TTL circuit compatible with multiple communication protocols according to claim 1, characterized in that, The mode selection module includes a push button switch KEY1 and a resistor R7. The first end of the push button switch KEY1 is grounded, the second end of the push button switch KEY1 is connected to one end of the resistor R7, and the other end of the resistor R7 is connected to the control signal input terminal of the main control module.
3. A TTL circuit compatible with multiple communication protocols according to claim 1, characterized in that, The multi-protocol conversion module includes: The first communication mode unit has its input terminal connected to the first control signal output terminal of the main control module, and its output terminal is used to execute the serial port UART communication mode. The second communication mode unit has its input terminal connected to the second control signal output terminal of the main control module, and its output terminal is used to execute a custom communication mode. The third communication mode unit has its input terminal connected to the third control signal output terminal of the main control module, and its output terminal is used to execute the IIC communication mode.
4. A TTL circuit compatible with multiple communication protocols according to claim 3, characterized in that, The first communication mode unit includes: USB interface, the input end of which is connected to a USB device to obtain USB information from the USB device; The UART communication protocol subunit has its input end connected to the output end of the USB interface, and is used to convert the USB information into UART communication information. The first communication subunit has its input terminal connected to the serial communication terminal of the UART communication protocol subunit, and its controlled terminal connected to the first control signal output terminal of the main control module. After receiving the first control signal output by the main control module, the first communication subunit executes the serial UART communication mode.
5. A TTL circuit compatible with multiple communication protocols according to claim 4, characterized in that, The UART communication protocol subunit includes a UART protocol conversion chip U2, resistors R5 and R6. The positive output terminal of the USB interface is connected to the positive input terminal of the USB interface, and the negative output terminal of the USB interface is connected to the negative input terminal of the UART protocol conversion chip U2. The first serial communication terminal of the UART protocol conversion chip U2 is connected to one end of resistor R5, and the other end of resistor R5 is connected to the input terminal of the first communication subunit. The second serial communication terminal of the UART protocol conversion chip U2 is connected to one end of resistor R6, and the other end of resistor R6 is connected to the input terminal of the first communication subunit.
6. A TTL circuit compatible with multiple communication protocols according to claim 4, characterized in that, The second communication mode unit includes a communication interface J3, a MOSFET Q3, and a MOSFET Q8. The first control signal output terminal of the main control module is connected to the gates of the MOSFETs Q3 and Q8, respectively. The first serial communication terminal of the UART communication protocol subunit is connected to the source of the MOSFET Q3. The drain of the MOSFET Q3 is connected to the second port of the communication interface J3. The first serial communication terminal of the UART communication protocol subunit is connected to the source of the MOSFET Q8. The drain of the MOSFET Q8 is connected to the fourth port of the communication interface J3.
7. A TTL circuit compatible with multiple communication protocols according to claim 6, characterized in that, The second communication mode unit includes: The data transmission subunit has its controlled end connected to the communication control end of the main control module and its input end connected to the serial communication end of the UART communication protocol subunit. The data transmission subunit is used to upload the communication data of the main control module to the USB device or download the communication data of the USB device to the main control module. The second communication subunit has its controlled end connected to the second control signal output end of the main control module, and its data communication end connected to the data communication end of the main control module. The second communication subunit is used to control the sending and receiving of communication data in a custom communication mode.
8. A TTL circuit compatible with multiple communication protocols according to claim 7, characterized in that, The data transmission subunit includes MOS transistors Q1 and Q2. The first communication control terminal of the main control module is connected to the gate of MOS transistor Q1, the source of MOS transistor Q1 is connected to the first signal terminal of the main control module, the drain of MOS transistor Q1 is connected to the second serial communication terminal of the UART communication protocol subunit, the second communication control terminal of the main control module is connected to the gate of MOS transistor Q2, the source of MOS transistor Q2 is connected to the second signal terminal of the main control module, and the drain of MOS transistor Q2 is connected to the first serial communication terminal of the UART communication protocol subunit.
9. A TTL circuit compatible with multiple communication protocols according to claim 7, characterized in that, The second communication subunit includes a MOS transistor Q10. The second control signal output terminal of the main control module is connected to the gate of the MOS transistor Q10, the drain of the MOS transistor Q10 is connected to the fourth port of the communication interface J3, and the source of the MOS transistor Q10 is connected to the data communication terminal of the main control module.
10. A TTL circuit compatible with multiple communication protocols according to claim 6, characterized in that, The third communication mode unit includes an emulator interface J7, MOSFETs Q5, Q6, and Q7. The third control signal output terminal of the main control module is connected to the gates of MOSFETs Q5, Q6, and Q7, respectively. The drain of MOSFET Q5 is connected to the first port of the emulator interface J7, and the source of MOSFET Q5 is connected to the first port of the communication interface J3. The drain of MOSFET Q6 is connected to the second port of the emulator interface J7, and the source of MOSFET Q6 is connected to the second port of the communication interface J3. The drain of MOSFET Q7 is connected to the fourth port of the emulator interface J7, and the source of MOSFET Q7 is connected to the fourth port of the communication interface J3.