CN106708769B - A kind of adaptive serial interface circuit - Google Patents

A kind of adaptive serial interface circuit Download PDF

Info

Publication number
CN106708769B
CN106708769B CN201510420016.2A CN201510420016A CN106708769B CN 106708769 B CN106708769 B CN 106708769B CN 201510420016 A CN201510420016 A CN 201510420016A CN 106708769 B CN106708769 B CN 106708769B
Authority
CN
China
Prior art keywords
circuit
feet
micro
control unit
control
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
CN201510420016.2A
Other languages
Chinese (zh)
Other versions
CN106708769A (en
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.)
Beijing Aeonmed Co Ltd
Original Assignee
Beijing Aeonmed 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 Beijing Aeonmed Co Ltd filed Critical Beijing Aeonmed Co Ltd
Priority to CN201510420016.2A priority Critical patent/CN106708769B/en
Publication of CN106708769A publication Critical patent/CN106708769A/en
Application granted granted Critical
Publication of CN106708769B publication Critical patent/CN106708769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of adaptive serial interface circuits, comprising: equipment serial line interface, reversed ratio-voltage conditioning circuit, micro-control unit, control output circuit and self-adaptive switch circuit;The reversed ratio-voltage conditioning circuit divides 2 feet and 3 feet of two-way connection equipment serial line interface, for will be detected from 2 feet and 3 feet it is low level be converted to high level all the way after, output is to micro-control unit;The control output circuit is input to self-adaptive switch circuit after being used for the control signal by signal condition that micro-control unit export at complementation;The self-adaptive switch circuit utilizes the receiving end of the transmitting terminal connection equipment serial line interface of the control signal execution micro-control unit received, the order of the transmitting terminal of the receiving end connection equipment serial line interface of micro-control unit.Function is determined and automatically configured using what foregoing circuit realized serial ports line sequence, avoids the problem of serial interconnection intercommunication mistake in the case where unknown device end line sequence.

Description

