CN104111908B - USB device and work system, operation mode conversion method, data communications method - Google Patents
USB device and work system, operation mode conversion method, data communications method Download PDFInfo
- Publication number
- CN104111908B CN104111908B CN201410320393.4A CN201410320393A CN104111908B CN 104111908 B CN104111908 B CN 104111908B CN 201410320393 A CN201410320393 A CN 201410320393A CN 104111908 B CN104111908 B CN 104111908B
- Authority
- CN
- China
- Prior art keywords
- interface
- usb device
- master control
- intelligent mobile
- mobile equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000004891 communication Methods 0.000 title claims abstract description 17
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 15
- 230000005611 electricity Effects 0.000 claims abstract description 10
- 238000001514 detection method Methods 0.000 claims description 55
- 239000012634 fragment Substances 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 12
- 241001269238 Data Species 0.000 claims description 8
- 230000008774 maternal effect Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000010295 mobile communication Methods 0.000 description 4
- 238000013500 data storage Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Landscapes
- Information Transfer Systems (AREA)
Abstract
The present invention relates to a kind of USB device and work system, operation mode conversion method, data communications method.The USB device includes slave master control, memory module be connected with the slave master control, main frame master control, the switching device being connected respectively with the main frame master control and slave master control, is connected with the switching device and is used for the first interface being connected with Intelligent mobile equipment foundation and the second interface being connected with host device or power-supply device foundation is connected and be used for the main frame master control;When the USB device is operated under host mode, the switching device sets up the path that the first interface is connected with the main frame master control;When the USB device is operated under slave mode, the switching device sets up the path that the first interface is connected with the slave master control.The conversion of USB device mode of operation can be realized automatically, Intelligent mobile equipment is charged when Intelligent mobile equipment does not have electricity, be not required to pull out USB device, simple operation.
Description
Technical field
The present invention relates to field of storage, more particularly to a kind of USB device and work system, operation mode conversion method,
Data communications method.
Background technology
With the popularization of intelligent mobile communication equipment, intelligent mobile communication equipment has turned into indispensable during people live
Product.Conventional intelligent mobile communication equipment, such as smart mobile phone, its data storage method typically using built-in memory or are deposited
The mode of card storage is carried out, because the built-in memory of smart mobile phone is usually fixed capacity, it is impossible to capacity extensions are carried out, when in internal memory
The file or data of storage are reached after a certain size, must just be deleted partial document or data, in order to avoid bring memory capacity not
Enough the problem of;Data storage is carried out by the way of storage card, although the expansion of storage volume can be carried out, but storage card can not
Hot plug is carried out with smart card, in-convenience in use.
Because the built-in memory of smart mobile phone can not meet data storage requirement, the appearance of USB device greatly facilitates intelligence
The mobile storage demand of energy mobile phone.And smart mobile phone be typically provided only with a Micro USB (Universal Serial Bus,
USB) interface, the Micro USB interfaces simultaneously as smart mobile phone data transmission interface and charging inlet, when
When being connected with USB device on the Micro USB interfaces on smart mobile phone, then smart mobile phone does not have during electricity, it is necessary to pull up USB device,
Plug charging wire to smart mobile phone it is charged after, then pull up charging wire, plug USB device, such smart mobile phone could be visited again
The content in USB device is asked, whole process is cumbersome, wastes time and energy very much.
The content of the invention
Based on this, it is necessary to for traditional intelligent mobile communication equipment is in the data read in USB device and itself fills
There is provided a kind of USB device of simple operation for the problem of switching over cumbersome between electricity.
In addition, there is a need to the work system for providing a kind of USB device of simple operation.
In addition, there is a need to the operation mode conversion method for providing a kind of USB device of simple operation.
In addition, there is a need to the data communications method for providing a kind of USB of simple operation.
A kind of USB device, including slave master control and the memory module that is connected with the slave master control, the USB device is also
The switching device that is connected respectively including main frame master control, with the main frame master control and slave master control, be connected with the switching device and
For set up the first interface that be connected with Intelligent mobile equipment and be connected with the main frame master control and be used for host device or
Power-supply device sets up the second interface of connection;The first interface includes the first power line terminal, the first correction data line terminals, the
One negative data line terminals, the first detection line terminals and the first ground wire terminal;When the USB device is operated under host mode,
The switching device sets up the path that the first interface is connected with the main frame master control, the first correction data line terminals and
One negative data line terminals are connected with the main frame master control, and the first detection line terminals sky connects;When the USB device be operated in from
Under machine pattern, the switching device sets up the path that the first interface is connected with the slave master control, first correction data
Line terminals and the first negative data line terminals are connected with the slave master control, the first detection line terminal ground.
In one of the embodiments, the switching device includes path switch and detection line switch, as the USB
When equipment is operated under host mode, the path switch sets up the first correction data line terminals and the first negative data line end
Sub to be connected with the main frame master control, the detection line switch causes the first detection line terminals sky to connect;When the USB device
When being operated under slave mode, the path switch set up the first correction data line terminals and the first negative data line terminals with
The connection of the slave master control, the detection line switch causes the first detection line terminal ground.
In one of the embodiments, the USB device includes power module, described power module one end and the main frame
Master control is connected, and power supply can be provided to the main frame master control, and can be connected to by the first interface on the first interface
Intelligent mobile equipment charging, the other end is connected with the second interface so that host device or power-supply device can give the electricity
Source module charges.
In one of the embodiments, the second interface includes second source line terminals, the second ground wire terminal, second
Correction data line terminals and the second negative data line terminals, the second interface are connected with the slave master control.
In one of the embodiments, the USB device also includes mode switch, described mode switch one end and described the
Two interfaces are connected, and the other end is connected with the slave master control;The mode switch is used to connect intelligent sliding in the first interface
When dynamic equipment and second interface connection host device, the communication connection of the USB device and host device is disconnected.
A kind of work system of USB device, including Intelligent mobile equipment, the work system of the USB device also include institute
The USB device stated, the Intelligent mobile equipment is set up with the USB device by the first interface and is connected, the intelligent sliding
The application program for controlling the USB device is installed in dynamic equipment, the Intelligent mobile equipment passes through the application program controlling
The USB device is operated the switching of pattern.
In one of the embodiments, the work system of the USB device also includes setting with the USB by second interface
The standby host device or power-supply device for setting up connection, the host device or power-supply device be directly connected with the USB device or
Person is attached by USB transmission line.
In one of the embodiments, the USB device also includes power module, described power module one end and the master
Owner's control connection, the other end is connected with the second interface;The host device or power-supply device or power module give the USB
Equipment and Intelligent mobile equipment provide power supply.
A kind of operation mode conversion method of USB device, comprises the following steps:
Above-mentioned USB device is provided, the USB device is connected by first interface with Intelligent mobile equipment;
When the slave master control of the USB device receives Intelligent mobile equipment that the Intelligent mobile equipment sends from main frame
Pattern switching to slave mode order when, control the switching device to set up the company of the main frame master control and the first interface
Connect, and the first detection line terminals sky of the first interface is connect;
When the main frame master control of the USB device receive the Intelligent mobile equipment that the Intelligent mobile equipment sends from
Slave mode is switched to after the order of host mode, controls the switching device to set up the slave master control and the first interface
Connection, and by the first detection line terminal ground of the first interface;
Or, it is set to main frame mould when the main frame master control of the USB device inquires the Intelligent mobile equipment by state
During formula, then the main frame master control control switching device sets up the connection of the slave master control and the first interface, and will
First detection line terminal ground of the first interface.
A kind of data communications method of USB device, comprises the following steps:
Intelligent mobile equipment and above-mentioned USB device are provided, the USB device passes through first interface and the intelligent mobile
Equipment is connected;
Intelligent mobile equipment caching is divided into segment space and is used as the data buffer storage space of the USB device;
Intelligent mobile equipment data to be read are divided into multiple bursts according to the size in the data buffer storage space
Data;
When the USB device is operated in slave mode, a fragment data in multiple fragment datas is passed through every time
One interface is uploaded in the data buffer storage space of Intelligent mobile equipment, after the completion of upload, and the slave master control receives the intelligence
The USB device that energy mobile device is sent is switched to after the order of host mode, is controlled the switching device to set up first and is connect
The path that mouth is connected with main frame master control, and the first detection line terminals sky of first interface is connect;
When the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, the main frame master control connects
The order that the USB device that the Intelligent mobile equipment sends is switched to slave mode is received, controls the switching device to build
Vertical first interface and the connection of slave master control, and by the first detection line terminal ground of first interface;
Or, when the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, the main frame
When master control inquires the Intelligent mobile equipment state is set into host mode, the switching device is controlled to set up first interface
With the connection of slave master control, and by the first detection line terminal ground of first interface.
Above-mentioned USB device and its work system, operation mode conversion method, data communications method, if USB device is operated in
Host mode, the path that first interface is connected with main frame master control is set up by switching device, passes through the external power supply of second interface
Power supply is provided to the Intelligent mobile equipment on first interface, if USB device is operated in slave mode, switching device is set up first and connect
The path that mouth is connected with slave master control, Intelligent mobile equipment can write data in memory module or be read from memory module number
According to can realize the conversion of USB device mode of operation automatically when Intelligent mobile equipment does not have electricity, Intelligent mobile equipment filled
Electricity, is not required to pull out USB device, simple operation.In addition, when Intelligent mobile equipment is operated in host mode, USB device will intelligence
Mobile device data buffer storage to be read is into Intelligent mobile equipment, so that Intelligent mobile equipment can also be read in charging
The data stored into USB device, and factor data interface transmission speed is very fast so that data buffer storage can be quickly completed.
Brief description of the drawings
Fig. 1 is the circuit structure block diagram of USB device in one embodiment;
Fig. 2 is the circuit structure block diagram of USB device in another embodiment;
Fig. 3 is the part circuit structure block diagram of USB device in one embodiment;
Fig. 4 is the circuit structure block diagram of USB device in another embodiment;
Fig. 5 is the circuit structure block diagram of USB device in another embodiment;
Fig. 6 is the circuit structure block diagram of the work system of USB device in one embodiment;
Fig. 7 is the flow chart of the operation mode conversion method of USB device in one embodiment;
Fig. 8 is the flow chart of the data communications method of USB device in one embodiment.
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 is the structural representation of USB device in one embodiment.As shown in figure 1, the USB device, including slave master control
10th, memory module 20, main frame master control 30, switching device 40, first interface 50 and second interface 60.
Slave master control 10 is respectively connected with memory module 20, main frame master control 30 and switching device 40 respectively.
Memory module 20 can be flash memory or other memory devices, such as ferroelectric memory, phase transition storage, EEPROM
Deng, but not limited to this.
Main frame master control 30 is connected with switching device 40.
First interface 50 is connected with switching device 40.First interface 50, which is used to set up with Intelligent mobile equipment, to be connected.First
Interface 50 can for USB public access mouth, Mini USB public access mouth, Micro USB public access mouth, USB maternal interfaces, Mini USB maternal interfaces,
Any one in Micro USB maternal interfaces.Intelligent mobile equipment may include smart mobile phone, tablet personal computer, personal digital assistant etc..
It is preferred that, first interface 50 is Micro USB public access mouthful.
First interface 50 includes the first power line terminal (VBUS), the first correction data line terminals (D+), the first negative data line
Terminal (D-), the first detection line terminals (ID) and the first ground wire terminal (GND).Second interface 60 is connected with main frame master control 30.
Second interface 60, which is used to set up with host device or power-supply device, to be connected, and can also be connected with OTG (On-The-Go) equipment.When
When second interface 60 is connected with OTG equipment, the OTG equipment provides power supply as host device to USB device.Second interface 60
Can be USB public access mouth, Mini USB public access mouth, Micro USB public access mouth, USB maternal interfaces, Mini USB maternal interfaces, Micro
Any one in USB maternal interfaces.Wherein, host device can be computer etc..It is preferred that, second interface 60 is that Micro mothers USB connect
Mouthful.
When the USB device is operated under host mode, switching device 40 is set up first interface 50 and is connected with main frame master control 30
Path, the first correction data line terminals and the first negative data line terminals are connected with the main frame master control 30, the first detection line end
Sub- sky connects.By the external power supply of the second interface 60 power supply is provided for the Intelligent mobile equipment being connected on first interface 50.
When the USB device is operated under slave mode, switching device 40 is set up first interface 50 and is connected with slave master control 10
Path, the first correction data line terminals and the first negative data line terminals are connected with slave master control 10, and the first detection line terminals connect
Ground.The Intelligent mobile equipment on first interface 50 is connected to for the power supply needed for the USB device offer work, and number can be write
Data are read according into the memory module 20 or from the memory module.
Above-mentioned USB device, if USB device is operated in host mode, first interface and main frame master are set up by switching device
The path of connection is controlled, power supply is provided to the Intelligent mobile equipment on first interface by the external power supply of second interface, if USB is set
Standby to be operated in slave mode, switching device sets up the path that first interface is connected with slave master control, and Intelligent mobile equipment can write
Data read data into memory module or from memory module, can realize USB device automatically when Intelligent mobile equipment does not have electricity
The conversion of mode of operation, charges to Intelligent mobile equipment, is not required to pull out USB device, simple operation.
In one embodiment, second interface 60 includes second source line terminals and the second ground wire terminal.Further,
Second interface 60 may also include the second correction data line terminals and the second negative data line terminals.In addition, second interface 60 may also include
Second detection line terminals, the second detection line terminal ground, so as to show that the OTG equipment connect in second interface 60 can only be as master
Machine equipment.
As shown in Fig. 2 second interface 60 is also connected with slave master control 10.Second interface 60 being capable of external host device or electricity
Source device to USB device and/or give first interface 50 connection Intelligent mobile equipment power.
Second interface 60 is connected with slave master control, and the second interface includes second source line terminals and the second grounding terminal
Son.
Further, in one embodiment, as shown in figure 3, switching device 40 includes path switch 401 and detection line
Switch 402.The path switch 401 is a multiplexer, can be according to the order of Intelligent mobile equipment and/or USB device
Order automatically switches to the path or automatically switch to first interface 50 and slave that first interface 50 is connected with main frame master control 30
The path that master control 10 is connected.Detection line switch 402 can be according to the order and/or the order of USB device of Intelligent mobile equipment
Automatically switch and the first detection line terminal ground or sky are connect.Detection line switch 402 can be an analog switch, by controlling mould
The on or off for intending switch causes the first detection line terminal ground or sky to connect.The analog switch can be mode selector switch core
Any one in piece, diode, triode, FET.In order that the mode of operation switching of Intelligent mobile equipment is more accurate
Really, it is preferred that analog switch selects mode selector switch chip.In Fig. 3, first interface 50 is Micro USB public access mouthful, including
First power line terminal (VBUS), the first correction data line terminals (D+), the first negative data line terminals (D-), the first detection line end
Sub (ID) and the first ground wire terminal (GND).
Specifically, when USB device is operated under host mode, path switch 401 sets up the first correction data line terminals
It is connected with the first negative data line terminals with main frame master control 30, detection line switch 402 causes the first detection line terminals sky to connect;When
When USB device is operated under slave mode, path switch 401 sets up the first correction data line terminals and the first negative data line end
Son and the connection of slave master control 10, detection line switch 402 cause the first detection line terminal ground.
In one embodiment, as shown in figure 4, USB device also includes power module 70, the one end of power module 70 and main frame
Master control 30 is connected, and power supply can be provided to main frame master control 30, and can give the intelligence being connected on first interface 50 by first interface 50
Energy charging of mobile devices, the other end is connected with second interface 60 so that host device or power-supply device can fill to power module 70
Electricity.
In one embodiment, as shown in figure 5, USB device also includes mode switch 80, one end of mode switch 80 and second
Interface 60 is connected, and the other end is connected with slave master control 10;Mode switch 80 is used to connect Intelligent mobile equipment in first interface 50
And during the connection host device of second interface 60, disconnect the communication connection of USB device and host device, that is, disconnect in second interface 60
Second correction data line terminals and the second negative data line terminals and the connection of slave master control 10.
Mode switch 80 is hardware module or software module, and the hardware module is diode, triode, FET or mould
Intend any one in switch chip.Software module refers to software program of the burning in slave master control 10.Using mode switch 80
The automatic communication connection for disconnecting USB device and host device of control, it is convenient to carry out pattern switching.
Fig. 6 is the circuit structure block diagram of the work system of USB device in one embodiment.As shown in fig. 6, the USB device
Work system, including USB device 1 and Intelligent mobile equipment 2, Intelligent mobile equipment 2 passes through first interface 50 and USB device 1
Set up connection.
USB device 1 is above-mentioned Fig. 1 to the USB device described in Fig. 5.
The application program for controlling the USB device 1 is installed, the Intelligent mobile equipment should by this on Intelligent mobile equipment 2
The switching of pattern is operated with programme-control USB device 1.Intelligent mobile equipment 2 can be smart mobile phone, tablet personal computer, individual
Any one in digital assistants etc..It is preferred that, the Intelligent mobile equipment 2 is smart mobile phone.
The internal memory of USB device 1 contains the installation kit of the application program, when USB device 1 is first connected to Intelligent mobile equipment 2
When, the application program can be installed in Intelligent mobile equipment 2 automatically or by user's selection.In addition, the peace of the application program
Dress bag can download installation by user on corresponding website, be not limited thereto.
Further, first interface 50 can be directly connected to Intelligent mobile equipment 2 or is connected by USB transmission line.If
When the interface of first interface 50 and Intelligent mobile equipment 2 is mismatched, first interface 50 passes through USB transmission with Intelligent mobile equipment 2
Line is attached, and such as first interface 50 is that the interface on USB maternal interfaces, Intelligent mobile equipment 2 is Micro USB maternal interfaces,
Then USB device 1 is USB public access mouthful by one end with Intelligent mobile equipment 2, and the other end is the USB transmission of Micro USB public access mouthful
Line is attached.If the interface of the first interface 50 and Intelligent mobile equipment 2 of USB device 1 is mutually matched, USB device 1 and intelligence
Energy mobile device 2 can be directly connected to, and can also be connected by USB transmission line, for example, the external interface of Intelligent mobile equipment 2
For Micro USB maternal interfaces, first interface 50 is Micro USB public access mouthful, then USB device 1 and Intelligent mobile equipment 2 directly connect
Connect or be Micro USB maternal interfaces by one end, the other end is that the USB transmission line of Micro USB public access mouthful is attached.
When USB device 1 does not include the power depletion of power module 70 or power module 70, the work of the USB device
System also includes setting up the host device or power-supply device 3 that are connected with USB device 1 by second interface 60.The host device
Or power-supply device 3 can directly be connected with USB device 1 or is attached by USB transmission line 4.It is preferred that, host device or
Power-supply device 3 is attached with USB device 1 by USB transmission line 4.The power-supply device can be portable power source equipment.
When USB device 1 includes power module 70, and USB device is connected with host device or power supply by second interface 60
During equipment 3, the power supply of prioritizing selection host device or power-supply device is supplied to USB device 1 and Intelligent mobile equipment 2.In addition,
The power supply that host device or power-supply device 3 may be selected first charges to power module 70, then by power module 70 to USB device
1 other modules and Intelligent mobile equipment 2 are powered.
Present invention also offers a kind of operation mode conversion method of USB device.As shown in fig. 7, the work of the USB device
Mode conversion method, comprises the following steps:
Step 702 there is provided USB device, the USB device include slave master control, main frame master control, memory module, switching device,
First interface and second interface, the USB device are connected by first interface with Intelligent mobile equipment.
Specifically, the USB device is above-mentioned Fig. 1 to the USB device described in Fig. 5.
Step 704, when the slave master control of the USB device receive Intelligent mobile equipment that the Intelligent mobile equipment sends from
When host mode is switched to the order of slave mode, the switching device is controlled to set up the company of the main frame master control and the first interface
Connect, and the first detection line terminals sky of the first interface is connect.
Specifically, when Intelligent mobile equipment needs to be switched to slave mode from host mode, Intelligent mobile equipment is sent
Order to USB device, the slave master control of USB device receives the host mode that Intelligent mobile equipment sends and is switched to slave mode
Order after, control switching device set up main frame master control and the connection of first interface, while making first in first interface to detect
Line terminals sky connects.
Step 706, it is switched to when the main frame master control of the USB device receives the slave mode that the Intelligent mobile equipment sends
After the order of host mode, control the switching device to set up the connection of the slave master control and the first interface, and this first is connect
First detection line terminal ground of mouth.
Specifically, when Intelligent mobile equipment needs to be switched to host mode by slave mode, Intelligent mobile equipment is sent
Order to USB device, the main frame master control of USB device receives the host mode that Intelligent mobile equipment sends and is switched to slave mode
Order after, control switching device set up main frame master control and the connection of first interface, while making first in first interface to detect
Line terminals are grounded.
Or, it is set to main frame mould when the main frame master control of the USB device uninterruptedly inquires about the Intelligent mobile equipment by state
Formula, if so, then the main frame master control controls the switching device to set up the connection of the slave master control and the first interface, and by this first
First detection line terminal ground of interface.
Specifically, when Intelligent mobile equipment needs to be switched to host mode by slave mode, Intelligent mobile equipment is by shape
State is changed to the state for needing to be changed to host mode by slave mode, and main frame master control is continual to inquire about whether the state is set
For host mode, when inquiring the state, then main frame master control control switching device sets up the company of slave master control and first interface
Connect, while making the first detection line terminal ground in first interface.
Further, the operation mode conversion method of the USB device also includes:By the Intelligent mobile equipment detect this
Whether the first detection line terminals in one interface are grounded, if so, then the Intelligent mobile equipment is in host mode, the USB device
The power supply given in slave mode, the Intelligent mobile equipment needed for the USB device offer work;Otherwise, the Intelligent mobile equipment
In slave mode, the USB device is in host mode, and the USB device is by built-in power module or passes through the second interface
The host device or power-supply device of connection provide power supply to the Intelligent mobile equipment.
In addition, USB device need from host mode switch to slave mode or host mode be switched to by slave mode when,
Need to open the application program realization installed on Intelligent mobile equipment, if when USB device connects Intelligent mobile equipment, not opening
Open the application program to be controlled, then can not carry out master slave mode switching, can only operate in one of which pattern.
Present invention also offers a kind of data communications method of USB device.As shown in figure 8, the data communication of the USB device
Method, comprises the following steps:
Step 802 is there is provided Intelligent mobile equipment and USB device, and the USB device includes slave master control, main frame master control, storage
Module, switching device, first interface and second interface, the USB device are connected by first interface with the Intelligent mobile equipment.
Step 804, Intelligent mobile equipment caching is divided into segment space and is used as the data buffer storage space of the USB device.
Specifically, the size in data buffer storage space is set as needed.
Step 806, Intelligent mobile equipment data to be read are divided into multiple according to the size in the data buffer storage space
Fragment data.
Step 808, when the USB device is operated in slave mode, every time by a fragment data in multiple fragment datas
In the data buffer storage space that Intelligent mobile equipment is uploaded to by first interface, after the completion of upload, the slave master control receives this
The USB device that Intelligent mobile equipment is sent is switched to after the order of host mode, controls the switching device to set up first interface
The path being connected with main frame master control, and the first detection line terminals sky of first interface is connect.
Step 810, when the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, main frame master
Control receives the order that the USB device that the Intelligent mobile equipment sends is switched to slave mode, controls the switching device to set up
The connection of first interface and slave master control, and by the first detection line terminal ground of first interface.
Or, when the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, the main frame master control
When inquiring the Intelligent mobile equipment state being set into host mode, control the switching device set up first interface with from owner
The connection of control, and by the first detection line terminal ground of first interface.
Repetition uploads to fragment data (fragment data is the fragment data different from the fragment data that last time is passed)
Until the data that the Intelligent mobile equipment to be read all have read rear termination in the data buffer storage space of the Intelligent mobile equipment.
In addition, when user exits application program, the flow of data communications method is also terminated, and Intelligent mobile equipment can only operate in main frame
Or under a kind of mode of operation of slave.
Specifically, the data continued are divided into multiple fragment datas.For example, 200MB (megabit) data that continue are divided into
10 20MB fragment datas, upload a fragment data into the data buffer storage space of Intelligent mobile equipment, upload and complete every time
Afterwards, control switching device sets up the first interface of the USB device and the access path of main frame master control, and causes in first interface
First detection line terminals sky connects.Deng Intelligent mobile equipment caching in 20M fragment datas read after the completion of, again control switching
Device sets up the connection of first interface and slave master control, and causes the first detection line terminal ground in first interface, then uploads
20M fragment datas repeat above procedure until this 200M data is all uploaded into the data buffer storage space of Intelligent mobile equipment
Complete.
The data communications method of above-mentioned USB device, when Intelligent mobile equipment is operated in host mode, USB device is by intelligence
Energy mobile device data buffer storage to be read is into Intelligent mobile equipment, so that Intelligent mobile equipment can also be read in charging
The data stored in USB device are got, and factor data interface transmission speed is very fast so that data buffer storage can be quickly completed,
So that during Intelligent mobile equipment charging, having little influence on use of the user to USB device, the experience of user can be very good.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, the program being somebody's turn to do can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium being somebody's turn to do can for magnetic disc,
CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
Embodiment described above only expresses the several embodiments of the present invention, and it describes more specific and detailed, but simultaneously
Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (9)
1. a kind of USB device, including slave master control and the memory module that is connected with the slave master control, it is characterised in that it is described
USB device is also filled including main frame master control, the switching device being connected respectively with the main frame master control and slave master control, with the switching
Put connection and be connected and be used for and master for the first interface being connected with Intelligent mobile equipment foundation and with the main frame master control
Machine equipment or power-supply device set up the second interface of connection;The first interface includes the first power line terminal, the first correction data
Line terminals, the first negative data line terminals, the first detection line terminals and the first ground wire terminal;When the USB device is operated in master
Under machine pattern, the switching device sets up the path that the first interface is connected with the main frame master control, first correction data
Line terminals and the first negative data line terminals are connected with the main frame master control, and the first detection line terminals sky connects;When the USB is set
Standby to be operated under slave mode, the switching device sets up the path that the first interface is connected with the slave master control, described
First correction data line terminals and the first negative data line terminals are connected with the slave master control, the first detection line terminal ground;
When the main frame master control of the USB device receives the Intelligent mobile equipment that the Intelligent mobile equipment sends from slave mode
It is switched to after the order of host mode, controls the switching device to set up the connection of the slave master control and the first interface,
And by the first detection line terminal ground of the first interface;Or, when the main frame master control of the USB device inquires the intelligence
When state is set to host mode by energy mobile device, then the main frame master control controls the switching device foundation described from owner
Control and the connection of the first interface, and by the first detection line terminal ground of the first interface;
The switching device includes path switch and detection line switch, when the USB device is operated under host mode,
The path switch sets up the first correction data line terminals and the first negative data line terminals are connected with the main frame master control, institute
Detection line switch is stated so that the first detection line terminals sky connects;It is described when the USB device is operated under slave mode
Path switch sets up the first correction data line terminals and the first negative data line terminals and the connection of the slave master control, described
Detection line switch causes the first detection line terminal ground.
2. USB device according to claim 1, it is characterised in that the USB device includes power module, the power supply
Module one end is connected with the main frame master control, and power supply can be provided to the main frame master control, and can be by the first interface to company
Be connected on the Intelligent mobile equipment charging on the first interface, the other end is connected with the second interface so that host device or
Power-supply device can give power module charging.
3. USB device according to claim 1, it is characterised in that the second interface includes second source line terminals, the
Two ground wire terminals, the second correction data line terminals and the second negative data line terminals, the second interface connect with the slave master control
Connect.
4. USB device according to claim 3, it is characterised in that the USB device also includes mode switch, the mould
Formula switchs one end and is connected with the second interface, and the other end is connected with the slave master control;The mode switch is used for described
When first interface connects Intelligent mobile equipment and second interface connection host device, disconnect the USB device and set with main frame
Standby communication connection.
5. a kind of work system of USB device, including Intelligent mobile equipment, it is characterised in that the work system of the USB device
Also include the USB device as any one of claim 1 or 3 or 4, the Intelligent mobile equipment passes through the first interface
Set up and be connected with the USB device, the application program for controlling the USB device is installed on the Intelligent mobile equipment, it is described
Intelligent mobile equipment is operated the switching of pattern by USB device described in the application program controlling.
6. the work system of USB device according to claim 5, it is characterised in that the work system of the USB device is also
Including setting up the host device or power-supply device that are connected, the host device or power supply with the USB device by second interface
Equipment is directly connected with the USB device or is attached by USB transmission line.
7. the work system of the USB device according to claim 5 or 6, it is characterised in that the USB device also includes electricity
Source module, described power module one end is connected with the main frame master control, and the other end is connected with the second interface;The main frame is set
Standby or power-supply device or power module provide power supply to the USB device and Intelligent mobile equipment.
8. a kind of operation mode conversion method of USB device, comprises the following steps:
The USB device as any one of Claims 1-4 is provided, the USB device passes through first interface and intelligent mobile
Equipment is connected;
When the slave master control of the USB device receives Intelligent mobile equipment that the Intelligent mobile equipment sends from host mode
When being switched to the order of slave mode, the switching device is controlled to set up the connection of the main frame master control and the first interface,
And connect the first detection line terminals sky of the first interface;
When the main frame master control of the USB device receives the Intelligent mobile equipment that the Intelligent mobile equipment sends from slave
Pattern switching controls the switching device to set up the company of the slave master control and the first interface to after the order of host mode
Connect, and by the first detection line terminal ground of the first interface;
Or, when the main frame master control of the USB device inquires the Intelligent mobile equipment, and state is set into host mode,
Then the main frame master control controls the switching device to set up the connection of the slave master control and the first interface, and by described the
First detection line terminal ground of one interface.
9. a kind of data communications method of USB device, comprises the following steps:
Intelligent mobile equipment and the USB device as any one of Claims 1-4 are provided, the USB device passes through first
Interface is connected with the Intelligent mobile equipment;
Intelligent mobile equipment caching is divided into segment space and is used as the data buffer storage space of the USB device;
Intelligent mobile equipment data to be read are divided into multiple fragment datas according to the size in the data buffer storage space;
When the USB device is operated in slave mode, a fragment data in multiple fragment datas is connect by first every time
Mouth is uploaded in the data buffer storage space of Intelligent mobile equipment, and after the completion of upload, the slave master control receives the intelligent sliding
The USB device that dynamic equipment is sent is switched to after the order of host mode, control the switching device set up first interface with
The path of main frame master control connection, and the first detection line terminals sky of first interface is connect;
When the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, the main frame master control is received
The USB device that the Intelligent mobile equipment is sent is switched to the order of slave mode, controls the switching device to set up the
The connection of one interface and slave master control, and by the first detection line terminal ground of first interface;
Or, when the digital independent that the Intelligent mobile equipment is detected in data buffer storage space is completed, the main frame master control
When inquiring the Intelligent mobile equipment state being set into host mode, control the switching device set up first interface with from
The connection of owner's control, and by the first detection line terminal ground of first interface.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410320393.4A CN104111908B (en) | 2014-07-04 | 2014-07-04 | USB device and work system, operation mode conversion method, data communications method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410320393.4A CN104111908B (en) | 2014-07-04 | 2014-07-04 | USB device and work system, operation mode conversion method, data communications method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104111908A CN104111908A (en) | 2014-10-22 |
| CN104111908B true CN104111908B (en) | 2017-08-01 |
Family
ID=51708705
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410320393.4A Active CN104111908B (en) | 2014-07-04 | 2014-07-04 | USB device and work system, operation mode conversion method, data communications method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104111908B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105912084A (en) * | 2016-03-31 | 2016-08-31 | 联想(北京)有限公司 | Information processing method and electronic equipment |
| CN109086236A (en) * | 2017-06-14 | 2018-12-25 | 国基电子(上海)有限公司 | Power source charges path switching circuit and its electronic equipment |
| CN107566630A (en) * | 2017-08-25 | 2018-01-09 | 深圳市汉普电子技术开发有限公司 | Data communications method, USB main equipment and storage medium under charged state |
| CN107766274B (en) * | 2017-09-28 | 2021-02-02 | 河源市美晨联合智能硬件电子研究院 | Mobile terminal, method for automatically selecting USB connection mode of mobile terminal and storage device |
| CN111413906A (en) * | 2020-04-10 | 2020-07-14 | 广州保得威尔电子科技股份有限公司 | A multi-channel interface card |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103324445A (en) * | 2013-05-27 | 2013-09-25 | 深圳市江波龙电子有限公司 | Universal serial bus (USB) storage device running method and system and USB storage device |
| CN103902490A (en) * | 2014-03-11 | 2014-07-02 | 深圳市江波龙电子有限公司 | U disk, and work system, work mode converting method and data communication method of U disk |
| CN204044810U (en) * | 2014-07-04 | 2014-12-24 | 深圳市江波龙电子有限公司 | USB device and work system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070143507A1 (en) * | 2005-12-16 | 2007-06-21 | Tennrich International Corp. | Storage device with mobile source module |
-
2014
- 2014-07-04 CN CN201410320393.4A patent/CN104111908B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103324445A (en) * | 2013-05-27 | 2013-09-25 | 深圳市江波龙电子有限公司 | Universal serial bus (USB) storage device running method and system and USB storage device |
| CN103902490A (en) * | 2014-03-11 | 2014-07-02 | 深圳市江波龙电子有限公司 | U disk, and work system, work mode converting method and data communication method of U disk |
| CN204044810U (en) * | 2014-07-04 | 2014-12-24 | 深圳市江波龙电子有限公司 | USB device and work system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104111908A (en) | 2014-10-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104111908B (en) | USB device and work system, operation mode conversion method, data communications method | |
| CN104052138B (en) | The control method of temperature when a kind of intelligent mobile terminal and its charging | |
| JP6488369B2 (en) | USB Type C-MHL Charging out of battery with M1 M1 | |
| CN106301342B (en) | Interface circuit and terminal equipment | |
| CN103095855B (en) | I2C communication interface unit | |
| CN105576727B (en) | Method, device and system for quick charging | |
| US20190052105A1 (en) | Method for automatically identifying apple and android devices | |
| CN103902490B (en) | USB flash disk and its work system, mode switching method, data communications method | |
| CN114498865A (en) | Charging circuit, charging control method and electronic device | |
| CN204044810U (en) | USB device and work system | |
| CN116569441A (en) | Dual battery management circuits and electronics | |
| CN113162131A (en) | Reverse charging system, reverse charging method and terminal equipment | |
| US10282335B2 (en) | Multifunctional portable data card and data transmission method | |
| CN101150326B (en) | A communication terminal connection device with charging connection and data communication and storage function | |
| CN201000623Y (en) | Dual-interface flash memory card | |
| CN107329520B (en) | USB interface connection method, device and system of mobile terminal | |
| CN203445629U (en) | Multifunctional back clip system of intelligent mobile terminal | |
| CN210608577U (en) | Apple data line circuit supporting PD quick charging | |
| CN216979751U (en) | Multifunctional docking station | |
| CN101667415B (en) | Display with mobile phone charging function | |
| CN109378891B (en) | Charging and discharging method, mobile power supply and computer storage medium | |
| CN103943148A (en) | Flash memory and reset signal output method thereof | |
| CN107484055B (en) | TWS earphone with charging reset function | |
| CN106300466A (en) | Method, device and the terminal of a kind of OTG quick charge | |
| WO2024016694A1 (en) | Dual-battery management circuit and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder |
Address after: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee after: Shenzhen jiangbolong electronic Limited by Share Ltd Address before: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee before: Shenzhen jiangbolong Electronic Co., Ltd. |
|
| CP01 | Change in the name or title of a patent holder |