Background technology
Because USB interface is universal in recent years, USB interface-based equipment is more and more on the market.Many manufacturers are all at development USB product.These USB products are needing repeatedly to test during researching and developing launch, and some product needed was carried out special operational (need carry out the bottom format manipulation as USB flash disk when dispatching from the factory) before selling.To the testing equipment of USB interface or operation the time, main frame at first needs to judge the state of the equipment of USB interface, and USB interface is made of four lines, power lead (VCC), signal wire (D+), signal wire (D-), ground wire (GND).Being connected by being communicated with these four lines of USB device and main frame realizes.Main frame when not having USB device to insert, signal wire (D+, D-) level on is in low level state, in case and access device, signal wire (D+, among D-) one can by on move high level to, like this, equipment can normally use.If equipment is access in, but signal wire (D+, D-) all not by on move high level to, or all by on move high level to, this equipment is exactly out of order so.
The USB port that these USB products all need to be connected to main frame when doing test and special operational is operated.But USB port quantity integrated on the general main frame is fewer.The production of common product all is in batches, and this just causes main frame and operating personnel's quantity of needs when doing test and special operational all many.So just caused the resource serious waste, production efficiency is low.
That more generally use in the market is USB HUB, a USB interface by main frame expands to a plurality of USB interface like this, in generative process, use generic USB HUB, need the artificial plug equipment that does not stop, whether the user could discern certain port like this equipment, the time of artificial plug equipment has occupied in whole process of production greatly, main frame can be carried out different business to the equipment on each USB interface in addition, for each equipment all distributes corresponding bandwidth, that is to say that the equipment on a plurality of USB interface is shared the usb bus bandwidth.
The problem that prior art exists:
1. upper application software cannot optionally be controlled the downstream USB Extended Capabilities Port of appointment.
2. whether whether can't detect has USB device normal with the detection USB device on the Extended Capabilities Port, which USB device fault the user can't know.
3. the quantity that inserts the USB device of Extended Capabilities Port can influence the usb bus bandwidth.
4. production efficiency is low.
The utility model content
In order to solve above-mentioned problems of the prior art, the utility model provides a kind of device that USB interface equipment is operated, the technical solution adopted in the utility model is to increase control module in existing apparatus, upper layer software (applications) in the main frame uses certain communication protocol to communicate by letter with control module by interface function, specifies Extended Capabilities Port by control module.
The utility model provides a kind of device that USB interface equipment is operated, this device comprises main frame, control module, switch module, Extended Capabilities Port module, main frame is by the USB interface link control module and the switch module of main frame, control module is connected with switch module, and switch module is connected with the Extended Capabilities Port module.
Control module comprises the state that is used to detect the USB device that Extended Capabilities Port connects with this address, and reports to the detection sub-module of main frame.
Extended Capabilities Port modular power source line, D+ line and D-line are connected the main frame USB interface by switch module.
Extended Capabilities Port module ground wire directly is connected with the main frame USB interface.
When switch module was open mode, USB device power supply, three connecting lines of D+ and D-that switch module is communicated with on the Extended Capabilities Port were connected with the main frame USB interface.
When switch module was closed condition, USB device power supply, three connecting lines of D+ and D-that switch module is isolated on the Extended Capabilities Port were connected with the main frame USB interface.
Switch module comprises analog switch chip, address selection chip and on-off circuit, the address selection chip connects described control module, analog switch chip and on-off circuit, Extended Capabilities Port modular power source line connects the main frame USB interface by on-off circuit, and Extended Capabilities Port module D+ line, D-line connect the main frame USB interface by the analog switch chip.
Extended Capabilities Port module ground wire connects the main frame USB interface by switch module.
When switch module was open mode, the USB device on the Extended Capabilities Port was connected with the main frame USB interface by power supply, four connecting lines of D+, D-and ground.
When switch module was closed condition, USB device power supply, four connecting lines of D+, D-and ground that switch module is isolated on the Extended Capabilities Port were connected with the main frame USB interface.
Switch module comprises analog switch chip, address selection chip and on-off circuit, address selection chip link control module, analog switch chip and on-off circuit, Extended Capabilities Port modular power source line is connected the main frame USB interface with ground wire by on-off circuit, and Extended Capabilities Port module D+ line, D-line connect the main frame USB interface by the analog switch chip.
Main frame is by the USB interface link control module and the switch module of USB HUB module.
The Extended Capabilities Port module comprises a plurality of expansion interfaces.
Beneficial effect:
1. upper application software can optionally be controlled the downstream USB Extended Capabilities Port of appointment.
2. can detect and specify on the Extended Capabilities Port whether USB device is arranged, and whether detect USB device normal, which USB device fault the user can know.
3. the quantity that inserts the USB device of Extended Capabilities Port can not influence the usb bus bandwidth.
4. improved production efficiency.
Embodiment
Further specify the utility model below in conjunction with drawings and Examples, but not as to qualification of the present utility model.
The utility model device is dimerous by software unit and hardware cell.Software section mainly refers to upper application software, and api function that upper application software can carry by system and respective protocol and control module communicate.
Control module is gone the physical connection of gauge tap module (this switch module comprises address selection chip 74HC138, on-off circuit and bidirectional high speed analog switch chip MAX4638) and Extended Capabilities Port as requested after the order of receiving upper application software.Each Extended Capabilities Port all has an absolute port numbers, and these port numbers have been assigned with different addresses.Control module is determined the designated port that upper application software need be controlled by the address selection chip in the switch module.
Switch module inside comprises analog switch chip, address selection chip and the on-off circuit that is made of transistor.Because USB device on the Extended Capabilities Port and main-machine communication need four connecting lines (power supply, D+, D-, ground).So we use these elements of switch module inside that these four connecting lines of the USB device on the Extended Capabilities Port are isolated respectively.Just can control communicating by letter of USB device on the Extended Capabilities Port of appointment and main frame so physically.
When sending to control module, upper application software orders, when requiring the USB device on a certain Extended Capabilities Port of visit.The address selection chip of control module by switch module inside selected the Extended Capabilities Port of assigned address, and controls analog switch chip and transistor switching circuit simultaneously, and four connecting lines of USB and the main frame USB interface of the Extended Capabilities Port of assigned address are connected.Specify the USB device of Extended Capabilities Port just can communicate by letter normally like this with main frame.Can see on Extended Capabilities Port, having only an equipment to communicate by implementation method, when this equipment and main frame communicate, be disconnected by physics between other Extended Capabilities Port and the main frame USB interface with main frame.Such benefit is no matter what USB device are Extended Capabilities Port connect, and system can not produce usb bus bandwidth deficiency, and upper application software can arbitrarily be controlled the Extended Capabilities Port of appointment.
Embodiment 1
As shown in Figure 1, the device that the utility model provides comprises the main frame 12 that includes upper-layer user's software unit, USB HUB module 13 (comprising a USB HUB chip AU9254A21), control module 14 (be control module, this unit comprises a microcontroller Motorola 68HC908JB8), switch module 15 and Extended Capabilities Port module 16.Use direct data connected mode between these several modules, concrete annexation is that main frame 12 is distinguished link control module 14 and switch module 15 by two USB interface of the USB HUB module 13 of main frame, control module 14 is connected with switch module 15, and switch module 15 is connected with Extended Capabilities Port module 16.
Wherein upper-layer user's software unit is made up of api function and the corresponding interface order and user software.The user can operate by api function and the corresponding interface order, controls Extended Capabilities Port module 16.
USB HUB module 13 is made of single-chip, has mainly realized the function of usb hub.Guarantee that control module 14 and Extended Capabilities Port module 16 can communicate with main frame.
Control module 14 comprises microprocessor, this module is used for being responsible for the order of response upper-layer user software unit, and real-time come gauge tap module 15 according to specific instructions, reach the function of management 16 Extended Capabilities Port modules, control module 14 also comprises the state that is used to detect the USB device that Extended Capabilities Port connects with described address, and reports to the detection sub-module 17 of main frame.
Extended Capabilities Port modular power source line, D+ line, D-line and ground wire are connected the main frame USB interface by switch module, when switch module is open mode, USB device on the Extended Capabilities Port is connected with the main frame USB interface by power supply, four connecting lines of D+, D-and ground, when switch module was closed condition, USB device power supply, four connecting lines of D+, D-and ground that switch module is isolated on the Extended Capabilities Port were connected with the main frame USB interface.Certainly the Extended Capabilities Port ground wire also can directly be connected with the main frame USB interface always, and switch module also can be realized identical technical purpose by opening the powered-down line separately.
Specifically describe and be exactly, 15 switch modules comprise analog switch chip, address selection chip and on-off circuit, address selection chip link control module, analog switch chip and on-off circuit, on-off circuit connects Extended Capabilities Port module and main frame USB interface by power lead, ground wire, and the analog switch chip connects Extended Capabilities Port module and main frame USB interface by D+, D-line.When on-off circuit, when the analog switch chip is open mode, promptly when on-off circuit, analog switch chip were opened between Extended Capabilities Port with this address and the main frame path, the USB device on the Extended Capabilities Port was connected with the main frame USB interface by power supply, four connecting lines of D+, D-and ground.When on-off circuit, when the analog switch chip is closed condition, promptly when on-off circuit, analog switch chip were closed between Extended Capabilities Port with this address and the main frame USB interface path, USB device power supply, four connecting lines of D+, D-and ground that on-off circuit, analog switch chip are isolated on the Extended Capabilities Port were connected with the main frame USB interface.Switch module 15 is made of 10 switch submodules, and the control of controlled module 14 is communicated with on the physical channel or disconnects being connected of Extended Capabilities Port module 16 and USB HUB module 13.And Extended Capabilities Port module 16 has only an Extended Capabilities Port to keep physically being connected with USB HUB module 13 at one time.
Extended Capabilities Port module 16 provides 10 Extended Capabilities Port, it is external connection interface section, the connecting interface of USB flash disk can be provided for the user, owing on Extended Capabilities Port, have only a USB flash disk to communicate with main frame, when this USB flash disk and main frame communicate, disconnected by physics between other Extended Capabilities Port and the main frame, so no matter what USB device are Extended Capabilities Port connect, system can not produce the problem of usb bus bandwidth deficiency, and therefore Extended Capabilities Port module 16 can provide any a plurality of Extended Capabilities Port in theory.
Embodiment 2
As shown in Figure 2, the utility model device comprises that the main frame 12, control module 14 (control module comprises a microcontroller Motorola 68HC908JB8), switch module 15 (switch module comprises addressing chip 74HC138, on-off circuit and bidirectional high speed analog switch chip MAX4638) and the 15 Extended Capabilities Port modules that include upper-layer user's software unit are the Extended Capabilities Port module.Use direct data connected mode between these several modules, concrete annexation is USB interface link control module 14 and the switch module 15 of main frame 12 by main frame, control module 14 is connected with switch module 15, and switch module 15 is connected with Extended Capabilities Port module 16.
Wherein upper-layer user's software unit is made up of api function and the corresponding interface order and user software.The user can operate by api function and the corresponding interface order, controls Extended Capabilities Port module 16.
Control module 14 comprises microprocessor, and this module is responsible for responding the order of upper-layer user's software unit, and real-time comes gauge tap module 15 according to specific instructions, reaches the function of administration extensions port module 16.
Switch module 15 comprises analog switch chip, address selection chip and on-off circuit, address selection chip link control module, analog switch chip and on-off circuit, on-off circuit connects Extended Capabilities Port module and main frame USB interface by power lead, ground wire, and the analog switch chip connects this Extended Capabilities Port module and main frame USB interface by D+, D-line.When on-off circuit, analog switch chip were opened between Extended Capabilities Port with this address and the main frame USB interface path, the USB device on the Extended Capabilities Port was connected with the main frame USB interface by power supply, four connecting lines of D+, D-and ground.When on-off circuit, analog switch chip were closed between Extended Capabilities Port with this address and the main frame USB interface path, USB device power supply, four connecting lines of D+, D-and ground that on-off circuit, analog switch chip are isolated on the Extended Capabilities Port were connected with the main frame USB interface.Certainly the Extended Capabilities Port ground wire also can directly be connected with the main frame USB interface always, and on-off circuit closes the border power lead and also can realize identical technical purpose by opening separately.The control of switch module 15 controlled modules 14 is communicated with on the physical channel or disconnects being connected of Extended Capabilities Port module 16 and main frame 12.And have only an Extended Capabilities Port in the Extended Capabilities Port module 16 to keep physically being connected at one time with main frame 12.
Extended Capabilities Port module 16 provides external connection interface section, and the connecting interface of USB device can be provided for the user.
More than to a kind of device provided by the utility model, be described in detail, used specific case herein principle of the present utility model and embodiment are set forth, the explanation of above embodiment just is used for helping to understand realization thought of the present utility model; Simultaneously, for one of ordinary skill in the art, according to thought of the present utility model, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as restriction of the present utility model.