Serial ports automatic identification equipment and method
Technical field
The present invention relates to a kind of field of communication technology, more particularly to a kind of serial ports automatic identification equipment and method.
Background technology
With evolution of computer networks, the rise of internet, more and more intelligence instrument access networks have become a kind of
Trend.The shared and remote management of data can be realized after access network based on ethernet.
Non-traffic mouth on veneer includes serial ports and network interface.Wherein, serial ports is one of common debugging interface of veneer, is single
Plate hardware is debugged and the most frequently used, most basic interface of positioning problems.Serial ports is in central processing unit (Central Processing
Unit;Abbreviation CPU) start after the interface that initializes earliest, initialization of the central processor CPU to single plate hardware can be exported
Journey simultaneously assigns control command.Network interface is the high-speed interface that CPU directly goes out, and it is big to can be used for data volumes such as business software in equipment
Communication.
Ethernet switch is a kind of all kinds of servers of connection and terminal and is responsible for data receiver and forwarding between them
Equipment.In interchanger field, because the serial ports line sequence of each manufacturer is different, commissioning devices from different manufacturers, and then selection pair are needed
Answer the Serial Port Line of plant equipment.
It, will be because of if forgetting the Serial Port Line of band correspondence plant equipment but in practical use or maintenance process
The difference of serial ports line sequence and can not log in, to safeguard and debugging bring big inconvenience, cause the waste of human and material resources, and
The timeliness of repairing can be delayed.
Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of serial ports automatic identification equipment and
Inconvenience is safeguarded and debugged to method for solving not logging in because of the difference of serial ports line sequence in the prior art, human and material resources
It is of high cost, repair poor in timeliness the problem of.
In order to achieve the above objects and other related objects, the present invention provides a kind of serial ports automatic identification equipment, and serial ports is automatic
Identification device includes power supply unit, analog switch and central processing unit, wherein:The power supply unit respectively with the analog switch
It is connected with the central processing unit, for providing power supply to the analog switch and the central processing unit;The central processing
Device is connect respectively with the power supply unit and the analog switch, for determining the access device being connect with the analog switch
Line sequence type, and trigger the analog switch and switch to port corresponding with the line sequence type of the access device.
In one embodiment of the invention, the power module takes electricity by DB9 ports.
In one embodiment of the invention, the central processing unit is SCT15W203 chips.
In one embodiment of the invention, the analog switch is FSUSB30MUX chips.
In one embodiment of the invention, the analog switch is connect by RJ45 ports with the access device.
In one embodiment of the invention, the access device is interchanger.
Correspondingly, the present invention also provides a kind of serial ports automatic identifying method, the serial ports automatic identifying method includes:Really
Surely the line sequence type for the access device being connect by analog switch with central processing unit;According to the line sequence class of the access device
The analog switch is switched to port corresponding with the line sequence type of the access device by type.
In one embodiment of the invention, the central processing unit is SCT15W203 chips.
In one embodiment of the invention, the analog switch is FSUSB30MUX chips.
In one embodiment of the invention, the analog switch is connect by RJ45 ports with the access device.
As described above, the serial ports automatic identification equipment and method of the present invention, have the advantages that:
In serial ports automatic identification equipment, setting power supply unit, analog switch and central processing unit, wherein, power supply unit
For providing power supply to analog switch and central processing unit;Central processing unit point sets for the determining access being connect with analog switch
Standby line sequence type, and simulation switching is triggered to port corresponding with the line sequence type of the access device.The serial ports is certainly
Dynamic identification device can automatic identification access device line sequence type, so as to which analog switch be made to switch to and access device line sequence type
Corresponding port avoids not using or debugging caused by serial ports line sequence type difference, reduces cost of human and material resources, carries
The timeliness of height repairing.
Further, the total current that device used uses in serial ports automatic identification equipment is less than 10mA, can directly use
Serial ports takes the mode of electricity to provide power supply, i.e., power module can take electricity by DB9 ports in serial ports automatic identification equipment, makes serial ports certainly
Dynamic identification device use is more convenient, and use scope is wider.
Description of the drawings
Fig. 1 is shown as structure diagram of the serial ports automatic identification equipment of the present invention in one embodiment.
Fig. 2 is shown as structure diagram of the analog switch in one embodiment in serial ports automatic identification equipment of the present invention.
Fig. 3 is shown as flow diagram of the serial ports automatic identifying method of the present invention in one embodiment.
Component label instructions
1 serial ports automatic identification equipment
11 power supply units
12 central processing units
13 analog switches
S11~S13 steps
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way
Think, component count, shape and size when only display is with related component in the present invention rather than according to actual implementation in schema then
It draws, kenel, quantity and the ratio of each component can be a kind of random change during actual implementation, and its assembly layout kenel
It is likely more complexity.
In the prior art, access device is debugged, use or when safeguarding, due to the Serial Port Line of devices from different manufacturers
Sequence type is different, and leads to not log in, and causes big inconvenience to access device debugging, use or maintenance, causes manpower, object
The waste of power, and the timeliness of repairing can be delayed.It therefore, can be to access if a kind of serial ports automatic identification equipment can be provided
Equipment is debugged, use or when safeguarding, is automatically provided port corresponding with the line sequence type of access device, will be avoided that above-mentioned
Various inconvenience reduce the waste of human and material resources, improve the timeliness of repairing.
Referring to Fig. 1, the present invention provides a kind of structure diagram of serial ports automatic identification equipment.Serial ports is known automatically in Fig. 1
Other device 1 includes power supply unit 11, analog switch 13 and central processing unit 12;Wherein,
The power supply unit 11 is connect respectively with the analog switch 13 and the central processing unit 12, for the mould
Intend switch 13 and the central processing unit 12 provides power supply;
The central processing unit 12 is connect respectively with the power supply unit 11 and the analog switch 13, for determining and institute
The line sequence type of the access device of the connection of analog switch 13 is stated, and triggers the analog switch 13 and switches to and the access device
The corresponding port of line sequence type.
In the present embodiment, the central processing unit 13 in the serial ports automatic identification equipment 1 being capable of automatic identification access device line
Sequence type so as to which analog switch 13 be made to switch to port corresponding with access device line sequence type, is avoided because of access device serial ports
It can not use or debug caused by line sequence type difference, reduce cost of human and material resources, improve the timeliness of repairing.
In another embodiment, power module takes electricity by DB9 ports in serial ports automatic identification equipment.Due to serial ports certainly
The total current that device used uses in dynamic identification device is less than 10mA, therefore can provide electricity in a manner of directly taking electricity using serial ports
Source, so as to make serial ports automatic identification equipment use more convenient, use scope is wider.
In a further embodiment, the central processing unit is SCT15W203 chips.The analog switch can be
FSUSB30MUX chips.Specifically, analog switch can be the model FSUSB30MUX chips of fairchild company production.Serial ports identifies
The structure materials of device are simple, it is easy to accomplish.
Referring to Fig. 2, structure diagram when being FSUSB30MUX chips for analog switch in serial ports automatic identification equipment.
OE and S signals are controlled by central processing unit.Analog switch is during the work time in Fig. 2:
When OE (output enable export Enable Pin) is high level, then D+, the signal of D- will not be transferred out
It goes;
When OE is low level, when S (select input, select input terminal) is low level, then D+, D- will be with 1
+, 1- is respectively turned on;
When OE is low level, when S is high level, then D+, D- will be respectively turned on 2+, 2-.
In yet another embodiment, the analog switch is connect by RJ45 ports with the access device.The access
Equipment is interchanger.At this point, the equipment of central processing unit detection RJ45 port accesses belongs to the interchanger of any line sequence type.
If do not responded, central processing unit will be constantly in detection state, after OK is detected, it will send the finger of a detection OK
It enables, and analog switch is controlled to be switched to port corresponding with the line sequence type of access device.Serial ports automatic identification in the present embodiment
Device can effectively increase the convenience of interchanger access, when debugging in interchanger, operation and maintenance, not limited by port
System is more convenient.
Correspondingly, for access device is debugged, use or when safeguarding, due to the Serial Port Line of devices from different manufacturers
Sequence type is different, caused by can not log in, access device debugging, use or safeguard inconvenient, human and material resources are of high cost, repairing
The problems such as poor in timeliness, also provides a kind of serial ports automatic identifying method, can access device is debugged, use or maintenance
When, port corresponding with the line sequence type of access device is automatically provided, will be avoided that above-mentioned various inconvenience, reduces human and material resources
Waste, improve the timeliness of repairing.
Referring to Fig. 3, the present invention provides a kind of flow diagram of serial ports automatic identifying method.Serial ports is known automatically in Fig. 3
Other method includes:
Step S11 determines the line sequence type of access device being connect by analog switch with central processing unit;
According to the line sequence type of the access device, the analog switch is switched to and the access device by step S12
The corresponding port of line sequence type.
In the present embodiment serial ports automatic identifying method can automatic identification access device line sequence type, so as to make analog switch
Port corresponding with access device line sequence type is switched to, avoids not using or adjusting caused by serial ports line sequence type difference
Examination reduces cost of human and material resources, improves the timeliness of repairing.
In another embodiment, the central processing unit is SCT15W203 chips.The analog switch can be
FSUSB30MUX chips.Specifically, analog switch can be the model FSUSB30MUX chips of fairchild company production.Serial ports identifies
The structure materials of device are simple, it is easy to accomplish.
In further embodiment, the analog switch is connect by RJ45 ports with the access device.The access
Equipment can be interchanger.At this point, the equipment of central processing unit detection RJ45 port accesses belongs to the exchange of any line sequence type
Machine.If do not responded, central processing unit will be constantly in detection state, after OK is detected, it will send a detection OK
Instruction, and analog switch is controlled to be switched to port corresponding with the line sequence type of access device.Serial ports is automatic in the present embodiment
Identification device can effectively increase the convenience of interchanger access, when debugging in interchanger, operation and maintenance, not by port
Limitation, it is more convenient.
In conclusion the central processing unit in the serial ports automatic identification equipment of the invention being capable of automatic identification access device line
Sequence type so as to which analog switch be made to switch to port corresponding with access device line sequence type, is avoided because of access device Serial Port Line
It can not use or debug caused by sequence type difference, reduce cost of human and material resources, improve the timeliness of repairing.In addition, string
The total current that device used uses in mouth automatic identification equipment is less than 10mA, can provide electricity in a manner of directly taking electricity using serial ports
Power module can take electricity by DB9 ports in source, i.e. serial ports automatic identification equipment, make serial ports automatic identification equipment using more just
Victory, use scope are wider.So the present invention effectively overcomes various shortcoming of the prior art and has high industrial exploitation value
Value.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.