Detailed Description Of The Invention
About aforementioned and other technology contents, characteristics and effect of the present invention, in the detailed description of following cooperation five embodiment with reference to the accompanying drawings, can clearly present.
Before describing the present invention in detail, be noted that in the following description content similar or components identical is to represent with identical label.
Consulting shown in Figure 1ly, is first preferred embodiment of USB access device of the present invention, and USB access device 1 comprises first USB port 11, second USB port 12 and control module 13.
First and second USB port the 11, the 12nd meets the A type master control formula high speed connector (A-type host connector) of USB2.0 specification, it is in order to connecting a USB device 2 and the 2nd USB device 4 respectively, and so-called herein first and second USB device the 2, the 4th, comprises that carry-on dish, PDA, digital camera, scanner, external connected hand disk machine/floppy drive/CD player etc. have the peripheral device of USB interface.And be noted that earlier that in the following description the data that read by a USB device 2 are called first data, the data that read by the 2nd USB device 44 are called second data.
Control module 13 is to be connected with first and second USB port 11,12, in order to control the accessing operation of first and second USB port 11,12.Control module 13 is to use so-called OTG (On-The-Go) the specification controller that existing USB2.0 appended (figure does not show), it allows to be plugged on first and second USB device 2,4 on first and second connectivity port 11,12, point-to-point (peer-to-peer) line can be directly carried out, and PC need be do not passed through.In addition, in order to drive the various USB devices that are connected with first and second USB port 11,12, more prestore the driver of various USB devices in the control module 13,, the driver corresponding with this USB device is written into when first or second USB port 11,12 connects a USB device.Below will describe the control flow of control module 13 in detail.
As shown in Figure 2, be under the holding state at USB access device 1, shown in step 21, whether control module 13 can detect has USB device and first or second USB port 11 or 12 to peg graft, and when detecting a USB device 2 and be plugged on first USB port 11, as step 22, the driver that control module 13 is about to a USB device 2 is written into, and carries out accessing operation can control 11 pairs the one USB devices of first USB port 2.
Then, as step 23 and 24, when control module 13 detected second USB port, 12 grafting the 2nd USB device 4, then the driver with the 2nd USB device 4 was written into, and carries out accessing operation can control 12 pairs the 2nd USB devices 4 of second USB port.
And present embodiment does not prepare and utilizes extra operation interface to operate, so control module 13 is that to preestablish first usb connecting port 11 be a data read port, and to set second usb connecting port 12 be that data are write inbound port.Therefore, the USB device (a for example USB device) that need the be read data USB device (for example the 2nd USB device 4) that will deposit data with regard to connecting first USB port 11 in just connects second USB port 12.So, shown in step 25, after first and second USB device 2,4 connects first and second USB port 11,12 respectively, even control module 13 first USB port 11 read the first stored data of a USB device 2, make second USB port 12 deposit these first data in the 2nd USB device 4 then.Whereby, reach in the most basic mode and make first and second USB device 2,4 carry out the purpose of exchanges data.
Then, referring to shown in Figure 3, it is second preferred embodiment of USB access device of the present invention, different with first embodiment is, USB access device 3 is except having first and second USB port 31,32, and outside the control module 33, also comprise a memory cell 34, an operation interface 35 and a display 36.And control module 33 is to comprise a peripheral controller 331 and an access controller 332; Periphery controller 331 is to be electrically connected with peripheral elements such as memory cell 34, operation interface 35 and displays 36, to control the output/input of these peripheral elements.Access controller 332 is one to possess the controller of OTG specification, and it allows the USB device to carry out point-to-point connection by first and second USB port 31,32.Then prestore the driver of various USB devices in the memory cell 34, these drivers are to take for peripheral controller 331, to be loaded in the access controller 332.And access controller 332 can according to first the instruction, data are delivered to second USB port 32 by first USB port 31, and according to second the instruction, data are delivered to first USB port 31 by second USB port 32.And operation interface 35 is the user interfaces with one or more operating key, and its available operation is to produce this first or second instruction.Display 36 is small-sized LCD, is the file data that is used to show that first and second USB device 2,4 is stored, and data transport stream to etc. information.
Therefore, shown in step 41~44 of Fig. 4, be under the holding state at USB access device 3, whether access controller 332 can detect has the USB device to connect first or second USB port 31,32, and in detecting first and second USB device 2,4 successively are plugged on first and second USB port 31,32 o'clock, even peripheral controller 331 is by taking out first and second USB device 2 in the memory cell 34,4 driver also is written in the access controller 332, makes access controller 332 can pass through first and second USB port 31,32 to first and second USB device 2,4 carry out data access.
Then, step 45 as Fig. 4, the steering order that periphery controller 331 is waited for from operation interface 35, and will pass to access controller 332 by the steering order that operation interface 35 transmits, make and judge whether this steering order is first steering order (being about to data are delivered to the 2nd USB device 4 by a USB device 2 instruction), if, then execution in step 46, make first USB port 31 read the first chosen data of one of USB device 2 (operation of choosing a particular data in the file data by the USB device can be reached by operating operation interface 35), make second USB port 32 deposit these first data in the 2nd USB device 4 then.
Get back to step 45, when access controller 332 judges that this steering order is not first instruction, then continue step 47, judge whether this steering order is second steering order (being about to data are delivered to a USB device 2 by the 2nd USB device 4 instruction), if, then execution in step 48, make second USB port 32 read the second selected data of warp of the 2nd USB device 4, make first USB port 31 deposit these second data in a USB device 2 again.
Therefore, as shown in the above description, first and second USB device 2 of present embodiment, 4 and unlike among first embodiment, must with first or second USB port 31 of appointment, 32 connect, it can select to connect first or second USB port 31 arbitrarily, 32 one of them, and by operation interface 35, the user can browse the first or the 2nd USB device 2 earlier, file data in 4, and select desire surely to carry out the file of exchanges data after, send first or second steering order by operation interface 35 again and give access controller 332, make according to the steering order of receiving, control first and second USB port 31,32 to first and second USB device 2,4 carry out data access, to finish the exchanges data action of first and two USB devices.
Again referring to shown in Figure 5, it is the 3rd preferred embodiment of USB access device of the present invention, different with second embodiment is, USB access device 5 is except all members that comprise second embodiment, more comprise a multi-media player unit 51 that is connected with access controller 332, and multi-media player unit 51 include MPEG-1, MPEG-2 and MPEG-3 gunzips such as (being MP3) at least one of them or all, it can be decoded to the multimedia video data that are compressed into MPEG-1, MPEG-2 or MPEG-3 form.And access controller 332 also can be delivered to multi-media player unit 51 with first or second usb connecting port 31,32 by the data that the first or the 2nd USB device 2,4 reads according to the 3rd steering order.And the 3rd steering order can produce via operating operation interface 35.
And as shown in Figure 6, the process step 601~608th of present embodiment is identical with second embodiment, and different with second embodiment be, get back to step 603, when access controller 332 finds to have only a USB device (a for example USB device 2) and first or second usb connecting port 31, when 32 one of them (for example first USB port 31) connect, promptly enter Fig. 7 flow process step 609 2., judge whether the steering order of being received is the 3rd steering order, if, the expression user desires to read the multimedia file data (for example mp3 file) in the USB device 2 and passes through multi-media player unit 51 and broadcast, therefore, as step 610, the-the USB port 31 of promptly controlling access controller 332 is delivered to multi-media player unit 51 with first data and is carried out exporting after the MP3 decoding after reading chosen first data (mp3 file) of one of USB device 2.Therefore, with the output port (Line-Out) of an earphone or loudspeaker connection multi-media player unit 51, can listen to the MP3 music that stores in the USB device 2.
Certainly, if first data instance such as MPEG-2 image file after then carrying out the MPEG-2 decoding and export external display to via multi-media player unit 51, can be viewed and admired the image data that is provided by a USB device 2.
As shown in the above description, USB access device 5, except providing first and second USB port 31,32 to carry out the exchanges data for two USB devices, it also can be selected to export multi-media player unit 51 to the stored multi-medium data of the USB device that first or second USB port 31,32 is connected and play.
As shown in Figure 8, it is the 4th preferred embodiment of USB access device of the present invention, different with second embodiment is, the USB access device 8 of present embodiment comprises that also a USB changes PCI bridge-jointing unit 81, a flashing storage unit 82 and one the 3rd USB port 83 except all members that comprise second embodiment.
The 3rd USB port 83 is a Type B subordinate terminal adapter (B-type client connector), and access controller 332 is to change PCI bridge-jointing unit 81 via USB to be connected with flashing storage unit 82 and the 3rd USB port 83, make USB access device 8 connect a PC (PC) via the 3rd USB port 83, there is not the subordinate (client) of ownership to install (identical) and become one with general USB device, and can make and first and second USB port 31,32 first and second USB devices 2 that connect, 4 can carry out exchanges data with flashing storage unit 82 respectively by the control of access controller 332.
And, access controller 332 also can be according to the 3rd steering order, first or second USB port 31,32 is delivered to flashing storage unit 82 by the data that the first or the 2nd USB device 2,4 reads, and according to the 4th steering order, the data that flashing storage unit 82 stores are delivered to first or second USB port 31,32, and the 3rd and the 4th steering order can produce by operating operation interface 35.In addition, in the following description, the data that read by flashing storage unit 82 are to be called the 3rd data.
Therefore, as Fig. 9 and shown in Figure 10, when USB access device 8 is not connected with PC, its step 901~908th, identical with second embodiment, its difference is then shown in step 903, when access controller 332 detects have only a USB device (a for example USB device 2) and first or second usb connecting port 31,32 one of them (for example first usb connecting port 31) when being connected, represent that a USB device 2 desires to carry out exchanges data with flashing storage unit 82.So access controller 332 is carried out Figure 10 flow process step 909 2., judge whether the steering order of being received is the 3rd steering order, if, then execution in step 910, make first USB port 31 read the first chosen data of a USB device 2, deposit in the flashing storage unit 82 so that first data are changeed PCI bridge-jointing unit 81 via USB.
And the steering order of being received when access controller 332 is when being not the 3rd steering order, as step 911, it judges whether this steering order is the 4th steering order, if, then carry out step 912,332 of access controllers change PCI bridge-jointing unit 81 via USB and read the 3rd chosen data to flashing storage units 82, so that the 3rd data are deposited in the USB device 2 via first USB port 31.
As shown in the above description, USB access device 8, except providing first and second USB port 31,32 to carry out the exchanges data for two USB devices, it also can carry out the exchanges data storage for USB device that is connected with first or second USB port 31,32 and flashing storage unit 82.
In addition, as shown in figure 11, be the 5th preferred embodiment of the present invention, itself and the second embodiment difference are that it comprises that also a USB changes IDE bridge-jointing unit 111, a hard disk 112 and one the 3rd USB port 113.Wherein the 3rd USB port 83 is a Type B subordinate terminal adapter (B-type client connector), and access controller 332 is to change IDE bridge-jointing unit 111 by USB to be connected with hard disk 112 and the 3rd USB port 113, make USB access device 110 connect a PC (PC) via the 3rd USB port 113, making becomes subordinate (client) device (identical with general USB device) that does not have an ownership, and make and first and second USB port 31,32 first and second USB devices 2 that connect, 4 can carry out exchanges data with hard disk 112 respectively by the control of access controller 332.Then identical as for its operating process with the 4th embodiment.
Moreover, another of the 5th embodiment implemented aspect, can also replace hard disk 112 with a CD/DVD imprinting unit, then first and second USB device 2,4 that is connected with first and second USB port 31,32 can be by the control of access controller 332, carry out exchanges data with this CD/DVD imprinting unit respectively, and first or second data of the first or the 2nd USB device 2,4 can be carved into a CD, perhaps with CD/DVD imprinting unit by in data conversion storage to the first that reads on the CD or the 2nd USB device 2,4.