CN211319205U - Communication interface conversion circuit - Google Patents

Communication interface conversion circuit Download PDF

Info

Publication number
CN211319205U
CN211319205U CN201922440743.1U CN201922440743U CN211319205U CN 211319205 U CN211319205 U CN 211319205U CN 201922440743 U CN201922440743 U CN 201922440743U CN 211319205 U CN211319205 U CN 211319205U
Authority
CN
China
Prior art keywords
pin
interface
chip
circuit module
serial port
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
CN201922440743.1U
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.)
Shanghai Holystar Information Technology Co ltd
Original Assignee
Shanghai Holystar Information 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 Shanghai Holystar Information Technology Co ltd filed Critical Shanghai Holystar Information Technology Co ltd
Priority to CN201922440743.1U priority Critical patent/CN211319205U/en
Application granted granted Critical
Publication of CN211319205U publication Critical patent/CN211319205U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model discloses a communication interface converting circuit belongs to signal transmission technical field, include: the MCU master control unit comprises a control pin, a first serial port pin and a second serial port pin; the control circuit module is connected with the first serial port pin, the second serial port pin and the first output end respectively; the second input end of the RS232 interface circuit module is connected with an external RS232 signal, and the second output end of the RS232 interface circuit module is connected with the logic conversion chip; the third input end of the RS485 interface circuit module is connected with an external RS485 signal, and the third output end of the RS485 interface circuit module is connected with the logic conversion chip; the beneficial effects are that: the circuit can be freely switched between the functions of the RS232 interface and the RS485 interface according to the communication mode required by the site, only one path of interface of the MCU is required to be occupied, not only is the resource of the MCU saved, but also the number of the shell communication interfaces is saved, and the cost is saved.

Description

