CN106897242B - USB composite equipment and working method thereof - Google Patents

USB composite equipment and working method thereof Download PDF

Info

Publication number
CN106897242B
CN106897242B CN201710032120.3A CN201710032120A CN106897242B CN 106897242 B CN106897242 B CN 106897242B CN 201710032120 A CN201710032120 A CN 201710032120A CN 106897242 B CN106897242 B CN 106897242B
Authority
CN
China
Prior art keywords
usb
host
card
equipment
video
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
Application number
CN201710032120.3A
Other languages
Chinese (zh)
Other versions
CN106897242A (en
Inventor
马庆鹏
容伟权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BUILDWIN INTERNATIONAL (ZHUHAI) LTD.
Original Assignee
Buildwin International Zhuhai Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Buildwin International Zhuhai Ltd filed Critical Buildwin International Zhuhai Ltd
Priority to CN201710032120.3A priority Critical patent/CN106897242B/en
Publication of CN106897242A publication Critical patent/CN106897242A/en
Application granted granted Critical
Publication of CN106897242B publication Critical patent/CN106897242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0013Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers
    • G06K7/0021Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers for reading/sensing record carriers having surface contacts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention belongs to the field of electronic circuit design and provides a USB composite device and a working method thereof. The USB composite equipment and the working method thereof at least integrate the storage function and the video function, can record the content photographed or recorded by the camera on the TF/SD card, can synchronize the content photographed or recorded by the camera to the host after being connected with the host, and further realize the read-write operation of the host on the content in the TF/SD card. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economical and environment-friendly, and is particularly suitable for mini DV, a vehicle data recorder, aerial photography equipment and the like.

Description

USB composite equipment and working method thereof
Technical Field
The invention belongs to the field of electronic circuit design, and particularly relates to a USB composite device and a working method thereof.
Background
In the prior art, for some video input devices, such as mini DV, automobile data recorder, aerial photography device, etc., the collected images are stored in the TF/SD card after video compression. For the scheme without the display screen, if pictures or videos need to be browsed, the contents in the TF/SD card need to be copied to a computer for viewing. However, the computer provided by the prior art generally has no TF/SD card reader interface, so that a USB card reader needs to be purchased additionally, and the application is inconvenient, uneconomical and environment-friendly.
Disclosure of Invention
The embodiment of the invention aims to provide a USB composite device, and aims to solve the problems that in the prior art, when contents of TF/SD cards of certain video input devices are read, a USB card reader needs to be purchased additionally, and the application is inconvenient, uneconomic and environment-friendly.
The embodiment of the present invention is implemented as follows, a USB composite device, where the USB composite device includes a camera, a USB controller, and a USB interface connected to the USB controller, and the USB composite device further includes:
the external TF/SD card and the SD card read-write module for reading and writing the contents of the inserted TF/SD card;
the CSI module is connected with the camera and used for collecting data of an image sensor in the camera;
the video compression circuit is connected with the CSI module and used for compressing the data acquired by the CSI module;
the video compression circuit, the SD card read-write module and the USB controller are connected, the SD card read-write module is controlled to write the data processed by the video compression circuit into the TF/SD card, and when the USB interface is connected with a host and used as a storage device, the SD card read-write module is matched with the USB controller to realize the read-write operation of the TF/SD card, and when the USB interface is connected with the host and used as a video device, the USB interface is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to a main controller on the host.
Another object of an embodiment of the present invention is to provide a method for operating a USB composite device as described above, where the method includes the following steps:
after the USB composite equipment is connected with a host, enumerating the USB composite equipment into composite equipment of storage equipment and video equipment;
if the USB composite equipment is used as storage equipment, the main controller is matched with the USB controller to realize the read-write operation of the TF/SD card;
if the USB composite equipment is used as video equipment, the main controller is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to the host.
Another object of an embodiment of the present invention is to provide a method for operating a USB composite device, where the method includes the following steps:
after the USB composite equipment is connected with a host, the USB composite equipment is enumerated as composite equipment of storage equipment, video equipment and audio equipment;
if the USB composite equipment is used as storage equipment, the main controller is matched with the USB controller to realize the read-write operation of the TF/SD card;
if the USB composite equipment is used as video equipment, the main controller is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to the host;
if the USB composite device is used as an audio device, the main controller is matched with the USB controller to synchronously transmit the data processed by the audio compression circuit to the host.
The USB compound device and the working method thereof provided by the embodiment of the invention at least integrate the storage function and the video function, can record the content photographed or recorded by the camera on the TF/SD card, can synchronize the content photographed or recorded by the camera to the host after being connected with the host, and further realize the read-write operation of the host on the content in the TF/SD card. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economical and environment-friendly, and is particularly suitable for mini DV, a vehicle data recorder, aerial photography equipment and the like.
Drawings
Fig. 1 is a structural diagram of a USB composite device according to an embodiment of the present invention;
FIG. 2 is a diagram of a descriptor structure of a USB compound device according to an embodiment of the present invention;
fig. 3 is a structural diagram of a USB composite device according to a second embodiment of the present invention;
fig. 4 is a descriptor structure diagram of a USB composite device according to a second embodiment of the present invention;
fig. 5 is a flowchart of a working method of a USB composite device according to a third embodiment of the present invention;
fig. 6 is a flowchart of a working method of a USB composite device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Aiming at the problems in the prior art, the invention provides a USB compound device. The USB composite device at least integrates a storage function and a video function, and will be described in detail with reference to the following embodiments:
example one
An embodiment of the present invention provides a USB composite device, as shown in fig. 1, including: a camera 1; a USB controller 5; a USB interface 6 connected with the USB controller 5; an SD card read-write module 7 of the external TF/SD card, wherein the SD card read-write module 7 reads and writes the content of the inserted TF/SD card; the CSI module 2 is connected with the camera 1, and the CSI module 2 collects data of an image sensor in the camera 1; the video compression circuit 3 is connected with the CSI module 2, and the video compression circuit 3 compresses the data collected by the CSI module 2, for example, the data can be compressed into an image in a JPEG format; the main controller 4 is connected with the video compression circuit 3, the SD card read-write module 7 and the USB controller 5, the main controller 4 controls the SD card read-write module 7 to write the data processed by the video compression circuit 3 into the TF/SD card, when the USB interface 6 is connected with a host (such as a personal computer and the like) and is used as a storage device, the main controller 4 is matched with the USB controller 5 to realize the read-write operation of the TF/SD card, when the USB interface 6 is connected with the host and is used as a video device, the main controller 4 is matched with the USB controller 5 to synchronously transmit the data processed by the video compression circuit 3 to the host.
In the first embodiment, after the USB composite device is connected to the host, an enumeration process needs to be performed first, so that the host recognizes that the inserted device is a composite device of a storage device and a video device, as shown in fig. 2, a descriptor structure of the USB composite device in the first embodiment is shown. For a USB composite device, multiple configurations of one device may be provided, or multiple interfaces may be configured, in an embodiment, one mode of configuring multiple interfaces is adopted, where a descriptor structure includes a device descriptor, a configuration descriptor is defined under the device descriptor, a mass device class interface descriptor (i.e., MassStorage interface descriptor), a USB Video class control interface descriptor (i.e., Video control interface descriptor), a Video stream interface descriptor 1 (i.e., Video streaming interface descriptor 1), a Video stream interface descriptor 2 (i.e., Video streaming interface descriptor 2) are defined under one configuration descriptor, a Bulk input Endpoint descriptor (i.e., Bulk-in Endpoint) and a Bulk output Endpoint descriptor (i.e., Bulk-out Endpoint) are defined under one mass device class interface descriptor, an Interrupt Endpoint descriptor (i.e., Interrupt Endpoint) is defined under the USB Video class control interface descriptor, a Video isochronous transfer Endpoint descriptor (i.e., an Isoch Video Endpoint) is defined under the Video stream interface descriptor 2.
Specifically, the enumeration process of the host to the USB composite device is as follows: the host acquires the first eight bytes of data of the device descriptor from the USB compound device; the host computer allocates a new address to the USB compound device; the host acquires a complete device descriptor from the USB compound device; the host acquires a complete configuration descriptor from the USB compound device; the host acquires a configuration set according to the total length of the configuration set in the configuration descriptor, wherein the configuration set comprises the configuration descriptor, each interface descriptor and each endpoint descriptor; the host sends a configuration packet to the USB composite equipment to configure the USB composite equipment and enable each interface of the USB composite equipment, wherein the interface refers to a high-capacity equipment interface, a USB video control interface and a video stream interface; the host mounts the driver according to the information of the interface. After the enumeration is successful, the USB composite equipment can execute corresponding operation according to a command issued by the host.
If the USB composite device is used as a storage device, the host issues a command packet header (CBW) to the USB composite device, where the CBW header indicates an address and a data amount of data to be read/written from/to the TF/SD card. After receiving the CBW command, the USB controller 5 extracts an SCSI command, and controls the SD card read-write module 7 to complete the read/write operation of the TF/SD card through the main controller 4 according to the SCSI command; after the read/write operation is completed, the USB controller 5 returns a Command Status Wrapper (CSW) to the host. The host then decides whether to continue sending the next CBW or data based on the CSW.
If the USB composite device is used as a video device, the main controller 4 starts an internal Direct Memory Access (DMA) controller, synchronizes data processed by the video compression circuit 3 to the USB FIFO of the USB controller 5, and the USB controller 5 transmits the data synchronized to the USB FIFO to the host computer, so that the host computer can use the video stream.
The USB compound device provided by the embodiment of the invention integrates the storage function and the video function, can record the content of photographing or recording by the camera 1 in the TF/SD card, and can synchronize the content of photographing or recording by the camera 1 to the host after being connected with the host, and further realize the read-write operation of the host on the content in the TF/SD card. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economic and environment-friendly, and is particularly suitable for application in miniDV, automobile data recorders, aerial photography equipment and the like.
Example two
The second embodiment of the present invention provides a USB composite device, as shown in fig. 3. Different from the first embodiment, the second embodiment integrates the storage function and the video function, and further adds the audio function.
Specifically, in the second embodiment, the USB composite device further includes, on the basis of the first embodiment: an analog/digital conversion circuit 8 connected to the microphone, the analog/digital conversion circuit 8 converting an analog audio signal received by the microphone into a digital audio signal; an audio compression circuit 9 connected to the analog/digital conversion circuit 8, the audio compression circuit 9 compresses the digital audio signal converted by the analog/digital conversion circuit 8, for example, audio data in MP3 or ACC format can be compressed. At this time, the main controller 4 further controls the SD card read-write module 7 to write the data processed by the audio compression circuit 9 into the TF/SD card, and after the USB interface 6 is connected to the host, the main controller 4 cooperates with the USB controller 5 to synchronously transmit the data processed by the audio compression circuit 9 to the host when the host is used as an audio device.
Further, the USB composite device may further include: and the digital-to-analog conversion circuit 10 is connected with the main controller 4 and the loudspeaker, and the digital-to-analog conversion circuit 10 converts PCM data sent by the host computer through the USB interface 6 and the USB controller 5 into an analog signal and drives the loudspeaker to produce sound.
In the second embodiment, after the USB composite device is connected to the host, an enumeration process needs to be performed first, so that the host recognizes that the inserted devices are composite devices of a storage device, a video device and an audio device, as shown in fig. 4, a descriptor structure of the USB composite device in the second embodiment is shown. Similarly, the second embodiment is implemented by configuring multiple interfaces in a manner that one descriptor structure includes one device descriptor, where the device descriptor defines one configuration descriptor, and the configuration descriptor defines a high-capacity device class interface descriptor (i.e., MassStorage interface descriptor), a USB Video class control interface descriptor (i.e., Video control interface descriptor), a Video stream interface descriptor 1 (i.e., Video Streaming interface descriptor 1), a Video stream interface descriptor 2 (i.e., Video Streaming interface descriptor 2), an Audio control interface descriptor 0 (i.e., AudioControl interface descriptor 0), an Audio stream interface descriptor 1/0 (i.e., Audio Streaming interface descriptor 1/0), an Audio stream interface descriptor 1/1 (i.e., Audio Streaming interface descriptor 1/1), and an Audio stream interface descriptor 2/0 (i.e., Audio Streaming interface descriptor 2/0), The Audio stream interface descriptor 2/1 (i.e., Audio Streaming interface descriptor 2/1), the Bulk input Endpoint descriptor (i.e., Bulk-in Endpoint) and the Bulk output Endpoint descriptor (i.e., Bulk-out Endpoint) are defined under the mass device class interface descriptor, the Interrupt Endpoint descriptor (i.e., Interrupt Endpoint) is defined under the USB Video class control interface descriptor, and the Video isochronous transfer Endpoint descriptor (i.e., Isoch Video Endpoint) is defined under the Video stream interface descriptor 2. An audio-in audio Endpoint descriptor (i.e., Isoch-in audio Endpoint) is defined under the audio stream interface descriptor 1/1, and an audio-out audio Endpoint descriptor (i.e., Isoch-out audio Endpoint) is defined under the audio stream interface descriptor 2/1.
Specifically, the enumeration process of the host to the USB composite device is as follows: the host acquires the first eight bytes of data of the device descriptor from the USB compound device; the host computer allocates a new address to the USB compound device; the host acquires a complete device descriptor from the USB compound device; the host acquires a complete configuration descriptor from the USB compound device; the host acquires a configuration set according to the total length of the configuration set in the configuration descriptor, wherein the configuration set comprises the configuration descriptor, each interface descriptor and each endpoint descriptor; the host sends a configuration packet to the USB composite equipment to configure the USB composite equipment and enable each interface of the USB composite equipment, wherein the interface refers to a high-capacity equipment interface, a USB video control interface, a video stream interface, an audio control interface and an audio stream interface; the host mounts the driver according to the information of the interface. After the enumeration is successful, the USB composite equipment can execute corresponding operation according to a command issued by the host.
If the USB composite device is used as the storage device and the video device, the detailed description thereof is as described in the first embodiment, which is not repeated. If the USB composite device is used as an audio device and the audio device is a USB microphone, the main controller 4 starts an internal DMA controller, synchronizes the data processed by the audio compression circuit 9 to the USB FIFO of the USB controller 5, and the USB controller 5 transmits the data synchronized to the USB FIFO to the host computer, so that the host computer can use the audio stream. If the USB composite device is used as an audio device and the audio device is a USB headset, the host synchronously transmits PCM data to the USB FIFO through the USB interface 6 and the USB controller 5, the main controller 4 starts the internal DMA controller to synchronize the PCM data in the USB FIFO into the buffer memory of the digital-to-analog conversion circuit 10, and the digital-to-analog conversion circuit 10 drives the speaker to sound.
The USB composite device provided in the second embodiment of the present invention integrates the storage function, the video function, and the audio function, and can record the contents photographed or recorded by the camera 1 and the audio contents received by the microphone in the TF/SD card, and after connecting to the host, can synchronize the contents photographed or recorded by the camera 1 and the audio contents received by the microphone to the host, and further implement the read-write operation of the host on the contents in the TF/SD card. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economical and environment-friendly, and is particularly suitable for mini DV, a vehicle data recorder, aerial photography equipment and the like.
EXAMPLE III
An embodiment of the present invention provides a working method of a USB composite device according to the first embodiment, as shown in fig. 5, including the following steps:
s11: after the USB composite device is connected with a host, the USB composite device is enumerated as a composite device of a storage device and a video device.
Further, step S11 may include the following steps:
s111: the host obtains the first eight bytes of data of the device descriptor from the USB composite device.
S112: the host assigns a new address to the USB composite device.
S113: the host obtains the complete device descriptor from the USB composite device.
S114: the host obtains the complete configuration descriptor from the USB composite device.
S115: and the host acquires the configuration set according to the total length of the configuration set in the configuration descriptor.
S116: and the host sends a configuration packet to the USB composite equipment to configure the USB composite equipment and enable each interface of the USB composite equipment.
S117: the host mounts the driver according to the information of the interface.
S12: if the USB composite device is used as a storage device, the main controller 4 is matched with the USB controller 5 to realize the read-write operation of the TF/SD card.
Further, step S12 may include the following steps:
s121: and the host issues the CBW to the USB compound equipment.
S122: after receiving the CBW command, the USB controller 5 extracts the SCSI command, and controls the SD card read/write module 7 to complete the read/write operation on the TF/SD card through the main controller 4 according to the SCSI command.
S123: after the read/write operation is completed, the USB controller 5 returns CSW to the host.
S13: if the USB composite device is used as a video device, the main controller 4 is matched with the USB controller 5 to synchronously transmit the data processed by the video compression circuit 3 to the host.
Further, step S13 may include the following steps:
s131: the main controller 4 starts an internal DMA controller and synchronizes the data processed by the video compression circuit 3 to the USB FIFO of the USB controller 5.
S132: the USB controller 5 sends the data isochronous transfer synchronized to the USB FIFO to the host.
In addition, in the third embodiment, before or after step S11, the method may further include the following steps:
s14: the CSI module 2 collects data of the image sensor in the camera 1.
S15: the video compression circuit 3 compresses the data collected by the CSI module 2, for example, into JPEG format images.
S16: the main controller 4 controls the SD card read-write module 7 to write the data processed by the video compression circuit 3 into the TF/SD card.
The working method of the USB composite device provided by the third embodiment of the invention integrates the storage function and the video function, can record the contents photographed or recorded by the camera 1 in the TF/SD card, and can synchronize the contents photographed or recorded by the camera 1 to the host after being connected with the host, and further realize the read-write operation of the host on the contents in the TF/SD card. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economical and environment-friendly, and is particularly suitable for mini DV, a vehicle data recorder, aerial photography equipment and the like.
Example four
An embodiment of the present invention provides a working method of a USB composite device according to the first embodiment, as shown in fig. 6, including the following steps:
s21: after the USB composite device is connected with a host, the USB composite device is enumerated as a composite device of a storage device, a video device and an audio device. This step is similar to step S11 and will not be described in detail.
S22: if the USB composite device is used as a storage device, the main controller 4 is matched with the USB controller 5 to realize the read-write operation of the TF/SD card. This step is similar to step S12 and will not be described in detail.
S23: if the USB composite device is used as a video device, the main controller 4 is matched with the USB controller 5 to synchronously transmit the data processed by the video compression circuit 3 to the host. This step is similar to step S13 and will not be described in detail.
S24: if the USB composite device is an audio device, the main controller 4 cooperates with the USB controller 5 to synchronously transmit the data processed by the audio compression circuit 9 to the host, or the digital/analog conversion circuit 10 converts the PCM data sent by the host through the USB interface 6 and the USB controller 5 into an analog signal and drives the speaker to sound.
Further, step S24 may include the following steps:
s241: if the USB composite device is an audio device and the audio device is a USB microphone, the main controller 4 starts an internal DMA controller, synchronizes the data processed by the audio compression circuit 9 to the USB FIFO of the USB controller 5, and the USB controller 5 synchronously transmits the data synchronized to the USB FIFO to the host.
S242: if the USB composite device is used as an audio device and the audio device is a USB earphone, the host synchronously transmits PCM data to the USB FIFO through the USB interface 6 and the USB controller 5, the main controller 4 starts an internal DMA controller, the PCM data in the USBFIFO is synchronously stored in a cache of the digital-to-analog conversion circuit 10, and the digital-to-analog conversion circuit 10 drives a loudspeaker to sound.
In addition, in the fourth embodiment, before or after the step S21, the following steps may be further included:
s25: the CSI module 2 collects data of the image sensor in the camera 1.
S26: the video compression circuit 3 compresses the data collected by the CSI module 2, for example, into JPEG format images.
S27: the main controller 4 controls the SD card read-write module 7 to write the data processed by the video compression circuit 3 into the TF/SD card.
In addition, in the fourth embodiment, before or after the step S21, the following steps may be further included:
s28: the analog/digital conversion circuit 8 converts an analog audio signal received by the microphone into a digital audio signal.
S29: the audio compression circuit 9 compresses the digital audio signal converted by the analog/digital conversion circuit 8, and may compress audio data in the MP3 or ACC format, for example.
S30: the main controller 4 controls the SD card read-write module 7 to write the data processed by the audio compression circuit 9 into the TF/SD card.
The working method of the USB composite device provided by the fourth embodiment of the present invention integrates the storage function, the video function, and the audio function, and can record the contents photographed or recorded by the camera 1 and the audio contents received by the microphone in the TF/SD card, and after connecting to the host, can synchronize the contents photographed or recorded by the camera 1 and the audio contents received by the microphone to the host, and further implement the read-write operation of the contents in the TF/SD card by the host. Compared with the prior art, the direct operation of the contents in the TF/SD card can be realized without connecting the TF/SD card to a host, the method is convenient for users, economical and environment-friendly, and is particularly suitable for mini DV, a vehicle data recorder, aerial photography equipment and the like.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by controlling the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. The utility model provides a USB compound device, its characterized in that, USB compound device is the video input equipment of no display screen scheme, USB compound device includes camera, USB controller and connects the USB interface of USB controller, USB compound device still includes:
the external TF/SD card and the SD card read-write module for reading and writing the contents of the inserted TF/SD card;
the CSI module is connected with the camera and used for collecting data of an image sensor in the camera;
the video compression circuit is connected with the CSI module and used for compressing the data acquired by the CSI module;
the video compression circuit, the SD card read-write module and the USB controller are connected, the SD card read-write module is controlled to write data processed by the video compression circuit into the TF/SD card, and the SD card read-write module is matched with the USB controller to realize read-write operation on the TF/SD card when the USB interface is connected with a host and used as storage equipment, and the USB interface is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to a main controller on the host when the USB interface is connected with the host and used as video equipment;
after the USB composite device is connected to the host, an enumeration process needs to be performed first, specifically, the host acquires the first eight bytes of data of the device descriptor from the USB composite device; the host computer allocates a new address to the USB compound device; the host acquires a complete device descriptor from the USB compound device; the host acquires a complete configuration descriptor from the USB compound device; the host acquires a configuration set according to the total length of the configuration set in the configuration descriptor, wherein the configuration set comprises the configuration descriptor, each interface descriptor and each endpoint descriptor; the host sends a configuration packet to the USB composite equipment to configure the USB composite equipment and enable each interface of the USB composite equipment, wherein the interface refers to a high-capacity equipment interface, a USB video control interface and a video stream interface; the host mounts the driver according to the information of the interface, and after the enumeration is successful, the USB composite device can execute corresponding operation according to a command issued by the host.
2. The USB composite device of claim 1, wherein the USB composite device further comprises:
an analog/digital conversion circuit connected to a microphone and converting an analog audio signal received by the microphone into a digital audio signal;
and the audio compression circuit is connected with the analog/digital conversion circuit and compresses the digital audio signal converted by the analog/digital conversion circuit.
3. The USB composite device of claim 2, wherein the USB composite device further comprises:
and the digital/analog conversion circuit is connected with the main controller and the loudspeaker, converts PCM data sent by the host machine through the USB interface and the USB controller into analog signals, and drives the loudspeaker to sound.
4. A method of operating a USB composite device according to claim 1, the method comprising the steps of:
the CSI module collects data of an image sensor in the camera;
the video compression circuit compresses data acquired by the CSI module;
the main controller controls the SD card read-write module to write the data processed by the video compression circuit into the TF/SD card;
after the USB composite device is connected with a host, enumerating the USB composite device into a storage device and a video device, specifically, the host acquires the first eight bytes of data of a device descriptor from the USB composite device; the host computer allocates a new address to the USB compound device; the host acquires a complete device descriptor from the USB compound device; the host acquires a complete configuration descriptor from the USB compound device; the host acquires a configuration set according to the total length of the configuration set in the configuration descriptor, wherein the configuration set comprises the configuration descriptor, each interface descriptor and each endpoint descriptor; the host sends a configuration packet to the USB composite equipment to configure the USB composite equipment and enable each interface of the USB composite equipment, wherein the interface refers to a high-capacity equipment interface, a USB video control interface and a video stream interface; the host mounts the driver according to the information of the interface, and after the enumeration is successful, the USB composite equipment can execute corresponding operation according to a command issued by the host;
if the USB composite equipment is used as storage equipment, the main controller is matched with the USB controller to realize the read-write operation of the TF/SD card;
if the USB composite equipment is used as video equipment, the main controller is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to the host.
5. The working method of the USB composite device according to claim 4, wherein if the USB composite device is used as a storage device, the host controller cooperates with the USB controller to implement the read/write operation on the TF/SD card, comprising the steps of:
the host computer issues CBW to the USB compound equipment;
after receiving the CBW command, the USB controller extracts an SCSI command, and controls the SD card read-write module to complete read/write operation on the TF/SD card through the main controller according to the SCSI command;
after the read/write operation is complete, the USB controller returns the CSW to the host.
6. The method of operating a USB composite device according to claim 4, wherein the method further comprises the steps of, after the USB composite device is connected to a host, before or after the step of enumerating as a composite device of a storage device and a video-class device:
the CSI module collects data of an image sensor in the camera;
the video compression circuit compresses data acquired by the CSI module;
and the main controller controls the SD card read-write module to write the data processed by the video compression circuit into the TF/SD card.
7. A method of operating a USB compound device according to claim 2 or claim 3, the method comprising the steps of:
the CSI module collects data of an image sensor in the camera;
the video compression circuit compresses data acquired by the CSI module;
the main controller controls the SD card read-write module to write the data processed by the video compression circuit into the TF/SD card;
after the USB composite equipment is connected with a host, the USB composite equipment is enumerated as composite equipment of storage equipment, video equipment and audio equipment;
if the USB composite equipment is used as storage equipment, the main controller is matched with the USB controller to realize the read-write operation of the TF/SD card;
if the USB composite equipment is used as video equipment, the main controller is matched with the USB controller to synchronously transmit the data processed by the video compression circuit to the host;
if the USB composite device is used as an audio device, the main controller is matched with the USB controller to synchronously transmit the data processed by the audio compression circuit to the host.
8. The working method of the USB composite device according to claim 7, wherein if the USB composite device is used as a storage device, the host controller cooperates with the USB controller to implement the read/write operation on the TF/SD card, comprising the steps of:
the host computer issues CBW to the USB compound equipment;
after receiving the CBW command, the USB controller extracts an SCSI command, and controls the SD card read-write module to complete read/write operation on the TF/SD card through the main controller according to the SCSI command;
after the read/write operation is complete, the USB controller returns the CSW to the host.
9. The method of claim 7, wherein after the USB composite device is connected to a host, before or after the step of enumerating as a composite device of a storage device, a video-class device, and an audio-class device, the method further comprises the steps of:
the CSI module collects data of an image sensor in the camera;
the video compression circuit compresses data acquired by the CSI module;
and the main controller controls the SD card read-write module to write the data processed by the video compression circuit into the TF/SD card.
10. The method of claim 7, wherein after the USB composite device is connected to a host, before or after the step of enumerating as a composite device of a storage device, a video-class device, and an audio-class device, the method further comprises the steps of:
the analog/digital conversion circuit converts an analog audio signal received by the microphone into a digital audio signal;
the audio compression circuit compresses the digital audio signal obtained by the conversion of the analog-to-digital conversion circuit;
the main controller controls the SD card read-write module to write the data processed by the audio compression circuit into the TF/SD card.
CN201710032120.3A 2017-01-17 2017-01-17 USB composite equipment and working method thereof Active CN106897242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710032120.3A CN106897242B (en) 2017-01-17 2017-01-17 USB composite equipment and working method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710032120.3A CN106897242B (en) 2017-01-17 2017-01-17 USB composite equipment and working method thereof

Publications (2)

Publication Number Publication Date
CN106897242A CN106897242A (en) 2017-06-27
CN106897242B true CN106897242B (en) 2020-09-29

Family

ID=59198487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710032120.3A Active CN106897242B (en) 2017-01-17 2017-01-17 USB composite equipment and working method thereof

Country Status (1)

Country Link
CN (1) CN106897242B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622541B (en) * 2017-08-08 2020-06-09 建荣集成电路科技(珠海)有限公司 Storage device, USB camera and driving recording method and system thereof
CN109426643A (en) * 2017-08-25 2019-03-05 中兴通讯股份有限公司 USB interface request scheduling method, device and equipment
CN107643999A (en) * 2017-09-14 2018-01-30 航天信息股份有限公司 A kind of means of communication of built-in module for reading and writing
TWI647571B (en) * 2017-09-20 2019-01-11 旺玖科技股份有限公司 Usb hub
CN111090608B (en) * 2019-12-26 2021-07-09 深圳市优博讯科技股份有限公司 Data transmission method and system based on USB device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791181A (en) * 2001-04-06 2006-06-21 索尼公司 Digital camera
CN204750587U (en) * 2015-05-08 2015-11-11 西京学院 Machine carries system of taking photo by plane
CN105808461A (en) * 2014-12-31 2016-07-27 航天信息股份有限公司 USB combination system and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246465A (en) * 2007-05-18 2008-08-20 北京思比科微电子技术有限公司 General serial bus chip
CN101398792B (en) * 2007-09-28 2011-08-24 联想(北京)有限公司 Method and device for implementing application of interface functional equipment
US8850082B2 (en) * 2010-08-30 2014-09-30 Qualcomm Incorporated Virtual USB compound device enumeration
CN201796602U (en) * 2010-09-21 2011-04-13 深圳市江波龙电子有限公司 USB storage equipment and extension device thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791181A (en) * 2001-04-06 2006-06-21 索尼公司 Digital camera
CN105808461A (en) * 2014-12-31 2016-07-27 航天信息股份有限公司 USB combination system and method
CN204750587U (en) * 2015-05-08 2015-11-11 西京学院 Machine carries system of taking photo by plane

Also Published As

Publication number Publication date
CN106897242A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN106897242B (en) USB composite equipment and working method thereof
TW386207B (en) Memory card interface apparatus
EP1793315B1 (en) Combination apparatus capable of data communication between host devices and method thereof
US6363211B1 (en) Data recording apparatus and method, data reproducing apparatus and method, data recording/reproducing apparatus and method, and transmission medium
US20090135256A1 (en) Sata camera system
CN1082314C (en) Digital interface apparatus having transmission function of non-compressed digital data
US20040189809A1 (en) Digital imaging apparatus and method for selecting data transfer mode of the same
CN101174254B (en) Digital camera
CN112104840B (en) Video acquisition method and mobile baseband workstation
CN101247475B (en) Apparatus and method for image capturing and camera shooting
CN1327434C (en) Recording apparatus and recording method
EP1605694A1 (en) Camera recorder and data recording medium
CN208724094U (en) A kind of indoor unit Driver Card of visual-speaking system
JPH10234038A (en) Data processor, data form converter, data communication method and data processing system
US8929723B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
US8452158B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
KR200311055Y1 (en) External Digital Video Recording System
KR20060112540A (en) Apparatus and method for processing thumbnail image in television receiver
US20050188135A1 (en) High performance serial bus data recorder
US8446491B2 (en) Image capture device, method of controlling the same, and image capture system
CN201138838Y (en) Multimedia capture apparatus
TWI273417B (en) Video processing apparatus and method
KR200279040Y1 (en) Main board supporting 64bit PCI slots for personal computer based digital video recorder
KR20050010073A (en) Device for remakig through tv on date containing memory card
KR200276194Y1 (en) Main board for personal computer based digital video recorder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200103

Address after: Unit D88, floor 2, convention and Exhibition Center, No.1, Software Park Road, Tangjiawan Town, hi tech Zone, Zhuhai City, Guangdong Province

Applicant after: Jianrong Integrated Circuit Technology (Zhuhai) Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province science and Technology Park of Nanshan District high new technology building B505 Fu'an

Applicant before: Jian Rong semiconductor (Shenzhen) Co., Ltd.

Applicant before: Jianrong Integrated Circuit Technology (Zhuhai) Co., Ltd.

Applicant before: ZHUHAI HUANGRONG INTEGRATED CIRCUIT TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220309

Address after: Rooms 1306-1309, 13 / F, 19 science Avenue West, Hong Kong Science Park, Shatin, New Territories, China

Patentee after: BUILDWIN INTERNATIONAL (ZHUHAI) LTD.

Address before: Unit D88, 2 / F, convention and Exhibition Center, No.1 Software Park Road, Tangjiawan Town, hi tech Zone, Zhuhai, Guangdong 519000

Patentee before: BUILDWIN INTERNATIONAL (ZHUHAI) Ltd.

TR01 Transfer of patent right