Triode-based half-duplex bus initial state control circuit

Through the half-duplex bus initial state control circuit based on transistors, the GPIO port of the processor is used to control the transistor and resistor network, which solves the problem of uncertain status of the half-duplex bus before power-on, ensures the certainty of the bus status, and avoids Data anomaly.

CN221707906UActive Publication Date: 2024-09-13WUHAN AVIATION INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202322843173.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2024-09-13
Estimated Expiration
2033-10-20

AI Technical Summary

Technical Problem

Before the master device or slave device is powered on and the software initializes and enters the normal working state, the status of the half-duplex bus transceiver is uncertain, which may cause bus data errors.

Method used

Design a half-duplex bus initial state control circuit based on transistors, control the base of the transistor through the GPIO port of the processor, and combine the resistors R1, R2 and R3 to ensure that the transistor is in a saturated state, and the initial state of the fixed bus transceiver is receiving or sent to avoid bus status uncertainty.

Benefits of technology

It effectively avoids the problem of uncertainty in the bus status before the system is powered on and the software is initialized, ensuring the certainty of the bus status and preventing the abnormality of the first frame data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221707906U
    Figure CN221707906U
Patent Text Reader

Abstract

The utility model belongs to the technical field of communication control, and particularly relates to a half-duplex bus initial state control circuit based on a triode, which comprises a processor, a bus transceiver, a triode and resistors R1, R2 and R3, an input / output interface GPIO (General Purpose Input / Output) of the processor is connected with a base electrode of the triode through the resistor R2, a collector electrode of the triode is connected to a power supply through the resistor R3, and the bus transceiver is connected with the triode. One end of the resistor R1 is connected with a power supply, the other end of the resistor R1 is connected with an input / output interface GPIO of the processor, a collector electrode of the triode is respectively connected with a driver enable end DE of the bus transceiver and a receiver enable end # imgabs0 # triode, and an emitter electrode of the triode is grounded; the initial state of the half-duplex bus transceiver is controlled through the triode, so that the problem that the bus state is uncertain before the system is powered on and software initialization is completed and enters a normal working state is effectively avoided. Therefore, the state certainty of the bus is ensured, and the abnormality of the first frame data caused by the occupation of the bus during power-on is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the technical field of communication control, and in particular relates to a half-duplex bus initial state control circuit based on a triode. Background Art

[0002] At present, digital sensors are increasingly widely used in China, and bus outputs include full-duplex and half-duplex bus outputs. Half-duplex bus output controls the bus transceiver's drive enable end and receive enable end to put it in the sending state and receiving state. Most of the half-duplex bus is used for networking. During the networking communication process, the receiving and sending states of the bus are controlled by the software of the master and slave devices. After the master and slave software are initialized and in normal working state, there will be no problems with software timing control. However, before the master and slave devices are powered on and the software is initialized to enter the normal working state, the bus transceiver is in an uncertain state. It may happen that the slave device is in the sending state, resulting in unwanted data on the bus, causing bus data errors.

[0003] In order to avoid the instability of the bus state from power-on to the software entering the normal working state, a half-duplex bus initial state control circuit based on transistors is designed. Summary of the invention

[0004] The utility model aims to provide a half-duplex bus initial state control circuit based on transistors to solve the problem that the bus state is uncertain after the half-duplex bus is powered on and before the system software is initialized and enters the normal working state, which may cause the bus to be occupied.

[0005] The technical solution of the utility model is:

[0006] A half-duplex bus initial state control circuit based on transistors comprises a processor, a bus transceiver, a transistor and resistors R1, R2 and R3, wherein an input / output interface GPIO of the processor is connected to the base of the transistor via the resistor R2, a collector of the transistor is connected to a power supply via the resistor R3, one end of the resistor R1 is connected to the power supply, and the other end is connected to the input / output interface GPIO of the processor, the collector of the transistor is respectively connected to a driver enable terminal DE and a receiver enable terminal RE of the bus transceiver, and the emitter of the transistor is grounded.

[0007] Furthermore, the bus transceiver is a MAX3485 bus transceiver, and the manufacturer is MAXIM.

[0008] Furthermore, the transistor is a PMBT2222A transistor, manufactured by NXP.

[0009] Furthermore, the resistance value of the resistor R1 is 4.7KΩ. To ensure a pull-up effect, 4.7KΩ is usually selected.

[0010] Furthermore, the resistance value of the resistor R2 is 4.7KΩ. Ensure that the transistor is in saturation state, the emitter is forward biased, and V B >V E At this time, check the transistor data sheet to select the base current I B =100uA, at this time, the base voltage of the transistor is guaranteed to be greater than 0.7V, it can be concluded that R2 < (3.3-0.7) / 0.1 = 26KΩ, here we take 4.7KΩ.

[0011] Furthermore, the resistance value of the resistor R3 is 10KΩ. The resistor R3 ensures that when the transistor is in saturation, V CE Small enough, corresponding to the current I through the collector C It is small enough, and under the premise of not exceeding the maximum limiting current of the collector, a common resistor of 10KΩ is selected.

[0012] Furthermore, the power supply is +3.3V.

[0013] The utility model has the advantages that the half-duplex bus initial state control circuit based on transistors of the utility model controls the initial state of the half-duplex bus transceiver through transistors, effectively avoiding the problem of uncertain bus state from system power-on to software initialization completion and entering normal working state. The state certainty of the bus is ensured, and the bus occupation during power-on is avoided, resulting in abnormal first frame data. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The schematic diagram is a structural principle diagram of a half-duplex bus initial state control circuit based on transistors. DETAILED DESCRIPTION

[0015] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0016] A half-duplex bus initial state control circuit based on transistors comprises a processor, a bus transceiver, a transistor and resistors R1, R2 and R3, wherein an input / output interface GPIO of the processor is connected to the base of the transistor via the resistor R2, a collector of the transistor is connected to a power supply via the resistor R3, one end of the resistor R1 is connected to the power supply, and the other end is connected to the input / output interface GPIO of the processor, the collector of the transistor is respectively connected to a driver enable terminal DE and a receiver enable terminal RE of the bus transceiver, and the emitter of the transistor is grounded.

[0017] Furthermore, the bus transceiver is a MAX3485 bus transceiver, and the manufacturer is MAXIM.

[0018] Furthermore, the transistor is a PMBT2222A transistor, manufactured by NXP.

[0019] Furthermore, the resistance value of the resistor R1 is 4.7KΩ. To ensure a pull-up effect, 4.7KΩ is usually selected.

[0020] Furthermore, the resistance value of the resistor R2 is 4.7KΩ. Ensure that the transistor is in saturation state, the emitter is forward biased, and V B >V E At this time, check the transistor data sheet to select the base current I B =100uA, at this time, the base voltage of the transistor is guaranteed to be greater than 0.7V, it can be concluded that R2 < (3.3-0.7) / 0.1 = 26KΩ, here we take 4.7KΩ.

[0021] Furthermore, the resistance value of the resistor R3 is 10KΩ. The resistor R3 ensures that when the transistor is in saturation, V CE Small enough, corresponding to the current I through the collector C It is small enough, and under the premise of not exceeding the maximum limiting current of the collector, a common resistor of 10KΩ is selected.

[0022] Furthermore, the power supply is +3.3V.

[0023] Another embodiment of the present invention provides a half-duplex bus initial state control circuit based on a transistor, comprising a processor, a transistor, and a half-duplex bus transceiver. The processor GPIO port controls the base input of the transistor, and the transistor is fixed to a high level or a low level according to the GPIO port state after the system is powered on and initialized, and the half-duplex bus transceiver controls the bus state according to the driver enable terminal DE and the receiver enable terminal / RE state.

[0024] After the processor is powered on and reset but before the processor software is running, the GPIO port is at a fixed high level / low level depending on the processor type. According to the state of the processor GPIO port, determine the value of the transistor peripheral resistor to ensure that the transistor collector is at a low level. The transistor collector is connected to the drive enable end / receive enable end of the half-duplex transceiver, so that the half-duplex transceiver is in the receiving state from the processor power-on reset to the software running, and will not cause bus occupation.

[0025] See also Figure 1After the processor is powered on and reset, the GPIO port is at a high level. Resistors R1, R2, R3 and transistor Q1 form a transistor processing circuit. When the GPIO port is at a high level, the transistor is turned on, and the collector and emitter of the transistor are turned on, and the collector, i.e., Ctrl, is at a low level. The bus transceiver drive enable end and the receive enable end share a control port Ctrl. When Ctrl is at a low level, the bus transceiver is in a receiving state and receives data from the bus through the A / B interface.

[0026] When the GPIO port is at a low level, the transistor is cut off, and the collector and emitter of the transistor are disconnected. When Ctrl is at a high level, the bus transceiver is in the sending state, and the processor-related data is sent through the bus through the A / B interface. After the processor is powered on and reset, the GPIO port is fixed at a high level, and the receiving enable end of the bus transceiver is at a low level after passing through the transistor. The bus transceiver is in the receiving state, which avoids sending data to the bus and causing a bus failure. After normal operation, the first frame of data reception error occurs.

Claims

1. A half-duplex bus initial state control circuit based on transistors, It is characterized in that It includes a processor, a bus transceiver, a transistor and resistors R1, R2 and R3. The input and output interface GPIO of the processor is connected to the base of the transistor through the resistor R2, the collector of the transistor is connected to the power supply through the resistor R3, one end of the resistor R1 is connected to the power supply, and the other end is connected to the input and output interface GPIO of the processor, the collector of the transistor is respectively connected to the driver enable terminal DE and the receiver enable terminal RE of the bus transceiver, and the emitter of the transistor is grounded.

2. A half-duplex bus initial state control circuit based on a transistor according to claim 1, It is characterized in that The bus transceiver is the MAX3485 line bus transceiver.

3. A half-duplex bus initial state control circuit based on transistor according to claim 1, It is characterized in that The triode is a PMBT2222A triode.

4. A half-duplex bus initial state control circuit based on transistor according to claim 3, It is characterized in that The resistance value of the resistor R1 is 4.7KΩ.

5. A half-duplex bus initial state control circuit based on transistor according to claim 3, It is characterized in that The resistance value of the resistor R2 is 4.7KΩ.

6. A half-duplex bus initial state control circuit based on transistor according to claim 3, It is characterized in that The resistance value of the resistor R3 is 10KΩ.

7. A half-duplex bus initial state control circuit based on transistor according to claim 1, It is characterized in that The power supply is +3.3V.