A kind of adaptive serial interface circuit
Technical field
The present invention relates to serial interface technologies fields, and in particular to a kind of adaptive serial interface circuit.
Background technique
Existing serial line interface is generally fixed relative to the lead-out mode at external equipment end are as follows: the output of 3 feet, the input of 2 feet, 5 Foot is GND, after equipment end is linked into host, if 3 feet of the equipment end be input, 2 feet be output when can with host into The normal data transmission of row, conversely, then cannot achieve data-transformation facility.As shown in Figure 1, with RS232 serial ports connection host with For peripheral hardware, if the input of equipment end, output pin are unknown, its 3 foot is output, 2 feet after CON1 is linked into external serial ports When being input, necessarily cause external equipment that can not carry out data transmission with host.
Summary of the invention
It is an object of the present invention to solve existing serial line interface after connection host and equipment, due to cannot achieve The function of data sending terminal and receiving end Auto-matching, thus lead to not to carry out data transmission in the case where pin wrong Technical problem, the present invention provide a kind of adaptive serial interface circuit, can be realized equipment transmitting terminal and host using the circuit The Auto-matching of receiving end, equipment receiving end and host sending end.
To achieve the above object, a kind of adaptive serial interface circuit provided by the invention, comprising: equipment serial line interface, Reversed ratio-voltage conditioning circuit, micro-control unit, control output circuit and self-adaptive switch circuit;The reversed ratio electricity Pressure conditioning circuit divides 2 feet and 3 feet of two-way connection equipment serial line interface, for that will detect low level one from 2 feet and 3 feet After road is converted to high level, output to micro-control unit;The micro-control unit detects the transmitting terminal season control that 2 feet are equipment End MCUCTRL_OUT processed exports logical zero signal, if 3 feet of detection are the transmitting terminal season control terminal MCUCTRL_OUT of equipment Export logical one signal;The signal condition that the control output circuit is used to export micro-control unit is believed at complementary control Self-adaptive switch circuit is input to after number;The self-adaptive switch circuit executes microcontroller list using the control signal received The receiving end of transmitting terminal connection equipment serial line interface, the receiving end of micro-control unit of member connect the transmitting terminal of equipment serial line interface Order.
It as a further improvement of the above technical scheme, further include level shifting circuit, the level shifting circuit is used In being Transistor-Transistor Logic level the RS232 level conversion of micro-control unit port.
As a further improvement of the above technical scheme, the control output circuit is using two input terminals, four NAND gate Circuit structure, by the signal condition of micro-control unit output at complementary control signal.
A kind of the advantages of adaptive serial interface circuit of the invention, is:
Adaptive serial interface circuit of the invention passes through the level of 2 feet of detection device serial line interface and 3 feet respectively, with It determines the output pin and input pin of equipment end, then drives self-adaptive switch that the receiving end of host is connected with the transmitting terminal of equipment To together, the transmitting terminal of host is connected together with the receiving end of equipment, to realize the determination of serial ports line sequence and automatic Configuration feature avoids the problem of serial interconnection intercommunication mistake in the case where unknown device end line sequence;Therefore, it greatly facilitates Serial ports applies the use of personnel, is omitted the work of serial ports line sequence inspection.
Detailed description of the invention
Fig. 1 is conventional RS232 serial interface communication circuit figure.
Fig. 2 is a kind of adaptive serial interface communication circuit figure of the invention.
Fig. 3 is the circuit topology figure for automatically configuring circuit in self-adaptive switch circuit of the invention and completing interconnection.
Specific embodiment
Adaptive serial interface circuit of the present invention is described in detail with reference to the accompanying drawings and examples.
A kind of adaptive serial interface circuit of the invention include: equipment serial line interface, reversed ratio-voltage conditioning circuit, Micro-control unit, control output circuit and self-adaptive switch circuit.The reversed ratio-voltage conditioning circuit divides two-way to connect 2 feet and 3 feet of equipment serial line interface, for will be detected from 2 feet and 3 feet it is low level be converted to high level all the way after, it is defeated Out to micro-control unit;The micro-control unit exports control terminal MCUCTRL_OUT when detecting the transmitting terminal that 2 feet are equipment Logical zero signal, if the transmitting terminal season control terminal MCUCTRL_OUT that 3 feet of detection are equipment exports logical one signal.Institute Stating the effect of control output circuit is that the signal condition that micro-control unit exports is adaptive at being input to after complementary control signal Inductive switch circuit;The control signal of MCU is directly to be exported by I/O port, and conditioning is due to adaptively opening at complementary control signal Powered-down road functionally requires double switch mutual exclusion.The self-adaptive switch circuit is executed micro- using the control signal received It is serial that the transmitting terminal of control unit is connected to the receiving end of equipment serial line interface, the receiving end of micro-control unit is connected to equipment The order of the transmitting terminal of interface.
Above-mentioned micro-control unit (MCU) refers to the microcontroller for embedding the board of this circuit, that is to say, that a band micro-control The board of device processed does not have serial port function, now by the self adaptive control function of this microcontroller implementation serial ports after addition serial port function Energy.
Adaptive serial interface circuit based on above structure, the circuit further include level shifting circuit, the level It is Transistor-Transistor Logic level that the effect of conversion circuit, which is the RS232 level conversion of the port MCU,.RS232 level is provided by external serial ports , since MCU can not directly detect negative voltage signal, while absolute value of voltage is more than MCU tolerance range, so being turned by level To meet MCU after changing.Transistor-Transistor Logic level signal is widely used, and is because usual data indicate to provide using binary system ,+5V is equivalent to Logical one, 0V are equivalent to logical zero, this is referred to as TTL (transistor-transistor logic level) signal system, this is computer The standard technique communicated between each section inside the equipment of processor control.
In definition of the RS-323C standard to logic level, for data (information code): the level of logical one (mark) Lower than -3V, the level of logical zero (spacing) is higher than+3V;For controlling signal: on-state (ON) the i.e. effective level of signal Higher than+3V, off-state (OFF) the i.e. level of invalidating signal is lower than -3V, that is, when the absolute value of transmission level is greater than 3V When, circuit, which can be checked effectively, to be come, and the voltage between -3~+3V is meaningless, lower than -15V or higher than the electricity of+15V Pressure also thinks meaningless, therefore, in actual work, should ensure that level between ± (3~15) V.
In addition, the circuit structure of two input terminals, four NAND gate can be used in the control output circuit, by micro-control unit The signal condition of output is at complementary control signal.
As shown in Fig. 2, utilizing above-mentioned adaptive serial interface of the invention by taking RS232 serial ports connection host and peripheral hardware as an example Mouth circuit realizes the Auto-matching of equipment transmitting terminal and the receiving end MCU, equipment receiving end and MCU transmitting terminal, specific to work Principle are as follows: after equipment serial line interface CON1 is linked into external equipment serial ports, be each responsible for by reversed ratio-voltage conditioning circuit Detect CON1 2,3 feet -12V level, and detect -12V be converted into+5V all the way after be linked into MCU, at this time such as Fruit is that have -12V level on 2 feet, illustrates that 2 feet (MCUDET1-IN) are to send foot, if instead being to have -12V level on 3 feet, then Determine that 3 feet (MCUDET2-IN) are to send foot.When MCU detects that MCUDET1-IN is high level, MCU makes MCUCTRL_OUT Output be 0V level, simultaneously because control output circuit in two input terminals, four NAND gate U3 reversely make N_MCUCTRL output be 5V level configures equipment serial line interface after self-adaptive switch circuit is using the control signal that control output circuit is sent is received It is disconnected for 1 foot, 2 feet, 3 feet, the conducting of 4 feet, 8 feet, 9 feet disconnect, 10 feet, the conducting of 11 feet.Conversely, when MCU detects MCUDET2- When IN is high level, MCU makes MCUCTRL_OUT output be 5V level, simultaneously because U3 reversely makes N_MCUCTRL output be 0V electricity Flat, after self-adaptive switch circuit is using the control signal that control output circuit is sent is received, configuration equipment serial line interface is 1 Foot, the conducting of 2 feet, 3 feet, 4 feet disconnect, and 8 feet, the conducting of 9 feet, 10 feet, 11 feet disconnect.So far the configuration of interconnecting of RS232 level It completes, completes the conversion of RS232 level and Transistor-Transistor Logic level, by level shifting circuit finally to realize interconnecting for serial ports.
In addition, automatically configuring the circuit structure that circuit completes interconnection in self-adaptive switch circuit, may be designed as showing in Fig. 3 Circuit topology figure.
It should be noted last that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting.Although ginseng It is described the invention in detail according to embodiment, those skilled in the art should understand that, to technical side of the invention Case is modified or replaced equivalently, and without departure from the spirit and scope of technical solution of the present invention, should all be covered in the present invention Scope of the claims in.

