A kind of antitransmitter receiver and transmitting-receiving converting system based on RS485
Technical field
The utility model is related to RS485 technical fields, and in particular to a kind of antitransmitter receiver and transmitting-receiving based on RS485
Converting system.
Background technology
In Industry Control occasion, RS485 buses because its interface is simple, the features such as networking is convenient, long transmission distance and obtain
Extensive use.RS485 uses differential signal negative logic, and+2V~+6V represents " 0 ", and -6V~-2V represents " 1 ".RS485 has two lines
System and two kinds of wiring of four-wire system, four-wire system is full duplex communication mode, and two-wire system is half duplex communication mode.
As shown in Figure 1, Fig. 1 is existing common RS485 transceiver communications conversion equipment, RS485 communications will realize transmission and connect
Conversion between receipts, method are exactly to be turned on and off realizing by Q11, and RS485 communications is receive letter when Q11 is connected
Number, it is to send signal when Q11 is closed;But error code is susceptible in communication process, and cause to communicate unsuccessful, stability
Poor, the driving force specifically by the dependence U2_TX of microcontroller output is limited, it is impossible to Q11 be driven quickly to switch, also
It is that the situation about being turned on and off of Q11 is easily interfered by environmental factors such as temperature, electromagnetic environments.
Under the premise of communication speed requires to be getting faster, although circuit is simple now, cost is relatively low, and communication is stablized
Property be difficult to take into account, how to meet market and the reliable and stable of centralized Control and data acquisition carried out as serial accessory to controller
It is required that it is one of the problem of those skilled in the art study always.
Utility model content
The technical problem to be solved by the present invention is to for the drawbacks described above of the prior art, provide one kind and be based on
The antitransmitter receiver of RS485 and transmitting-receiving converting system, meet market to controller as serial accessory carry out centralized Control and
The reliable and stable requirement of data acquisition.
The technical problem to be solved by the present invention is to for the drawbacks described above of the prior art, provide one kind and be based on
The transmitting-receiving converting system of RS485 meets market and carries out centralized Control and the stabilization of data acquisition as serial accessory to controller
Reliable requirement.
Technical solution is used by the utility model solves its technical problem:A kind of transmitting-receiving based on RS485 is provided to turn
Changing device, including:RS485 driving circuits and level shifting circuit;The switch level output terminal of the level shifting circuit with
The transmitting-receiving conversion Enable Pin connection of RS485 driving circuits, and pass through the low and high level signal control that switch level output terminal exports
RS485 driving circuits carry out transceiver communication conversion operation.
Wherein, preferred version is:The level shifting circuit includes the control signal output with external control circuit
The control signal input of connection is held, the level shifting circuit is controlled according to the control signal that control signal input receives and received
Hair conversion Enable Pin output low and high level signal.
Wherein, preferred version is:The RS485 driving circuits include RS485 driving chips, the RS485 driving chips
The reception that conversion Enable Pin is received and dispatched including forming enables pin and sends enabled pin, described to receive enabled pin and send enabled
Pin is connect with the switch level output terminal of level shifting circuit, and the RS485 driving chips are in the enabled pin of reception
Enter reception state during low level and enter transmission state when sending enabled pin and being in high level.
Wherein, preferred version is:The model SP3072 of the RS485 driving chips.
Wherein, preferred version is:The reception of the RS485 driving chips enables pin and sends after enabled pin connects,
And it is connect with a pull-up resistor.
Wherein, preferred version is:The level shifting circuit includes a monostable flipflop device.
Wherein, preferred version is:The model MC14538 of the monostable flipflop device.
Wherein, preferred version is:It jumps on the first of the monostable flipflop device and is grounded along triggering pin, under first
It jumps along pin signal input part in order to control is triggered, the first buffer stage in-phase end output pin is switch level output terminal, the
One buffer stage reverse side output pin is hanging.
Wherein, preferred version is:The first of the monostable flipflop device resets input pin and accesses a triode
Emitter, the grounded collector of the triode, base stage are connect with the control signal output of external control circuit.
Technical solution is used by the utility model solves its technical problem:A kind of transmitting-receiving based on RS485 is provided to turn
System is changed, including:Antitransmitter receiver and master control processing circuit;The antitransmitter receiver includes RS485 driving circuits and electricity
Flat conversion circuit, the switch level output terminal of the level shifting circuit connect with the transmitting-receiving conversion Enable Pin of RS485 driving circuits
It connects, and passes through the low and high level signal control RS485 driving circuits that switch level output terminal exports and carry out transceiver communication conversion behaviour
Make;And the control signal input of the level shifting circuit is connect with the control signal output of master control processing circuit, and
The control signal control transmitting-receiving conversion Enable Pin output low and high level signal received according to control signal input.
The beneficial effects of the utility model are that compared with prior art, the utility model is by level shifting circuit
RS485 driving circuits provide control level, improve the stability of integrated circuit, avoid the interference of external environment, and reduction communicated
Occurs the possibility of error code in journey;And circuit structure is simple, and it is at low cost, it is easy to produce.
Description of the drawings
Below in conjunction with accompanying drawings and embodiments, the utility model is described in further detail, in attached drawing:
Fig. 1 is the RS485 transceiver communication conversion equipments of the prior art;
Fig. 2 is the circuit block diagram of the utility model antitransmitter receiver;
Fig. 3 is the physical circuit block diagram of Fig. 2;
Fig. 4 is the circuit diagram of the utility model antitransmitter receiver;
Fig. 5 is the circuit block diagram of the utility model transmitting-receiving converting system.
Specific embodiment
In conjunction with attached drawing, elaborate to the preferred embodiment of the utility model.
As shown in Figures 2 to 4, the utility model provides a kind of preferred embodiment of antitransmitter receiver.
A kind of antitransmitter receiver based on RS485, including:RS485 driving circuits 111 and level shifting circuit 112;Institute
The transmitting-receiving conversion Enable Pin 1121 for stating the switch level output terminal 1111 and RS485 driving circuits 111 of level shifting circuit 112 connects
It connects, and the low and high level signal control RS485 driving circuits 111 for passing through the output of switch level output terminal 1111 carry out transceiver communication
Conversion operation.
In the present embodiment, RS485 driving circuits 111 are used to control the reiving/transmitting state of antitransmitter receiver, that is, obtain outer
The data information in portion and to external emission data information.Wherein, RS485 is in a definition balance digital multi-drop system
The standard of the electrical characteristic of driver and receiver, can be under the conditions of remote and electric using the digital communications network of the standard
Effectively transmitted signal under the big environment of sub- noise.
And switch relative to existing control, level switching control is realized using special level shifting circuit 112, is carried
The stability of high integrated circuit avoids the interference of external environment, reduces in communication process and the possibility of error code occurs.
Specifically, the level shifting circuit 112 includes a control signal output with external control circuit 120
The control signal input 1112 of 121 connections, the control that the level shifting circuit 112 is received according to control signal input 1112
Signal control transmitting-receiving conversion Enable Pin 1121 processed exports low and high level signal;And the RS485 driving circuits 111 include
RS485 driving chips, the reception that the RS485 driving chips include forming transmitting-receiving conversion Enable Pin 1121 enable pin 11211
With send enabled pin 11212, the enabled pin 11211 and sending of receiving enables pin 11212 and level shifting circuit
112 switch level output terminal 1111 connects, and the RS485 driving chips are when the enabled pin 11211 of reception is in low level
Enter transmission state into reception state and when sending enabled pin 11212 and being in high level.
In the present embodiment, and with reference to figure 4, a kind of circuit arrangement of antitransmitter receiver is provided.
The model SP3072 of the RS485 driving chips, naturally it is also possible to be other 485 general line system chips.And
The level shifting circuit 112 includes a monostable flipflop device, the model of the monostable flipflop device
MC14538.It is jumped on the first of the monostable flipflop device along triggering pin ground connection, it is control that first time, which is jumped along triggering pin,
Signal input part 1112 processed, the first buffer stage in-phase end output pin be switch level output terminal 1111, the first buffer stage
Reverse side output pin is hanging.The first of the monostable flipflop device resets the transmitting that input pin accesses a triode
Pole, the grounded collector of the triode, base stage are connect with the control signal output 121 of external control circuit 120.
Specifically, U8, that is, SP3072 chips, using 3.3V low power consumption voltages, comprising a driver and a receiver,
Pin 1 is receiver receiving terminal, and pin 2 is receiver Enable Pin, that is, receives enabled pin 11211, low level triggering;Pin 4
For driver transmitting terminal, pin 3 is driver Enable Pin, that is, sends enabled pin 11212, high level triggering, pin 3 and pin
After 2 connections, and it is connect with a pull-up resistor, and connect with the level signal pin 6 of MC14538 chips;Wherein, pin 1 with it is outer
The transmitting terminal connection of the control circuit 120 in portion, pin 4 are connect with the receiving terminal of external control circuit 120, realize SP3072 cores
Piece and the signal transmission of external control circuit 120.
And pin 6 and pin 7 are the pin of external data transmission respectively, by the pressure difference of two pins, obtain level
" 0 " or " 1 " can realize multichannel communication multiple telecommunication by pin 6 and pin 7.
In the present embodiment, RS485 driving circuits 111, level shifting circuit 112, external control circuit 120 can be core
The combination of piece and peripheral circuit, or pure electrical combination.
As shown in figure 5, the utility model provides a kind of preferred embodiment for receiving and dispatching converting system.
A kind of transmitting-receiving converting system based on RS485, which is characterized in that including:Antitransmitter receiver and master control processing electricity
Road 213;The antitransmitter receiver includes RS485 driving circuits 211 and level shifting circuit 212, the level shifting circuit
212 switch level output terminal 2111 is connect, and pass through switching with the transmitting-receiving of RS485 driving circuits 211 conversion Enable Pin 2121
The low and high level signal control RS485 driving circuits 211 that level output end 2111 exports carry out transceiver communication conversion operation;With
And the control signal output of the control signal input 2112 of the level shifting circuit 212 and master control processing circuit 213
2131 connections, and the control signal control transmitting-receiving conversion output height of Enable Pin 2121 received according to control signal input 2112
Level signal.
In the present embodiment, master control processing circuit 213 can microcontroller in order to control, or other main control chips or master
Control circuit.
In the present embodiment, RS485 driving circuits 211, level shifting circuit 212, master control processing circuit 213 can be chip
And the combination of peripheral circuit, or pure electrical combination.
As described above, only the best embodiment of the utility model is not intended to limit the scope of the utility model,
All equivalent change or modifications made according to present utility model application the scope of the claims are all that the utility model is covered.