Communication interface conversion circuit
Technical Field
The utility model relates to a signal transmission technical field especially relates to a communication interface converting circuit.
Background
In the existing industrial scene application, the electrical interface of the serial port is most common in the form of RS232 and RS485, the serial port is mostly input and output from the pin of the board card in the form of TTL signal, and a client needs to add a corresponding driving circuit unit on an application bottom plate of the client to obtain a required serial port interface, such as RS232 or RS 485. In practical application, because the condition of the serial port interface of the field device is uncertain, the client device is required to have the functions of the RS232 interface and the RS485 interface at the same time.
In the prior art, the communication equipment generally adopts a mode that a group of serial ports of the MCU is converted into RS485 and a group of serial ports is converted into RS232, so that the communication equipment has the functions of two interfaces of RS232 and RS485, the board card is required to be provided with 2 communication interfaces by adopting the design mode, the realization cost is high, and the resource utilization rate of the MCU is not high.
SUMMERY OF THE UTILITY MODEL
According to the problems in the prior art, the communication interface conversion circuit is provided, the circuit can freely switch between the functions of the RS232 interface and the RS485 interface according to the communication mode required by the site, only one path of interface of the MCU needs to be occupied, the MCU resource is saved, the number of shell communication interfaces is saved, and the cost is saved.
The technical scheme specifically comprises the following steps:
a communication interface conversion circuit, comprising:
the MCU master control unit comprises a control pin, a first serial port pin and a second serial port pin;
the control circuit module comprises a first input end and a first output end, and the first input end is connected with the control pin;
the logic conversion chip is respectively connected with the first serial port pin, the second serial port pin and the first output end;
the RS232 interface circuit module comprises a second input end and a second output end, the second input end is connected with an external RS232 signal, and the second output end is connected with the logic conversion chip;
the RS485 interface circuit module comprises a third input end and a third output end, the third input end is connected with an external RS485 signal, and the third output end is connected with the logic conversion chip.
Preferably, the model of the logic conversion chip is TS5a 23159.
Preferably, the first output terminal is connected to the IN1 pin and the IN2 pin of the logic conversion chip.
Preferably, the first serial port pin is connected to a COM1 pin of the logic conversion chip, and the second serial port pin is connected to a COM2 pin of the logic conversion chip.
Preferably, the second output terminal is respectively connected with the NO1 pin and the NO2 pin of the logic conversion chip, and the third output terminal is respectively connected with the NC1 pin and the NC2 pin of the logic conversion chip.
Preferably, the control circuit module specifically includes:
the optical coupler is connected with the first input end through a first resistor;
a first fixed voltage terminal connected to the optocoupler;
and the second fixed voltage end is connected with the optical coupler through a second resistor and is connected with the first output end.
Preferably, the type of the optical coupler is TLP 127.
Preferably, the RS232 interface circuit module specifically includes:
the RS232 interface chip is of a MAX232ESE model;
the two ends of the first capacitor are respectively connected with a C1+ pin and a C1-pin of the RS232 interface chip;
two ends of the second capacitor are respectively connected with a C2+ pin and a C2-pin of the RS232 interface chip;
the fixed voltage end is connected with a VCC pin of the RS232 interface chip and is connected with a V + pin of the RS232 interface chip through a third capacitor, and the V-pin of the RS232 interface chip is grounded through a fourth capacitor;
the second output end is respectively connected with a T2IN pin and an R2OUT pin of the RS232 interface chip;
and the second input end is respectively connected with a T2OUT pin and an R2IN pin of the RS232 interface chip.
Preferably, the RS232 interface circuit module further includes:
a fifth capacitor, through which a T2OUT pin of the RS232 interface chip is grounded;
and the pin R2IN of the RS232 interface chip is grounded through the sixth capacitor.
Preferably, the RS485 interface circuit module specifically includes:
the RS485 interface chip is of a MAX13487E model;
a RE pin, an SHDN pin and a VCC pin of the RS485 interface chip are respectively connected with the fourth fixed voltage terminal;
the VCC pin of the RS485 interface chip is grounded through a seventh capacitor;
an RO pin and a DI pin of the RS485 interface chip are respectively connected with the third output end, and a pin B and a pin A of the RS485 interface chip are respectively connected with the third input end;
the pin A of the RS485 interface chip is connected with the fourth fixed voltage end through a third resistor, and the pin B of the RS485 interface chip is grounded through a fourth resistor.
The beneficial effects of the above technical scheme are that:
the utility model provides a communication interface converting circuit, this circuit can freely switch between the function of two kinds of interfaces of RS232 and RS485 according to the communication mode that the on-the-spot needs used, only need occupy MCU's the interface all the way, has not only practiced thrift MCU's resource, has still saved the quantity of shell communication interface, has practiced thrift the cost.
Drawings
Fig. 1 is a block diagram of a communication interface conversion circuit according to a preferred embodiment of the present invention;
fig. 2 is a circuit diagram of a control circuit module according to a preferred embodiment of the present invention based on fig. 1;
fig. 3 is a circuit diagram of an RS232 interface circuit module according to a preferred embodiment of the present invention, based on fig. 1;
fig. 4 is a circuit diagram of an RS485 interface circuit module according to a preferred embodiment of the present invention, based on fig. 1;
the reference numerals in the above description denote descriptions:
MCU main control unit (1), control circuit module (2), logic conversion chip (3), RS232 interface circuit module (4), RS485 interface circuit module (5), first input (V)in1) First output terminal (V)out1) An optocoupler (U1), a first fixed voltage terminal (V)s1) Second fixed voltage terminal (V)s2) A first resistor (R1), a second resistor (R2), a second input terminal (V)in2) Second output terminal (V)out2) RS232 interface chip (U2), first electric capacity (C1), second electric capacity (C2), third electric capacity (C3), fourth electric capacity (C4), fifth electric capacity (C5), sixth electric capacity (C6), third fixed voltage end (V3)s3) A third input terminal (V)in3) A third output terminal (V)out3) RS485 interface chip (U3), and a fourth fixed voltage terminal (V)s4) A seventh capacitor (C7), a third resistor (R3), and a fourth resistor (R4).
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying 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 of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.
It should be noted that, in the present invention, the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention will be further described with reference to the accompanying drawings and specific embodiments, but the present invention is not limited thereto.
A communication interface conversion circuit, as shown in fig. 1, comprising:
the MCU master control unit 1 is characterized in that the MCU master control unit 1 comprises a control pin, a first serial port pin and a second serial port pin;
the control circuit module 2 comprises a first input terminal Vin1 and a first output terminal Vout1, wherein the first input terminal Vin1 is connected with the control pin;
the logic conversion chip 3 is respectively connected with the first serial port pin, the second serial port pin and the first output end Vout 1;
the RS232 interface circuit module 4 comprises a second input end Vin2 and a second output end Vout2, the second input end Vin2 is connected with an external RS232 signal, and the second output end Vout2 is connected with the logic conversion chip 3;
the RS485 interface circuit module 5, the RS485 interface circuit module 5 includes a third input terminal Vin3 and a third output terminal Vout3, the third input terminal Vin3 is connected to the external RS485 signal, and the third output terminal Vout3 is connected to the logic converting chip 3.
As a preferred embodiment, the first serial port pin of the MCU main control unit 1 is UART4_ RX, the second serial port pin is UART4_ TX, the control pin is 485&232_ SW2, the control pin is used to control the operation of the logic conversion chip 3, and the logic conversion chip 3 is driven by different control signals to switch the corresponding channels, so as to implement free switching between functions of the two interfaces RS232 and RS485 according to the communication mode required in the field.
In the preferred embodiment of the present invention, the logic conversion chip 3 has a model number TS5a 23159.
IN the preferred embodiment of the present invention, the first output terminal Vout1 is connected to the IN1 pin and the IN2 pin of the logic converting chip 3.
In the preferred embodiment of the present invention, the first serial pin is connected to the COM1 pin of the logic converting chip 3, and the second serial pin is connected to the COM2 pin of the logic converting chip 3.
In the preferred embodiment of the present invention, the second output terminal Vout2 is connected to the NC1 pin and the NC2 pin of the logic converting chip 3, respectively, and the third output terminal Vout3 is connected to the NO1 pin and the NO2 pin of the logic converting chip 3, respectively.
Specifically, IN the above embodiment, the control pins of the logic conversion chip 3TS5a23159 are the IN1 pin and the IN2 pin, the control signal output by the control pin of the MCU main control unit 1 is divided into a high level signal and a low level signal, when the control pin outputs a high level, that is, the IN1 pin and the IN2 pin are set high, the NO channel of the logic conversion chip 3TS5a23159 is opened, that is, the logic conversion chip 3TS5a23159 is switched to the NO1 pin and the NO2 pin to work, at this time, the RS485 interface circuit module 5 connected to the NO1 pin and the NO2 pin starts to work, that is, the serial port of the MCU main control unit 1 is communicated with the RS485 interface circuit module 5 to convert into an RS485 signal.
Similarly, when the control pin is at a low level, the IN1 pin and the IN2 pin are set to be low, the NO channel of the logic conversion chip 3TS5a23159 is closed, the NC channel is opened, that is, the logic conversion chip 3TS5a23159 is switched to the NC1 pin and the NC2 pin to work, and the RS232 interface circuit module 4 connected to the NC1 pin and the NC2 pin starts to work, that is, the serial port of the MCU main control unit 1 is communicated with the RS232 interface circuit module 4 to convert the serial port into an RS232 signal.
In the preferred embodiment of the present invention, as shown in fig. 2, the control circuit module 2 specifically includes:
the optical coupler U1, the optical coupler U1 is connected to the first input terminal Vin1 through a first resistor R1;
a first fixed voltage terminal Vs1 connected to optocoupler U1;
the second constant voltage terminal Vs2 is connected to the optocoupler U1 through a second resistor R2 and connected to the first output terminal Vout 1.
Specifically, in this embodiment, the control pin of the MCU main control unit 1 is isolated from the RS232 interface circuit module 4 and the RS485 interface circuit module 5 by the optical coupler U1, and this circuit design method can prevent the MCU main control unit 1 from being affected when the RS232 interface circuit module 4 and the RS485 interface circuit module 5 are damaged by external factors.
In the preferred embodiment of the present invention, the optocoupler U1 is model TLP 127.
In the preferred embodiment of the present invention, as shown in fig. 3, the RS232 interface circuit module 4 specifically includes:
the RS232 interface chip U2, the RS232 interface chip U2 model is MAX232 ESE;
two ends of a first capacitor C1 and a first capacitor C1 are respectively connected with a C1+ pin and a C1-pin of an RS232 interface chip U2;
two ends of a second capacitor C2, a second capacitor C2 are respectively connected with a C2+ pin and a C2-pin of the RS232 interface chip U2;
a third fixed voltage end Vs3, wherein the fixed voltage end is connected with a U2VCC pin of the RS232 interface chip and is connected with a V + pin of the U2 of the RS232 interface chip through a third capacitor C3, and a V-pin of the U2 of the RS232 interface chip is grounded through a fourth capacitor C4;
the second output end Vout2 is respectively connected with the T2IN pin and the R2OUT pin of the RS232 interface chip U2;
the second input terminal Vin2 is connected to the T2OUT pin and the R2IN pin of the RS232 interface chip U2, respectively.
In the preferred embodiment of the present invention, the RS232 interface circuit module 4 further includes:
a fifth capacitor C5, wherein the T2OUT pin of the RS232 interface chip U2 is grounded through the fifth capacitor C5;
and the pin R2IN of the sixth capacitor C6 and the RS232 interface chip U2 are grounded through the sixth capacitor C6.
Specifically, in this embodiment, the fifth capacitor C5 and the sixth capacitor C6 are connected to the T2OUT pin and the R2IN pin of the RS232 interface chip U2, respectively, as voltage-stabilizing capacitors, and function to collect the voltage on the line.
In the preferred embodiment of the present invention, as shown in fig. 4, the RS485 interface circuit module 5 specifically includes:
the RS485 interface chip U3, the RS485 interface chip U3 model is MAX 13487E;
a RE pin, an SHDN pin and a VCC pin of the RS485 interface chip U3 are respectively connected with a fourth fixed voltage end Vs4 and a fourth fixed voltage end Vs 4;
the VCC pin of the RS485 interface chip U3 is grounded through a seventh capacitor C7;
an RO pin and a DI pin of the RS485 interface chip U3 are respectively connected with a third output end Vout3, and a pin B and a pin A of the RS485 interface chip U3 are respectively connected with a third input end Vin 3;
the pin a of the RS485 interface chip U3 is connected to the fourth fixed voltage terminal Vs4 through a third resistor R3, and the pin B of the RS485 interface chip U3 is grounded through a fourth resistor R4.
The beneficial effects of the above technical scheme are that:
the utility model provides a communication interface converting circuit, this circuit can freely switch between the function of two kinds of interfaces of RS232 and RS485 according to the communication mode of the use of on-the-spot needs, only need occupy MCU's interface all the way, has not only practiced thrift MCU's resource, has still saved the quantity of shell communication interface, has practiced thrift the cost.
The above description is only an example of the preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and those skilled in the art should be able to realize the equivalent alternatives and obvious variations of the present invention.

Claims (10)

1. A communication interface conversion circuit, comprising:
the MCU master control unit comprises a control pin, a first serial port pin and a second serial port pin;
the control circuit module comprises a first input end and a first output end, and the first input end is connected with the control pin;
the logic conversion chip is respectively connected with the first serial port pin, the second serial port pin and the first output end;
the RS232 interface circuit module comprises a second input end and a second output end, the second input end is connected with an external RS232 signal, and the second output end is connected with the logic conversion chip;
the RS485 interface circuit module comprises a third input end and a third output end, the third input end is connected with an external RS485 signal, and the third output end is connected with the logic conversion chip.
2. The communication interface converting circuit of claim 1, wherein the logic converting chip is of a type TS5a 23159.
3. The communication interface conversion circuit of claim 2, wherein the first output terminal is connected to the IN1 pin and the IN2 pin of the logic conversion chip.
4. The communication interface conversion circuit according to claim 2, wherein the first serial port pin is connected to a COM1 pin of the logic conversion chip, and the second serial port pin is connected to a COM2 pin of the logic conversion chip.
5. The communication interface conversion circuit according to claim 2, wherein the second output terminal is connected to the NC1 pin and the NC2 pin of the logic conversion chip, respectively, and the third output terminal is connected to the NO1 pin and the NO2 pin of the logic conversion chip, respectively.
6. The communication interface conversion circuit according to claim 1, wherein the control circuit module specifically comprises:
the optical coupler is connected with the first input end through a first resistor;
a first fixed voltage terminal connected to the optocoupler;
and the second fixed voltage end is connected with the optical coupler through a second resistor and is connected with the first output end.
7. The communication interface converting circuit of claim 6, wherein the type of the optocoupler is TLP 127.
8. The communication interface conversion circuit of claim 1, wherein the RS232 interface circuit module specifically comprises:
the RS232 interface chip is of a MAX232ESE model;
the two ends of the first capacitor are respectively connected with a C1+ pin and a C1-pin of the RS232 interface chip;
two ends of the second capacitor are respectively connected with a C2+ pin and a C2-pin of the RS232 interface chip;
the fixed voltage end is connected with a VCC pin of the RS232 interface chip and is connected with a V + pin of the RS232 interface chip through a third capacitor, and the V-pin of the RS232 interface chip is grounded through a fourth capacitor;
the second output end is respectively connected with a T2IN pin and an R2OUT pin of the RS232 interface chip;
and the second input end is respectively connected with a T2OUT pin and an R2IN pin of the RS232 interface chip.
9. The communication interface conversion circuit of claim 8, wherein the RS232 interface circuit module further comprises:
a fifth capacitor, through which a T2OUT pin of the RS232 interface chip is grounded;
and the pin R2IN of the RS232 interface chip is grounded through the sixth capacitor.
10. The communication interface conversion circuit according to claim 1, wherein the RS485 interface circuit module specifically comprises:
the RS485 interface chip is of a MAX13487E model;
a RE pin, an SHDN pin and a VCC pin of the RS485 interface chip are respectively connected with the fourth fixed voltage terminal;
the VCC pin of the RS485 interface chip is grounded through a seventh capacitor;
an RO pin and a DI pin of the RS485 interface chip are respectively connected with the third output end, and a pin B and a pin A of the RS485 interface chip are respectively connected with the third input end;
the pin A of the RS485 interface chip is connected with the fourth fixed voltage end through a third resistor, and the pin B of the RS485 interface chip is grounded through a fourth resistor.
CN201922440743.1U 2019-12-30 2019-12-30 Communication interface conversion circuit Active CN211319205U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201922440743.1U CN211319205U (en) 2019-12-30 2019-12-30 Communication interface conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201922440743.1U CN211319205U (en) 2019-12-30 2019-12-30 Communication interface conversion circuit