Claims (3)

1. a kind of adaptive serial interface circuit, including equipment serial line interface, which is characterized in that further include: reversed ratio-voltage Conditioning circuit, micro-control unit, control output circuit and self-adaptive switch circuit;The reversed ratio-voltage conditioning circuit is total Two-way connects 2 feet and 3 feet of equipment serial line interface, low level is converted to high electricity all the way for that will detect from 2 feet and 3 feet After flat, output to micro-control unit;The micro-control unit detects the transmitting terminal season control terminal MCUCTRL_ that 2 feet are equipment OUT exports logical zero signal, if the transmitting terminal season control terminal MCUCTRL_OUT that 3 feet of detection are equipment exports logical one Signal;The control output circuit is used for signal condition that micro-control unit export at being input to oneself after complementary control signal Adapt to switching circuit;The self-adaptive switch circuit is connected using the transmitting terminal that the control signal received executes micro-control unit The receiving end of the receiving end, micro-control unit that connect equipment serial line interface connects the order of the transmitting terminal of equipment serial line interface.
2. adaptive serial interface circuit according to claim 1, which is characterized in that it further include level shifting circuit, institute The level shifting circuit stated is used to the RS232 level conversion of micro-control unit port be Transistor-Transistor Logic level.
3. adaptive serial interface circuit according to claim 1, which is characterized in that the control output circuit uses The circuit structure of two input terminals, four NAND gate, by the signal condition of micro-control unit output at complementary control signal.
CN201510420016.2A 2015-07-16 2015-07-16 A kind of adaptive serial interface circuit Active CN106708769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510420016.2A CN106708769B (en) 2015-07-16 2015-07-16 A kind of adaptive serial interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510420016.2A CN106708769B (en) 2015-07-16 2015-07-16 A kind of adaptive serial interface circuit

Publications (2)

Publication Number Publication Date
CN106708769A CN106708769A (en) 2017-05-24
CN106708769B true CN106708769B (en) 2019-08-06

Family

ID=58895070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510420016.2A Active CN106708769B (en) 2015-07-16 2015-07-16 A kind of adaptive serial interface circuit

Country Status (1)

