A kind of RS485 circuit of nonpolarity connection
Technical field
The utility model relates to the RS485 communication technical field, particularly relates to a kind of RS485 communication technology of nonpolarity connection.
Background technology
Owing to based on common, having the designed telecommunication circuit of polarity RS485 chip to need these two interfaces of distinguish A from B when communicating to connect, A is anodal, B is negative pole, if connect instead can not proper communication, and usually have the interface reverse problem in the wiring of practical communication engineering, cause engineering wiring one-time success rate not high.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art, the utility model provides a kind of RS485 circuit of nonpolarity connection.And the RS485 circuit based on the design of the utility model circuit theory or chip are after adding peripheral necessary communication control circuit, do not need these two interfaces of distinguish A from B when networking connects use mutually, so just avoid the interface reverse problem existed in the communication engineering wiring, thereby improved communication construction efficiency.
The technical scheme that the utility model adopts is: a kind of RS485 circuit of nonpolarity connection, and it uses two cross-coupled receivers of input polarity, and obtains required correct reception signal after the reception signal edge of these two receivers is processed; Use two trigger with or d type flip flop obtain required correct reception signal after the reception signal edge of two cross-coupled receivers of input polarity is processed.The RS485 circuit of a kind of nonpolarity connection of same-type, it uses two cross-coupled receivers of input polarity, and guarantees consistent with received correct level logic to the polarity that rear control transmitter is processed at the reception signal edge of these two receivers.The RS485 circuit of another nonpolarity connection, it comprises two cross-coupled receivers of input polarity, the output of described two input polarity cross-coupled receivers be provided with one two trigger with or d type flip flop obtain required correct reception signal after the reception signal edge of two receivers is processed, use the single lock that triggers of dual input to be processed the reception signal of described two cross-coupled receivers of input polarity simultaneously, then control the transmitter output level consistent with received correct level logic.On the RS485 receiving circuit, adopt two common polarity that have to receive gate circuit, these two receiving gate circuit are in the interconnection of input polarity, guarantee so nonpolarity reception input, then design one pair at these two receiving gate circuit output ends and triggered same or d type flip flop, thereby guarantee that its output signal level logic changes consistent no matter input is rectified to be connect or reversal connection.Owing in these two reception signals, must having one to be correct signal, so use the single lock that triggers of dual input to be processed the reception signal of two receivers, control the transmitter output level consistent with received correct signal logic level.
Compared with prior art, the beneficial effects of the utility model are: connect polarity problems without difference RS485 in the communication engineering wiring, thereby improved communication construction efficiency.
The accompanying drawing explanation
The RS485 schematic block circuit diagram of the nonpolarity connection that Fig. 1 is the utility model embodiment.
The RS485 circuit logic diagram of the nonpolarity connection that Fig. 2 is the utility model embodiment.
Embodiment
Below in conjunction with the drawings and specific embodiments, the utility model is further described.
As shown in Figure 1 and Figure 2, N0, N1 are the nonpolarity RS485 input of the utility model, polarity not during connection; RO is that nonpolarity RS485 receives output; The initial incoming level control end that RST_R is RO, when the RST_R input low level, two upset d type flip flops are exported high level in advance, through with or RO output high level behind the door; When the RST_R input high level, two upset d type flip flops can work, when if at this moment N0, N1 have input signal to be differential signal (initial signal is expressed as 0), the receiver R of two intersection Opposite direction connections also must export the reception signal that the two-way level is contrary, these two receive signal and control respectively a upset d type flip flop clock, because d type flip flop is that rising edge triggers, these two reception signals trigger respectively d type flip flop and realize the level upset like this, then process is same or export behind the door the level signal consistent with the input signal logic.The initialization electrical level polar control end that RST_D is RS485 transmitter Q, the dual input list that needs to reset by RST_D equally before receiving signal triggers two d type flip flops in lock, make it all export high level and control two groups of output polarity switches and all disconnect, input as the other side's d type flip flop after reverser simultaneously.If then the reception signal is arranged, first output has that receiver of rising edge first to trigger that coupled d type flip flop, make its level upset, and control one group of polarity switch identical with input signal polarity and connect, pin another one d type flip flop and oneself simultaneously, make both can not trigger again upset./ R, D, these three input ports of DI equally are respectively to receive with common 485 and enable, send and enable and send input port.
Can be with equally connecting based on the designed circuit of common RS485 chip during actual the use, the polarity that just input needn't distinguish A from B, and many reset RST_R and transmission RST_D that reset that receive control, carry out RST_R before can receiving first by hardware or software and reset and get final product, the RST_D that simultaneously resets before each the reception controls.
Although the present invention is described by specific embodiments and the drawings, embodiment and accompanying drawing not are used for limiting the present invention.Those skilled in the art can make various distortion and improvement in spiritual scope of the present invention, and it is equally within protection scope of the present invention.Therefore the identical or scope that be equal to that protection scope of the present invention should be defined with the application's claim protection is as the criterion.