Publications (1)

Publication Number Publication Date
CN211319205U true CN211319205U (en) 2020-08-21

Family

ID=72064213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201922440743.1U Active CN211319205U (en) 2019-12-30 2019-12-30 Communication interface conversion circuit

Country Status (1)

Country Link
CN (1) CN211319205U (en)

Similar Documents

Publication Publication Date Title
CN101718815A (en) Direct current (DC) bus voltage-sampling circuit of servo system converting voltage into frequency
CN102608927A (en) Device for expanding semaphore acquisition port
CN104202506A (en) Image stitching processor and image processing method thereof
CN211319205U (en) Communication interface conversion circuit
CN203324975U (en) Serial communication debugging tool
CN103116567B (en) The selection circuit of Multi-serial port
CN205302279U (en) Serial interface data protocol converter
CN212009333U (en) Interface board compatible with multiple interface signals
CN102608944A (en) Expansion device for semaphore acquisition port and expansion system
CN108540318A (en) A kind of Lower level logical implementation method and device for realizing that serial ports redirects
AU2009311067B2 (en) Master-slave mode direct current carrier communication system
CN108304339B (en) Serial port expansion circuit of dynamic management and control system and working method thereof
CN107273330B (en) Three-wire system serial communication interface isolation circuit module
CN204440387U (en) Many level translators used by card
CN112583401B (en) Isolated single-wire bidirectional transmission circuit based on digital isolator
CN214042270U (en) KVM switch based on Type-C port
CN210804414U (en) Circuit with reusable communication interface
CN211906270U (en) 485 device and RS485 interface of self-adaptation serial bus polarity
CN209785242U (en) Low-power-consumption multifunctional data acquisition unit
CN208297995U (en) Controller based on SBCM01 interface board
CN103868874A (en) Ultraviolet spectrophotometer
CN105512078A (en) SPI (serial peripheral interface) bus driving method and system and electronic equipment
CN216772413U (en) Human-computer interface system with data acquisition and Internet of things functions
CN217112493U (en) Voltage signal acquisition system
CN214042360U (en) Industrial electronic counter based on dragon core 1B and MachXO2-4000

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant