CN203480508U - Single-serial-port communication circuit for communicating different signals - Google Patents
Single-serial-port communication circuit for communicating different signals Download PDFInfo
- Publication number
- CN203480508U CN203480508U CN201320533063.4U CN201320533063U CN203480508U CN 203480508 U CN203480508 U CN 203480508U CN 201320533063 U CN201320533063 U CN 201320533063U CN 203480508 U CN203480508 U CN 203480508U
- Authority
- CN
- China
- Prior art keywords
- signal
- analog switch
- communication
- conversion chip
- binary channels
- 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.)
- Expired - Fee Related
Links
- 238000004891 communication Methods 0.000 title claims abstract description 71
- 238000012545 processing Methods 0.000 claims abstract description 5
- 238000006243 chemical reaction Methods 0.000 claims description 50
- 238000007639 printing Methods 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 238000004519 manufacturing process Methods 0.000 abstract description 3
- 238000000034 method Methods 0.000 description 4
- 230000011664 signaling Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000008358 core component Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003466 welding Methods 0.000 description 1
Images
Landscapes
- Analogue/Digital Conversion (AREA)
Abstract
The utility model relates to a single-serial-port communication circuit for communicating different signals, and belongs to the field of communication circuits. According to the single-serial-port communication circuit for communicating different signals, a serial port of a singlechip is used, the connected relation of different communication signal converting chips in a circuit is changed over by using a double-channel one-from-four analog switch U2 and a double-channel one-from-four analog switch U5 and controlling coding wires of the analog switch U2 and the analog switch U5 by software, and a singlechip system has functions of the different communication signals, and can be communicated with different communication signal devices. By the single-serial-port communication circuit for communicating different signals, the single serial port can be communicated with the different signal devices in a time sharing manner. Moreover, the communication circuit is expandable; production and processing on communication wires by which the communication circuit is communicated with communication devices are eliminated; the hardware control ability of the singlechip is sufficiently utilized; and functions of the software of the singlechip are sufficiently fulfilled and are easy to implement. The cost and the workload are reduced; the single-serial-port communication circuit is compact in structure and reliable in communication; and the stability of the system is improved.
Description
Technical field
The utility model relates to a kind of telecommunication circuit, particularly a kind of single serial ports can communicate by letter RS232 and RS485 signal, single serial communication circuit of communication unlike signal realized.
Background technology
At present, when microcontroller serial port is communicated by letter with miscellaneous equipment, a serial ports can only be communicated by letter with a kind of signal of communication, reason is that singlechip CPU serial ports sends (TXD) and reception (RXD) pin is Transistor-Transistor Logic level, communicate and will the Transistor-Transistor Logic level of CPU be converted to the signal identical with communication facilities (RS232, RS485, RS422 and CANZ bus etc.) with corresponding conversion chip.Conversion chip is connected common welding in the circuit board with microcontroller serial port, this serial ports of CPU can only be communicated by letter with having with institute switching signal same communication signalling arrangement like this, to communicate by letter with other signalling arrangement and just need another serial ports, or with hardware conversion equipment, the signal of communication facilities be converted to the signal identical with single chip communication signal.It is infeasible even sometimes that these two kinds of methods have shortcoming.Reason is as follows:
If adopt another serial communication just to take the serial port resource of singlechip CPU, well-known, the serial ports of singlechip CPU is very limited, and the serial ports having has several functions, and when as serial ports, other function just can not realize.So just likely having influence on completing of global design, is infeasible so adopt another serial communication in the situation of microcontroller serial port runs out of resource sets.
If adopt hardware conversion equipment that the signal of communication facilities is converted to the signal identical with single chip communication signal, just need to buy corresponding conversion equipment and power supply, also to manufacture line, increased cost, workload and failure rate, and it is unreliable to communicate by letter.
In actual application, sometimes a Single Chip Microcomputer (SCM) system needs to communicate by letter with a plurality of peripherals, and the signal of communication of peripherals is also not only a kind of, a kind of automatic Weather Station of the on-the-spot calibration instrument of the portable region of the < < PI100 automatic weather station > > institute calibration of Ru Wo unit's development is just divided into two kinds of signals of communication: a kind of RS232 of being signal, a kind of is RS485 signal.If adopt conventional traditional serial ports of method for designing to communicate by letter with a kind of signal, communicate by letter and just must use another serial ports or take with hardware conversion device translates one-tenth and by the identical signal of the communication signal of calibration instrument with two kinds of signals.The on-the-spot calibration instrument of the portable region of < < PI100 automatic weather station > > is a complicated system, comprise with peripherals such as printer, standards and communicating by letter, the serial port resource of single-chip microcomputer is used up, so be infeasible with another serial ports.After adopting, before a kind of shortcoming of method, address.
Utility model content
The purpose of this utility model is to communicate by letter with RS485 signalling arrangement with RS232 signal in order to realize with the timesharing of a serial ports energy, and a kind of single serial communication circuit of the unlike signal of communicating by letter is provided.
To achieve these goals, the technical solution of the utility model is specific as follows:
The communicate by letter single serial communication circuit of unlike signal, comprising:
Processor U1, described processor U1 is responsible for data sampling and processing, communication, printing and whole system is moved and controlled;
Two lead-in wire U2TX and the U2RX of the serial ports 2 of described processor U1 are respectively transmitting terminal and receiving end, and these two lead-in wires are output as Transistor-Transistor Logic level;
Select the common port X of two passages of an analog switch U2 to be connected with Y with binary channels four respectively with U2RX two lead-in wire U2TX of the serial ports of described processor U1 2, described binary channels four is selected the decoding line A of an analog switch U2 and PD4 and the PD5 mouth line that B is connected to described processor U1, is connected to decoding line A and B that another binary channels four is selected an analog switch U5 simultaneously;
Described binary channels four selects one end X0 of the X passage of an analog switch U2 to be connected with 11 pin of RS232 conversion chip U3, and other end X1 is connected with 4 pin of RS485 conversion chip U4; Described binary channels four selects one end Y0 of the Y passage of an analog switch U2 to be connected with 12 pin of RS232 conversion chip U3, and other end Y1 is connected with 1 pin of RS485 conversion chip U4;
When described telecommunication circuit is communicated by letter with RS232 signal, signal signal of communication after described RS232 conversion chip U3 is converted to RS232 signal transmitted signal; 14 pin by RS232 conversion chip U3 are connected to described binary channels four and select the X0 of an analog switch U5 to hold; Receive signal and input by 13 pin of RS232 conversion chip U3, be connected to the Y0 end that described binary channels four is selected an analog switch U5;
When described telecommunication circuit is communicated by letter with RS485 signal, signal signal of communication after described RS485 conversion chip U4 is converted to RS485 signal level; The decoding line A of RS485 conversion chip U4 connects the X1 end that described binary channels four is selected an analog switch U5, and decoding line B connects the Y1 end that described binary channels four is selected an analog switch U5; Two control ends 2 and 3 of described RS485 conversion chip U4 connect, and are connected to the PD6 mouth line of described processor U1;
Described binary channels four selects an analog switch U2 and U5 to have identical decoding relation, and the common port X of U5 connects 1 of P1 casually, and another common port Y connects 2 of P1 casually, and 3 of communication port P1 meets GND publicly.
In technique scheme,
PD4 and PD5 are low level, and described binary channels four is selected X and the conducting of X0 end of an analog switch U2 and U5, Y and the conducting of Y0 end, and described telecommunication circuit is communicated by letter with described RS232 conversion chip U3;
PD4 is high level, and PD5 is low level, and binary channels four is selected X and the conducting of X1 end of an analog switch U2 and U5, Y and the conducting of Y1 end, send data PD6 and will be set to high level, receive data PD6 and will be set to low level, described telecommunication circuit is communicated by letter with described RS485 conversion chip U4.
The beneficial effects of the utility model are:
Single serial communication circuit of the communication unlike signal that the utility model provides is realized communicating by letter of single serial ports timesharing and unlike signal equipment, has the following advantages:
1, extensibility.If also have other signal, on the basis of this circuit, expand other signal conversion chip, can communicate by letter with more signalling arrangement, as RS422 signal and CAN bus etc.
2, can reduce and the production and processing of communication apparatus communication line.When the equipment of unlike signal has same communication port, as one be RS232 signal, one is RS485 signal, as long as two lines (TXD and RXD) of RS232 of equipment and the connection terminal that two lines (A and B) of RS485 are all used the duplicate numbers of communication port, as TXD, A connect terminal No. 1, RXD, B connect terminal No. 2, and as shown in Figure 2, an available order wire is realized communicating by letter of system and two kinds of unlike signal equipment to system.As TXD, B connect terminal No. 1, RXD, A connect terminal No. 2, by adjusting the A of RS485 converter U4 and B and binary channels four, select the annexation of an analog switch U5, system as shown in Figure 3, with communicating by letter of an order wire also feasible system and two kinds of unlike signal equipment.Other two kinds of syntagmatics are that TXD, A connect terminal No. 2, RXD, B connect No. 1 terminal and TXD, B connect terminal No. 2, RXD, A connect terminal No. 1, now by adjusting U3, two conversion chips of U4 and binary channels four, select the annexation of an analog switch U5, principle is with reference to accompanying drawing 2, accompanying drawing 3, with an order wire, can realize equally and the communicating by letter of two kinds of unlike signal equipment.
3, single serial communication circuit of communication unlike signal of the present utility model has been saved the serial port resource of single-chip microcomputer, takes full advantage of the hardware controls ability of single-chip microcomputer, has also fully demonstrated the effect of scm software, is easy to realize.Reduced cost, reduced workload, result is compact, and reliable communications has increased the stability of system.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the utility model is described in further detail.
Fig. 1 is single serial communication circuit schematic diagram of communication unlike signal of the present utility model.
Fig. 2 is RS232 signal communication equivalent circuit diagram.
Fig. 3 is RS485 signal communication equivalent circuit diagram.
Embodiment
Invention thought of the present utility model is: in the on-the-spot calibration instrument of the portable region of the < < PI100 automatic weather station > > project of Wo unit's development, adopt ARM7 (LM3S2911) as CPU.To ARM7 single-chip microcomputer serial ports, by two binary channels four, select an analog switch timesharing to switch different switching chip, reach the devices communicating of single-chip microcomputer and different communication signal, realize can the communicate by letter function of two kinds of unlike signals of single serial ports.Circuit is simple, reliable operation.
Below in conjunction with accompanying drawing, the utility model is described in detail.
Referring to accompanying drawing 1, what draw is the annexation that is converted to RS232 signal and RS485 signal.Single serial communication circuit of communication unlike signal of the present utility model adopts high performance ARM7(LM3S2911) processor U1, be the core component of system, be responsible for data sampling and processing, communication, printing and whole system is moved and controlled.The communication that one of them serial ports is realized to unlike signal below elaborates.
The serial ports 2(processor U1 of processor U1 is totally 3 serial ports: serial ports 0, serial ports 1 and serial ports 2, in accompanying drawing 1-3, refer to serial ports 2, also can be serial ports 0 or serial ports 1) two lead-in wire U2TX and U2RX be respectively transmitting terminal and the receiving end of serial ports, these two lead-in wires are output as Transistor-Transistor Logic level, because Transistor-Transistor Logic level loss in communications is large, can not directly as communication level, use, therefore Transistor-Transistor Logic level need to be converted to RS232 signal, RS485 signal or other signal of energy and other communication apparatus communication.
The U2TX of processor U1 is selected to an analog switch U2(CD4052BCN with binary channels four respectively with U2RX) the common port X of two passages be connected with Y, binary channels four is selected the decoding line A of an analog switch U2 and PD4 and the PD5 mouth line that B is connected to processor U1, is connected to decoding line A and B that binary channels four is selected an analog switch U5 simultaneously.One end X0 of the X passage of U2 is connected with 11 pin of RS232 conversion chip U3, and other end X1 is connected with 4 pin of RS485 conversion chip U4; Binary channels four selects one end Y0 of the Y passage of an analog switch U2 to be connected with 12 pin of RS232 conversion chip U3, and other end Y1 is connected with 1 pin of RS485 conversion chip U4.
When described telecommunication circuit is communicated by letter with RS232 signal, after RS232 conversion chip U3, signal of communication is converted to RS232 signal transmitted signal, 14 pin by RS232 conversion chip U3 are connected to another binary channels four and select an analog switch U5(CD4052BCN) X0 end, receive signal and input by 13 pin of RS232 conversion chip U3, be connected to the Y0 end that binary channels four is selected an analog switch U5.
When described telecommunication circuit is communicated by letter with RS485 signal, signal is converted to RS485 signal level signal of communication after described RS485 conversion chip U4; The decoding line A of RS485 conversion chip U4 connects the X1 end that binary channels four is selected an analog switch U5, and decoding line B connects the Y1 end that binary channels four is selected an analog switch U5; Two control ends 2 and 3 of described RS485 conversion chip U4 connect, and are connected to the PD6 mouth line of processor U1;
Described binary channels four selects an analog switch U2 and U5 to have identical decoding relation, and the common port X of U5 connects 1 of P1 casually, and another common port Y connects 2 of P1 casually, and 3 of communication port P1 meets GND publicly.
Based on above annexation, the connection with software control timesharing handoff processor serial ports and RS232 conversion chip U3 and RS485 conversion chip U4, realizes two kinds of signal communications.Under the effect of software, when the PD4 of processor U1 and PD5 are low level, binary channels four is selected X and the conducting of X0 end of an analog switch U2 and U5, Y and the conducting of Y0 end, now irrelevant with PD6, be equivalent to RS232 conversion chip U3 to be linked in circuit, RS485 conversion chip U4 is extractd (as shown in Figure 2) in circuit.Now that telecommunication circuit is communicated by letter with RS232 conversion chip U3.When the PD4 of processor U1 is high level, PD5 is low level, and binary channels four is selected X and the conducting of X1 end of an analog switch U2 and U5, and Y and the conducting of Y1 end, now send data PD6 and will be set to high level, receives data PD6 and will be set to low level.Now be equivalent to RS485 conversion chip U4 to be linked in circuit, RS232 conversion chip U3 is extractd in circuit, described telecommunication circuit is communicated by letter (as shown in Figure 3) with RS485 conversion chip U3.
Below by explanation of tables:
PD6 | PD5 | PD4 | The device working | The signal of realizing | Explanation |
X | 0 | 0 | U3 | RS232 signal | Irrelevant with |
1 | 0 | 1 | U4 | RS485 signal | PD6=1 is to send |
0 | 0 | 1 | U4 | RS485 signal | PD6=0 is to receive |
Note: 1 is high level; 0 is low level; X is outlier.
In sum, single serial communication circuit of the communication unlike signal that the utility model provides, the annexation based on above hardware is easy to realize communicating by letter of single serial ports timesharing and unlike signal equipment under the control of software.
Obviously, above-described embodiment is only for example is clearly described, and the not restriction to embodiment.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without also giving all embodiments.And among the protection domain that the apparent variation of being extended out thus or change are still created in the utility model.
Claims (2)
1. the communicate by letter single serial communication circuit of unlike signal, is characterized in that, comprising:
Processor U1, described processor U1 is responsible for data sampling and processing, communication, printing and whole system is moved and controlled;
Two lead-in wire U2TX and the U2RX of the serial ports 2 of described processor U1 are respectively transmitting terminal and receiving end, and these two lead-in wires are output as Transistor-Transistor Logic level;
Select the common port X of two passages of an analog switch U2 to be connected with Y with binary channels four respectively with U2RX two lead-in wire U2TX of the serial ports of described processor U1 2, described binary channels four is selected the decoding line A of an analog switch U2 and PD4 and the PD5 mouth line that B is connected to described processor U1, is connected to decoding line A and B that another binary channels four is selected an analog switch U5 simultaneously;
Described binary channels four selects one end X0 of the X passage of an analog switch U2 to be connected with 11 pin of RS232 conversion chip U3, and other end X1 is connected with 4 pin of RS485 conversion chip U4; Described binary channels four selects one end Y0 of the Y passage of an analog switch U2 to be connected with 12 pin of RS232 conversion chip U3, and other end Y1 is connected with 1 pin of RS485 conversion chip U4;
When described telecommunication circuit is communicated by letter with RS232 signal, signal signal of communication after described RS232 conversion chip U3 is converted to RS232 signal transmitted signal; 14 pin by RS232 conversion chip U3 are connected to described binary channels four and select the X0 of an analog switch U5 to hold; Receive signal and input by 13 pin of RS232 conversion chip U3, be connected to the Y0 end that described binary channels four is selected an analog switch U5;
When described telecommunication circuit is communicated by letter with RS485 signal, signal signal of communication after described RS485 conversion chip U4 is converted to RS485 signal level; The decoding line A of RS485 conversion chip U4 connects the X1 end that described binary channels four is selected an analog switch U5, and decoding line B connects the Y1 end that described binary channels four is selected an analog switch U5; Two control ends 2 and 3 of described RS485 conversion chip U4 connect, and are connected to the PD6 mouth line of described processor U1;
Described binary channels four selects an analog switch U2 and U5 to have identical decoding relation, and the common port X of U5 connects 1 of P1 casually, and another common port Y connects 2 of P1 casually, and 3 of communication port P1 meets GND publicly.
2. single serial communication circuit of communication unlike signal according to claim 1, is characterized in that,
PD4 and PD5 are low level, and described binary channels four is selected X and the conducting of X0 end of an analog switch U2 and U5, Y and the conducting of Y0 end, and described telecommunication circuit is communicated by letter with described RS232 conversion chip U3;
PD4 is high level, and PD5 is low level, and binary channels four is selected X and the conducting of X1 end of an analog switch U2 and U5, Y and the conducting of Y1 end, send data PD6 and will be set to high level, receive data PD6 and will be set to low level, described telecommunication circuit is communicated by letter with described RS485 conversion chip U4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201320533063.4U CN203480508U (en) | 2013-08-29 | 2013-08-29 | Single-serial-port communication circuit for communicating different signals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201320533063.4U CN203480508U (en) | 2013-08-29 | 2013-08-29 | Single-serial-port communication circuit for communicating different signals |
Publications (1)
Publication Number | Publication Date |
---|---|
CN203480508U true CN203480508U (en) | 2014-03-12 |
Family
ID=50228801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201320533063.4U Expired - Fee Related CN203480508U (en) | 2013-08-29 | 2013-08-29 | Single-serial-port communication circuit for communicating different signals |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN203480508U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649177A (en) * | 2016-12-29 | 2017-05-10 | 上海贝电实业(集团)股份有限公司 | Device for automatic identification and switching of port of universal serial interface and working method thereof |
-
2013
- 2013-08-29 CN CN201320533063.4U patent/CN203480508U/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649177A (en) * | 2016-12-29 | 2017-05-10 | 上海贝电实业(集团)股份有限公司 | Device for automatic identification and switching of port of universal serial interface and working method thereof |
CN106649177B (en) * | 2016-12-29 | 2023-06-09 | 上海贝电实业(集团)股份有限公司 | Automatic port identification switching device of universal serial port and working method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203658996U (en) | Chip interface multiplex circuit and mobile terminal | |
CN107291649A (en) | The design method and device of a kind of flexible support PCIE and SATA agreements M.2 self-identifying | |
CN102637453A (en) | Phase change memory including serial input/output interface | |
CN101188488B (en) | Control method and device for half duplex communication receiving/transmission | |
CN204946336U (en) | The metering communication module of intelligent electric energy meter | |
CN203480508U (en) | Single-serial-port communication circuit for communicating different signals | |
CN103049410A (en) | Server and serial port switching circuit thereof | |
CN203858629U (en) | Protocol converter | |
CN206657220U (en) | A kind of multi-channel digital amount acquisition module based on redundant CAN bus | |
CN201163783Y (en) | Multi-serial port card based on CAN bus | |
CN203243343U (en) | Network device possessing power over ethernet (POE) function | |
CN210804414U (en) | Circuit with reusable communication interface | |
CN205942681U (en) | Serial communication interface that can dispose | |
CN204129454U (en) | A kind of data conversion adaptive circuit and electronic equipment | |
CN103268300A (en) | Serial interface circuit of serial communication management server | |
CN202693677U (en) | Three-phase electronic electric energy meter | |
CN105589824A (en) | Multi-configuration manner USB/RS232-CAN converting and debugging device | |
CN202058138U (en) | Serial data interface multiplexing device | |
CN201274486Y (en) | Analogue signal input module based on CANopen protocol | |
CN207503220U (en) | A kind of circuit for extending microcontroller serial port and Modbus buses | |
CN207304023U (en) | A kind of photovoltaic DC-to-AC converter based on high speed Ethernet industrial bus | |
CN104422867A (en) | Chip device and testing method thereof | |
CN203896364U (en) | Multifunctional communication device | |
CN208836162U (en) | Double terminal telecommunication circuits | |
CN104460456B (en) | A kind of electric control system with network communicating function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140312 |
|
CF01 | Termination of patent right due to non-payment of annual fee |