Country Link
CN (1) CN106708769B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359078A (en) * 2018-12-10 2019-02-19 威创集团股份有限公司 A kind of self-adapting serial port interface circuit and its control method for middle control host
CN109800203A (en) * 2019-01-25 2019-05-24 山东超越数控电子股份有限公司 A kind of RS232 serial ports RXD and TXD automatic switch-over circuit and its switching method
CN109871347A (en) * 2019-02-28 2019-06-11 山东超越数控电子股份有限公司 RS232 serial ports intersection, direct-connected line automatic switching module, system and method
CN110727613A (en) * 2019-09-20 2020-01-24 深圳市信锐网科技术有限公司 Conversion device
CN112988642A (en) * 2019-12-16 2021-06-18 浙江宇视科技有限公司 Reverse connection preventing method for serial port signals and switch switching circuit
CN112925684A (en) * 2021-03-22 2021-06-08 西安紫光国芯半导体有限公司 Testing method of link establishment logic and related equipment
CN114490454B (en) * 2021-12-29 2023-07-18 广州河东科技有限公司 Method and device for self-adaptive driving of equipment serial port and serial port equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1342938A (en) * 2000-09-11 2002-04-03 合肥创源智能网络有限责任公司 Plug-and-play method for measuring-controlling module in RS-485 bus type measuring-controlling system and its measuring-controlling module
CN101320968A (en) * 2008-07-18 2008-12-10 上海哈诚电子科技有限公司 Self-adapting circuit and its processing method
CN201570020U (en) * 2009-12-30 2010-09-01 成都前锋电子电器集团股份有限公司 Automatic switching circuit of 485 interface and series port
CN101882124A (en) * 2010-06-13 2010-11-10 昆山五昌新精密电子工业有限公司 RS422/485 double-use signal converter capable of automatically judging connector
CN102315983A (en) * 2010-12-30 2012-01-11 杭州鼎利环保科技有限公司 Circuit and method for automatically detecting Baud rate of multiple paths of serial communication interfaces
CN203027245U (en) * 2012-11-09 2013-06-26 深圳市祈飞科技有限公司 RS232 and RS485 adaptive interface circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7975094B2 (en) * 2004-04-15 2011-07-05 Marvell International Technology Ltd. Programmable I/O interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1342938A (en) * 2000-09-11 2002-04-03 合肥创源智能网络有限责任公司 Plug-and-play method for measuring-controlling module in RS-485 bus type measuring-controlling system and its measuring-controlling module
CN101320968A (en) * 2008-07-18 2008-12-10 上海哈诚电子科技有限公司 Self-adapting circuit and its processing method
CN201570020U (en) * 2009-12-30 2010-09-01 成都前锋电子电器集团股份有限公司 Automatic switching circuit of 485 interface and series port
CN101882124A (en) * 2010-06-13 2010-11-10 昆山五昌新精密电子工业有限公司 RS422/485 double-use signal converter capable of automatically judging connector
CN102315983A (en) * 2010-12-30 2012-01-11 杭州鼎利环保科技有限公司 Circuit and method for automatically detecting Baud rate of multiple paths of serial communication interfaces
CN203027245U (en) * 2012-11-09 2013-06-26 深圳市祈飞科技有限公司 RS232 and RS485 adaptive interface circuit

Also Published As

Publication number Publication date
CN106708769A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106708769B (en) A kind of adaptive serial interface circuit
US10468896B2 (en) Intelligent switch system and control method
CN101493490B (en) Terminal port insertion detection circuit
CN208126373U (en) A kind of the detection response circuit and iic bus system of IIC failure
CN106155967A (en) The circuit of USB interface multiplexing, method and apparatus
US20160217052A1 (en) Debug circuit, debug request circuit and debug system
CN108322210A (en) A kind of level shifting circuit
CN108134599A (en) A kind of I3C bus control interfaces circuit
US20170184670A1 (en) Test circuit board adapted to be used on serial advanced technology attachment connector
CN108563601A (en) The super adaption system of serial ports
CN209728041U (en) Narrow confusion region acquisition device suitable for onboard system
CN203661030U (en) Electrical level switching circuit and circuit board having same
US9176172B2 (en) Power level identification circuit, power level flag circuit and power level supply system
CN202454825U (en) Two-wire interface recognition device
CN105242757A (en) Connection structure of tablet personal computer and base
CN115309683A (en) Serial port self-adaptive switching circuit and communication equipment
CN104932378A (en) Control method and circuit for special transformer acquisition terminal to prevent remote control false tripping
WO2018214262A1 (en) Encoding chip and cell supervision circuit
CN108173544A (en) A kind of compatible input or the I/O port circuit of output control
CN204556766U (en) LVDS opens short-circuit detecting device
CN204695069U (en) A kind of control circuit preventing remote control mistrip for specially becoming acquisition terminal
WO2016141814A1 (en) Power adapter
CN103118143A (en) Multiplex circuit of serial interface and Ethernet interface
US20100312929A1 (en) Universal serial bus device and universal serial bus system
CN107070547A (en) A kind of CPCI type gigabit Ethernet devices with failure monitoring ability

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant