CN214900831U - Hardware multiplexing circuit based on UART communication - Google Patents

Hardware multiplexing circuit based on UART communication Download PDF

Info

Publication number
CN214900831U
CN214900831U CN202121360800.6U CN202121360800U CN214900831U CN 214900831 U CN214900831 U CN 214900831U CN 202121360800 U CN202121360800 U CN 202121360800U CN 214900831 U CN214900831 U CN 214900831U
Authority
CN
China
Prior art keywords
uart
level conversion
diode
conversion chip
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202121360800.6U
Other languages
Chinese (zh)
Inventor
张亚鑫
张俊杰
陈飞
程庭宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Exx Technology Co ltd
Original Assignee
Shenzhen Exx Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Exx Technology Co ltd filed Critical Shenzhen Exx Technology Co ltd
Priority to CN202121360800.6U priority Critical patent/CN214900831U/en
Application granted granted Critical
Publication of CN214900831U publication Critical patent/CN214900831U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Logic Circuits (AREA)

Abstract

The utility model discloses a hardware multiplexing circuit based on UART communication, including UART connecting circuit, RS485 level conversion chip, RS232 level conversion chip and DB9 interface. The UART connecting circuit comprises a diode D1, a diode D2 and a pull-up resistor R2, wherein the anode of the diode D1 and the anode of the diode D2 are connected with a UART _ RXD pin of the single chip microcomputer and are connected with 3V3 voltage through a pull-up resistor R2, the cathode of the diode D1 is connected with the UART _ RXD pin of the RS485 level conversion chip, and the cathode of the diode D2 is connected with the UART _ RXD pin of the RS232 level conversion chip. And the UART _ TXD pin of the RS485 level conversion chip and the UART _ TXD pin of the RS232 level conversion chip are connected with the UART _ TXD pin of the single chip microcomputer. Therefore, the problem that the UART interface resource of the single chip microcomputer is insufficient is solved.

Description

Hardware multiplexing circuit based on UART communication
Technical Field
The utility model relates to a technical field of UART communication, in particular to hardware multiplexing circuit based on UART communication.
Background
At present, when the single chip microcomputer is communicated with an RS232 chip and an RS485 chip, a UART interface is adopted for communication.
RS232 realizes full duplex by two wires, and the two wires are respectively arranged without mutual influence and can be carried out simultaneously; although the RS485 can implement full duplex by using four wires, it is rare in practical application that half duplex is implemented by using only two wires, and thus, switching between the "receiving state" and the "transmitting state" is involved, and the switching involves two situations:
1. the driver program already contains the accepting switch under the condition of half duplex, and the driver program can automatically switch according to the action of reading or writing. In this case, RS485 is programmed no different from RS 232.
2. The driver program does not have automatic switching, and at the moment, in order to complete the switching, an additional GPIO must be used to connect with the receiving enabling end of the RS485 transceiver module, and before data is received and sent, the enabling end is firstly set to enable the receiving enabling end to be in a correct receiving state or a correct sending state.
However, the number of the existing single chip microcomputer is generally 5 UART interfaces. When 485 and 232 chips are larger than the number of UART interfaces in the circuit, a single chip microcomputer is required to be added to meet the requirement, and the hardware cost is greatly increased.
SUMMERY OF THE UTILITY MODEL
Problem to prior art existence, the utility model aims at providing a hardware multiplexing circuit based on UART communication aims at solving the problem that the hardware cost increased when singlechip UART resource was not enough.
In order to achieve the above object, the utility model provides a hardware multiplexing circuit based on UART communication, including UART connecting circuit, RS485 level conversion chip, RS232 level conversion chip and DB9 interface;
the UART connecting circuit comprises a diode D1, a diode D2 and a pull-up resistor R2, wherein the anode of the diode D1 and the anode of the diode D2 are connected with a UART _ RXD pin of a singlechip, and are connected with 3V3 voltage through a pull-up resistor R2, the cathode of the diode D1 is connected with the UART _ RXD pin of an RS485 level conversion chip, and the cathode of the diode D2 is connected with the UART _ RXD pin of an RS232 level conversion chip;
and the UART _ TXD pin of the RS485 level conversion chip and the UART _ TXD pin of the RS232 level conversion chip are connected with the UART _ TXD pin of the singlechip.
The utility model discloses a set up UART connecting circuit between the UART interface of singlechip and RS485 level conversion chip and RS232 level conversion chip for RS485 level conversion chip and RS232 level conversion chip can multiplex a UART interface, thereby avoid the not enough problem of UART interface resource of singlechip.
Drawings
Fig. 1 is a schematic circuit diagram of an embodiment of the hardware multiplexing circuit based on UART communication according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by a person skilled in the art without creative work belong to the protection scope of the present invention.
Referring to fig. 1 of the specification, an embodiment of the present invention provides a hardware multiplexing circuit based on UART communication, which includes a single chip 100, a UART connection circuit 200, an RS485 level conversion chip 300, an RS232 level conversion chip 400, and a DB9 interface 500.
The UART connection circuit 200 includes a diode D1, a diode D2, and a pull-up resistor R2, wherein the anode of the diode D1 and the anode of the diode D2 are connected to the UART _ RXD pin of the monolithic computer 100 and are connected to the voltage of 3V3 through the pull-up resistor R2, the cathode of the diode D1 is connected to the UART _ RXD pin (RXD pin in the drawing) of the RS485 level conversion chip 300, and the cathode of the diode D2 is connected to the UART _ RXD pin (R1 _ OUT in the drawing) of the RS232 level conversion chip 400. When the UART _ RXD pin of the RS485 level shifter chip 300 and the UART _ RXD pin of the RS232 level shifter chip 400 do not receive information sent from the external device from the DB interface, they are at a high level, and the diode D1 and the diode D2 are not turned on, so the UART _ RXD pin of the single chip microcomputer 100 is also at a high level. When the UART _ RXD pin of the RS485 level shift chip 300 receives information sent from the external device from the DB interface, the UART _ RXD pin thereof becomes a low level, the diode D1 is turned on, the UART _ RXD pin of the singlechip 100 is pulled to a low level, and the operating principle of the RS232 level shift chip 400 is consistent with that of the RS485 level shift chip 300.
The UART _ TXD pin of the single chip microcomputer 100 is directly connected to the UART _ TXD of the RS485 level conversion chip 300 and the UART _ TXD pin of the RS232 level conversion chip 400 through a wire, and when the single chip microcomputer 100 transmits information through the UART _ TXD pin, the information is directly transmitted to the UART _ TXD pins of the RS232 level conversion chip 400 and the RS485 level conversion chip 300.
The A, B, Y, Z pin of the RS485 level conversion chip 300 and the T1_ OUT and R1_ IN pins of the RS485 level conversion chip 300 are connected to the DB9, so as to realize the transmission and reception of information with external devices through the DB9 interface 500.
The utility model discloses a set up UART connecting circuit 200 between singlechip 100's UART interface and RS485 level conversion chip 300 and RS232 level conversion chip 400 for RS485 level conversion chip 300 and RS232 level conversion chip 400 can multiplex a UART interface, thereby avoid singlechip 100's the not enough problem of UART interface resource.
The above is only the preferred embodiment of the present invention, not used in the present invention, and any slight modifications, equivalent replacements and improvements made by the technical entity of the present invention to the above embodiments should be included in the protection scope of the technical solution of the present invention.

Claims (1)

1. A hardware multiplexing circuit based on UART communication is characterized by comprising a UART connecting circuit, an RS485 level conversion chip, an RS232 level conversion chip and a DB9 interface;
the UART connecting circuit comprises a diode D1, a diode D2 and a pull-up resistor R2, wherein the anode of the diode D1 and the anode of the diode D2 are connected with a UART _ RXD pin of a singlechip, and are connected with 3V3 voltage through a pull-up resistor R2, the cathode of the diode D1 is connected with the UART _ RXD pin of an RS485 level conversion chip, and the cathode of the diode D2 is connected with the UART _ RXD pin of an RS232 level conversion chip;
and the UART _ TXD pin of the RS485 level conversion chip and the UART _ TXD pin of the RS232 level conversion chip are connected with the UART _ TXD pin of the singlechip.
CN202121360800.6U 2021-06-18 2021-06-18 Hardware multiplexing circuit based on UART communication Active CN214900831U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202121360800.6U CN214900831U (en) 2021-06-18 2021-06-18 Hardware multiplexing circuit based on UART communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202121360800.6U CN214900831U (en) 2021-06-18 2021-06-18 Hardware multiplexing circuit based on UART communication

Publications (1)

Publication Number Publication Date
CN214900831U true CN214900831U (en) 2021-11-26

Family

ID=78931217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202121360800.6U Active CN214900831U (en) 2021-06-18 2021-06-18 Hardware multiplexing circuit based on UART communication

Country Status (1)

Country Link
CN (1) CN214900831U (en)

Similar Documents

Publication Publication Date Title
CN101527735B (en) Multi-serial port data communication card equipment based on CPCI bus and method thereof
CN101005376A (en) Device and method for realizing service plate main control plate communication
CN101377764A (en) Allocating system of GPIO and data communicating method thereof
CN211742107U (en) USB TYPE-C-based bidirectional transmission circuit and electronic equipment
CN1333560C (en) High-performance optical fibre CAN communication system for strong electromagnetism interference environment
CN111538689A (en) Multi-channel PCIE (peripheral component interface express) adapter card with two heterogeneous ends
CN214900831U (en) Hardware multiplexing circuit based on UART communication
CN210639609U (en) RS232 and RS485 adaptive multiplexing circuit, module and equipment
US11394583B2 (en) Ethernet interconnection circuit and apparatus
CN209570926U (en) A kind of signal converting module and multi-channel interface switching device
CN107070547B (en) A kind of CPCI type gigabit Ethernet device with failure monitoring ability
CN112199312B (en) Interface conversion device of communication equipment and communication system
EP1970816A2 (en) A conversion circuit
US20070130297A1 (en) Interface device, interface cable apparatus, and communication method and system having the same
CN113111021A (en) UART master-slave line communication control circuit and method
CN113900985A (en) IO and SPI multiplexing chip, multiplexing auxiliary chip and data interaction method
CN108494889B (en) Communication circuit based on I2C bus and debugging method
CN216901487U (en) 5Mbps multi-protocol serial port card of PMC specification
CN216871114U (en) 10Mbps multi-protocol serial port card of PMC specification
CN210666755U (en) UART data interface extension circuit
CN103630987B (en) CFP optical module
CN115499032A (en) One-to-many UART communication method
CN212660174U (en) Network card and network equipment
CN216437355U (en) Camera with mixed transmission function
CN212782013U (en) Network card for PCIE _ M.2 interface expansion

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant