The content of the invention
It is an object of the invention to provide a kind of data communication path switching circuit, it is intended to solve prior art in vehicle-mounted road
When the data read by the master controller in device occur abnormal, it is impossible to continue the fortune to wireless communication module by other paths
The problem that row data are read out.
The present invention is achieved in that a kind of data communication path switching circuit, with vehicle-mounted router in master controller,
Interface conversion circuit, wireless communication module and communication interface circuit connection, the master controller connect the interface conversion circuit
With the usb circuit in the vehicle-mounted router, it is right between serial port protocol and usb protocol that the interface conversion circuit is used for
Data are changed;When the master controller receives switching command by the usb circuit, the master controller is defeated
Go out to switch switching signal to the data communication path switching circuit;
The data communication path switching circuit includes first switch switch unit and second switch switch unit;
The communication anode and communication negative terminal of the first switch switch unit connect the communication interface circuit, described first
First communication anode of switch switching unit and the first communication negative terminal connect the interface conversion circuit, the first switch switching
The switch control terminal of unit connects the master controller, the second communication anode of the first switch switch unit and the second communication
Negative terminal connects the second communication anode and the second communication negative terminal of the second switch switch unit, the second switch switching respectively
The switch control terminal of unit, the first communication anode and the first communication negative terminal connect the master controller, the second switch switching
The data communication anode and data communication negative terminal of unit connect the wireless communication module;
When the non-output switch switching signal of the master controller, the first switch switch unit connection communication connects
Mouth circuit and the interface conversion circuit, the second switch switch unit connect the master controller and the radio communication mold
Block, the master controller passes through the service data that the second switch switch unit reads the wireless communication module, and by institute
The service data for reading is exported to the communication interface by the interface conversion circuit and the first switch switch unit
Circuit;
When the master controller output switch switching signal, the first switch switch unit and described second is opened
Close switch unit and the communication interface circuit to the wireless communication module, external equipment is connected according to the switch switching signal
By the communication interface circuit, the first switch switch unit and the second switch switch unit to the radio communication
The service data of module is read out.
Additionally, the data communication path switching circuit also includes power detecting unit;The inspection of the power detecting unit
Survey end and output end connects the communication interface circuit and the master controller respectively;
When the power input of the communication interface circuit is executed once switching manipulation, the power detecting unit feedback
Path reset signal to the master controller, the master controller according to the path reset signal output switch reset signal,
The first switch switch unit disconnects the communication interface circuit and is cut with the second switch according to the switch reset signal
The data path changed between unit, and the communication interface circuit is connected with the interface conversion circuit;The second switch is cut
Change the number that unit disconnects between the wireless communication module and the first switch switch unit according to the switch reset signal
According to path, and the master controller is connected with the wireless communication module.
Another object of the present invention also reside in a kind of vehicle-mounted road including above-mentioned data communication path switching circuit of offer by
Device.
A further object of the present invention also resides in a kind of automobile including above-mentioned vehicle-mounted router of offer.
The present invention by vehicle-mounted router using including first switch switch unit and second switch switch unit
Data communication path switching circuit, when the non-output switch switching signal of master controller, the connection communication of first switch switch unit
Interface circuit and interface conversion circuit, second switch switch unit connection master controller and wireless communication module;Work as master controller
During output switch switching signal, first switch switch unit connects logical with second switch switch unit according to the switch switching signal
Interface circuit to wireless communication module is believed, so as to when the data that master controller is read occur abnormal, by data communication path
Switch to from communication interface circuit by first switch switch unit and second switch switch unit to wireless communication module, then it is outer
Portion's equipment can directly carry out digital independent by communication interface circuit, and then solve master of the prior art in vehicle-mounted router
When the data that controller is read occur abnormal, it is impossible to continue to carry out the service data of wireless communication module by other paths
The problem of reading.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 shows the modular structure of data communication path switching circuit provided in an embodiment of the present invention, for the ease of saying
It is bright, the part related to the embodiment of the present invention is illustrate only, details are as follows:
Master controller 200 (such as single-chip microcomputer, arm processor in data communication path switching circuit 100 and vehicle-mounted router
Or other possess the Programmable Logic Controller of mathematical logic disposal ability), interface conversion circuit 300, wireless communication module 400
(such as Micro usb circuits, it includes Micro USB interfaces and Micro for (such as LTE module) and communication interface circuit 500
USB interface power circuit) connection, the USB interface electricity in the connecting interface change-over circuit 300 of master controller 200 and vehicle-mounted router
Road 600, interface conversion circuit 300 is used to change data between serial port protocol and usb protocol, and it can be conventional
UART to USB change-over circuits.When master controller 200 receives switching command by usb circuit 600, master controller
200 output switch switching signals to data communication path switching circuit 100, usb circuit 600 and external equipment (such as computer)
Connection, external equipment is communicated by usb circuit 600 with master controller 200.Vehicle-mounted road possesses above-mentioned wireless by device
Communication module 400, it is possible to achieve the translation function of LTE to WIFI, so as to access clothes for the personnel in automobile provide wireless network
Business.
Data communication path switching circuit 100 includes first switch switch unit 101 and second switch switch unit 102.
The communication anode and communication negative terminal connection communication interface circuit 500 of first switch switch unit 101, first switch is cut
Change the first communication anode and the first communication negative terminal connecting interface change-over circuit 300 of unit 101, first switch switch unit 101
Switch control terminal connection master controller 200, the second communication anode of first switch switch unit 101 and the second communication negative terminal point
Not Lian Jie second switch switch unit 102 the second communication anode and the second communication negative terminal, second switch switch unit 102 opens
Close control end, the first communication anode and the first communication negative terminal connection master controller 200, the data of second switch switch unit 102
Communication anode and data communication negative terminal connection wireless communication module 400.
When master controller 200 does not export above-mentioned switch switching signal, the connection communication of first switch switch unit 101 connects
Mouth circuit 500 and interface conversion circuit 300, second switch switch unit 102 connection master controller 200 and wireless communication module
400, master controller 200 reads the service data of wireless communication module 400 by second switch switch unit 102, and will be read
The service data got is exported to communication interface circuit 500 by interface conversion circuit 300 and first switch switch unit 101.
Now, the data path between first switch switch unit 101 and second switch switch unit 102 is to disconnect.
(show that master controller 200 causes institute because of failure exception when master controller 200 exports above-mentioned switch switching signal
Correspondingly there is exception in the service data of reading) when, first switch switch unit 101 and the basis of second switch switch unit 102
Switch switching signal connects communication interface circuit 500 to wireless communication module 400, external equipment by communication interface circuit 500,
First switch switch unit 101 and second switch switch unit 102 are read out to the service data of wireless communication module 400.
User can be analyzed according to the service data for being read by external equipment to the running status of wireless communication module 400;
The process of analysis can generate data variation curve or data variation diagram so as to user according to read service data
The running status of wireless communication module 400 can be visually known.Meanwhile, export above-mentioned switch switching in master controller 200
During signal, the data that first switch switch unit 101 can be between de-interfaced change-over circuit 300 and communication interface circuit 500 are led to
Road, second switch switch unit 102 can disconnect the data path between master controller 200 and wireless communication module 400.
Additionally, in order that data communication path switching circuit 100 allows hand over back original after master controller 200 recovers normally
The data communication path for coming, as shown in Fig. 2 data communication path switching circuit 100 can also include power detecting unit 103;
The test side of power detecting unit 103 and output end difference connection communication interface circuit 500 and master controller 200.
When the power input of communication interface circuit 500 is executed once switching manipulation, (i.e. power input is disconnected and again
Access, for example, plug once) when, the feedback path reset signal of power detecting unit 103 to master controller 200, master controller 200
According to the path reset signal output switch reset signal, first switch switch unit 101 disconnects according to the switch reset signal
Data path between communication interface circuit 500 and second switch switch unit 102, and connect communication interface circuit 500 and connect
Mouth change-over circuit 300;Second switch switch unit 102 is according to the switch reset signal disconnection of wireless communication module 400 and first
Data path between switch switching unit 102, and connect master controller 200 and wireless communication module 400.
Specifically, as shown in Figure 3 and Figure 4, first switch switch unit 101 includes:
First multiplexer switch chip U1, first resistor R1, the first electric capacity C1, the second electric capacity C2, second resistance R2,
Three resistance R3 and the 4th resistance R4;
The data positive pole D+ and data negative pole D- of the first multiplexer switch chip U1 are respectively first switch switch unit
101 communication anode and communication negative terminal, the first data positive pole 1D+ and the first data negative pole of the first multiplexer switch chip U1
1D- is respectively the first communication anode and the first communication negative terminal of first switch switch unit 101, the first multiplexer switch chip
The selected input pin S of U1 is the switch control terminal of first switch switch unit 101, the enable of the first multiplexer switch chip U1
PinThe first end of connection first resistor R1, the of the supply pin VCC and the first electric capacity C1 of the first multiplexer switch chip U1
The first end of one end and the second electric capacity C2 is connected to dc source (+3.3V dc sources as shown in Figure 3 and Figure 4) altogether, more than first
Second end of the lower margin GND and first resistor R1 of road multiplex switch chip U1, second end of the first electric capacity C1 and the second electric capacity
Second end of C2 is connected to ground, the second data positive pole 2D+ of the first multiplexer switch chip U1 and the second data negative pole 2D- points altogether
Not Lian Jie second resistance R2 first end and the first end of 3rd resistor R3, second end of second resistance R2 and 3rd resistor R3's
Second end is respectively the second communication anode and the second communication negative terminal of first switch switch unit 101, and the 4th resistance R4 is connected to
Between the selected input pin S and ground of the first multiplexer switch chip U1.Wherein, the first multiplexer switch chip U1 specifically may be used
Being the multiplexer of model TS3USB221RSER.
As shown in Figure 3 and Figure 4, second switch switch unit 102 includes:
Second multiplexer switch chip U2, the 5th resistance R5, the 3rd electric capacity C3, the 4th electric capacity C4 and the 6th resistance
R6;
The data positive pole D+ and data negative pole D- of the second multiplexer switch chip U2 are respectively second switch switch unit
102 data communication anode and data communication negative terminal, the first data positive pole 1D+ and first of the second multiplexer switch chip U2
Data negative pole 1D- is respectively the first communication anode and the first communication negative terminal of second switch switch unit 102, the second multiplexing
The second data positive pole 2D+ of switch chip U2 and the second data negative pole 2D- be respectively second switch switch unit 102 second lead to
Letter anode and the second communication negative terminal, the selected input pin S of the second multiplexer switch chip U2 is second switch switch unit 102
Switch control terminal, the enable pin of the second multiplexer switch chip U2Connect the first end of the 5th resistance R5, the second multichannel
The supply pin VCC and the first end of the 3rd electric capacity C3 and the first end of the 4th electric capacity C4 of multiplex switch chip U2 are connected to direct current altogether
Source (+3.3V dc sources as shown in Figure 3 and Figure 4), the lower margin GND and the 5th resistance R5 of the second multiplexer switch chip U2
The second end, second end of the 3rd electric capacity C3 and second end of the 4th electric capacity C4 be connected to ground altogether, the 6th resistance R6 is connected to the
Between the selected input pin S and ground of two multiplexer switch chip U2.Wherein, the second multiplexer switch chip U2 specifically can be with
It is the multiplexer of model TS3USB221RSER.
As shown in figure 4, power detecting unit 103 includes:
7th resistance R7, the 8th resistance R8, the 5th electric capacity C5, the 9th resistance R9, NPN type triode Q1 and the tenth resistance
R10;
The first end of the 7th resistance R7 is the test side of power detecting unit 103, second end and the 8th of the 7th resistance R7
The first end of the first end of resistance R8 and the 5th electric capacity C5 is connected to the first end of the 9th resistance R9, second end of the 8th resistance R8 altogether
Ground is connected to altogether with second end of the 5th electric capacity C5, and second end of the 9th resistance R9 connects the base stage of NPN type triode Q1, NPN type
The common contact of the first end of the colelctor electrode of triode Q1 and the tenth resistance R10 is the output end of power detecting unit 103, NPN type
The grounded emitter of triode Q1, the second end connection dc source (+3.3V direct currents as shown in Figure 4 of the tenth resistance R10
Source).
Above-mentioned data communication path switching circuit is described further below in conjunction with operation principle:
When master controller 200 does not export the gating control of above-mentioned switch switching signal to the first multiplexer switch chip U1
During the gating control end S of end S processed and the second multiplexer switch chip U2, the data positive pole of the first multiplexer switch chip U1
D+ and data negative pole D- respectively to its first data positive pole 1D+ and the first data negative pole 1D- is corresponding connects, then communication interface circuit
500 are connected and carried out data transmission by the first multiplexer switch chip U1 with interface conversion circuit 300;Meanwhile, more than second
The data positive pole D+ and data negative pole D- of road multiplex switch chip U2 respectively with its first data positive pole 1D+ and the first data negative pole
1D- is accordingly connected, then master controller 200 is connected with wireless communication module 400 by the second multiplexer switch chip U2 and gone forward side by side
Row digital independent.So, master controller 200 can read wireless communication module 400 by the second multiplexer switch chip U2
Service data, and the service data that will be read is defeated by the multiplexer switch chip U1 of interface conversion circuit 300 and first
Go out to communication interface circuit 500.Now, due to the second multiplexer switch chip U2 data positive pole D+ and data negative pole D- simultaneously
Without respectively to its second data positive pole 2D+ and the second data negative pole 2D- is corresponding connects, and the first multiplexer switch chip U1
Data positive pole D+ and data negative pole D- also not respectively to its second data positive pole 2D+ and the second data negative pole 2D- is corresponding connects
Logical, i.e., the data path between first switch switch unit 101 and second switch switch unit 102 is to disconnect, so communication
Interface circuit 500 cannot be by first switch switch unit 101 and second switch switch unit 102 and wireless communication module 400
Connect and carry out data transmission.
(show that master controller 200 causes institute because of failure exception when master controller 200 exports above-mentioned switch switching signal
Correspondingly there is exception in the service data of reading) when, according to the switch switching signal, the number of the first multiplexer switch chip U1
According to positive pole D+ and data negative pole D- switch to respectively to its second data positive pole 2D+ and the second data negative pole 2D- is corresponding connects, and
The data positive pole D+ and data negative pole D- of the second multiplexer switch chip U2 also switch to respectively with its second data positive pole 2D+
Accordingly connected with the second data negative pole 2D-, then external equipment (such as computer) just can be by communication interface circuit 500, the first multichannel
Multiplex switch chip U1 and the second multiplexer switch chip U2 are read out to the service data of wireless communication module 400.
When user confirm master controller 200 recover normally (or based on other debug test case) need to switch back into it is original
During communication path, user performs a switching manipulation to the power input of communication interface circuit 500, and (i.e. power input is disconnected simultaneously
Again access, for example, plug once), the first end of the 7th resistance R7 can receive a level changed according to high-low-high and believe
Number (i.e. before deenergization be high level, during deenergization be low level, again access power supply when be high level), the pole of NPN type three
Pipe Q1 ends when level signal is low level, then the colelctor electrode of NPN type triode Q1 generates high level as above-mentioned path
Reset signal, then, master controller 200 is according to the path reset signal output switch reset signal to the first multiplexer switch
The gating control end S of the gating control end S of chip U1 and the second multiplexer switch chip U2, the first multiplexer switch chip
The data positive pole D+ and data negative pole D- of U1 switch back into again respectively with its first data positive pole 1D+ and the first data negative pole 1D- phases
The state that should be connected, the data positive pole D+ and data negative pole D- of the second multiplexer switch chip U2 also switch back into respectively with its
The state that one data positive pole 1D+ and the first data negative pole 1D- is accordingly connected, so master controller 200 again can be by more than second
Road multiplex switch chip U2 reads service data from wireless communication module 400, and by the multichannel of interface conversion circuit 300 and first
Multiplex switch chip U1 exports read service data to communication interface circuit 500.
Based on application of the above-mentioned data communication path switching circuit in vehicle-mounted router, the embodiment of the present invention is additionally provided
A kind of vehicle-mounted router including above-mentioned data communication path switching circuit.And because vehicle-mounted router can be to be applied to automobile
In, to provide wireless network access services for occupant, so the embodiment of the present invention additionally provides one kind including above-mentioned
The automobile of vehicle-mounted router.
In sum, the embodiment of the present invention includes the He of first switch switch unit 101 by being used in vehicle-mounted router
The data communication path switching circuit 100 of second switch switch unit 102, when the non-output switch switching signal of master controller 200
When, first switch switch unit 101 connects communication interface circuit 500 and interface conversion circuit 300, second switch switch unit
102 connection master controllers 200 and wireless communication module 400;When 200 output switch switching signal of master controller, first switch
Switch unit 101 connects communication interface circuit 500 to channel radio with second switch switch unit 102 according to the switch switching signal
Letter module 400, so as to when the data that master controller 200 is read occur abnormal, data communication path is switched to from communication
Interface circuit 500 passes through first switch switch unit 101 and second switch switch unit 102 to wireless communication module 400, then outer
Portion's equipment can directly carry out digital independent by communication interface circuit 500, and then solve prior art in vehicle-mounted router
The data that are read of master controller when occurring abnormal, it is impossible to continue the service data to wireless communication module by other paths
The problem being read out.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.