CN105930293B - Serial transceiver interface module and usb interface module common port circuit and working method - Google Patents
Serial transceiver interface module and usb interface module common port circuit and working method Download PDFInfo
- Publication number
- CN105930293B CN105930293B CN201610421845.7A CN201610421845A CN105930293B CN 105930293 B CN105930293 B CN 105930293B CN 201610421845 A CN201610421845 A CN 201610421845A CN 105930293 B CN105930293 B CN 105930293B
- Authority
- CN
- China
- Prior art keywords
- interface module
- usb
- line
- connect
- data
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4004—Coupling between buses
- G06F13/4009—Coupling between buses with data restructuring
- G06F13/4018—Coupling between buses with data restructuring with data-width conversion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
Abstract
The problem of the present invention relates to serial transceiver interface modules and usb interface module common port circuit and working method, and the peripheral interface module for solution embedded system is mutually indepedent, incompatible, can not share connectivity port.Common port circuit of the invention includes single-chip microcontroller and USB port, and single-chip microcontroller includes: the serial transceiver interface module connecting with USB port and usb interface module;The interface screen unit to block interface module to communicate is separately connected with the serial transceiver interface module and usb interface module;It is connect with the interface screen unit and main control unit to detect the external apparatus interface module type of access common port, and will test the detection unit that information is sent to the main control unit;It is connect with the interface screen unit and detection unit with the main control unit of the detection information control interface screen unit sent according to detection unit.
Description
Technical field
The present invention relates to embedded systems, more specifically to a kind of serial transceiver interface module and usb interface module
Common port circuit and working method.
Background technique
Embedded system and extraneous interaction are needed through generalized device interface module, such as A/D, D/A, I/O, and processor is logical
It crosses generalized device interface module to connect with sensor or other peripheral hardwares, realizes the input/output function of processor.Each peripheral hardware is logical
Only one normal independent function, and the connection of peripheral hardware and processor is according to interface module consensus standard, it is respectively independently, mutually not simultaneous
Hold, connector can not be shared, similarly, the port being used cooperatively with connector is also mutually indepedent.But with the development of usb protocol,
Usb interface module has become common interface module, and most independent peripheral connectors also use usb interface module, with satisfaction and respectively
The connection of kind smart machine needs.Such as Bluetooth adapter passes through the USB port of usb interface module grafting computer, realizes computer
With the Bluetooth communication of other peripheral hardwares.But for embedded system device, USB flash disk uses usb interface module, bluetooth or WIFI
Module needs the serial transceiver interface module by executing respective protocol to connect processor, is not available USB interface on the market
Module peripheral hardware realizes wireless transmission function.So the serial interface module and usb interface module of existing embedded system should be changed
Circuit connecting relation, realize that the data of system and external equipment are handed over using the peripheral hardware that a port connects multiple and different types
It changes, simplifies the configuration of system interface module.
Summary of the invention
In view of the problems of the existing technology, the present invention, which provides one USB port of one kind, can connect multiple and different functions
The serial transceiver interface module and usb interface module common port circuit and working method of peripheral hardware.
The technical proposal adopted by the invention to solve the above technical problems is that: a kind of serial transceiver interface module connects with USB
Mouth mold block common port circuit, including single-chip microcontroller and shared USB port, single-chip microcontroller includes: the serial receipts connecting with USB port
Send out interface module and usb interface module;It is separately connected with the serial transceiver interface module and usb interface module to block interface
The interface screen unit of module communication;It is connect with the interface screen unit and main control unit to detect the outer of access common port
Portion's device interface module type, and will test the detection unit that information is sent to the main control unit;It is shielded with the interface single
Member is connected with detection unit with the main control unit of the detection information control interface screen unit sent according to detection unit.
The serial transceiver interface module line includes data transmission line and data receiver line, the data transmission line and USB
Port pinout D- connection, the data receiver line are connect with USB port pin D+;The usb interface module line includes that data pass
Defeated line D- and data line D+;The data line D- of usb interface module is connect with USB port pin D-, data line D
+ connect with USB port pin D+.
Further, the serial transceiver interface module is UART interface module;The data receiver line of UART interface module
It is connect with USB port pin D+, the data transmission line of UART interface module is connect with USB port pin D-.
Further, the serial transceiver interface module further includes SPI interface module;The data of the UART interface module
Receive line, the data receiver line of SPI interface module is connect with USB port pin D+, the data transmission of the UART interface module
Line, SPI interface module data transmission line connect with USB port pin D-.
Further, the serial transceiver interface module further includes usb interface module;The data of the UART interface module
It receives line, the data receiver line of SPI interface module, data line D+ to connect with USB port pin D+, the UART interface mould
The data transmission line of block, the data transmission line of SPI interface module, usb interface module data line D- and USB port pin
D- connection.
Further, the serial transceiver interface module be SPI interface module, the data receiver line of SPI interface module with
The electric interfaces module D+ connection of USB port, the data transmission line of SPI interface module and the electric interfaces module D- of USB port
Connection.
Further, the serial transceiver interface module is usb interface module, the data transmission of two usb interface modules
Line D- is connect with USB port pin D-, and data line D+ is connect with USB port pin D+.
Further, the circuit further includes power circuit, and the supply pin of the power circuit and USB port pin connects
It connects, the USB port pin further includes the return foot of ground connection.
Further, the data receiver line of the serial transceiver interface module and data transmission line pass through resistance eutral grounding.
The present invention also provides a kind of working methods of common port circuit, comprising the following steps:
S1: main control unit control interface screen unit alternately shields serial transceiver interface module and usb interface module;
S2: detection unit is connect by the external equipment of interface module detection access common port not shielded in step S1
Mouth mold block type, and will test information and be sent to the main control unit;
S3: if external apparatus interface module type is usb interface module, main control unit control interface screen unit shielding string
Row transceiver interface module exchanges data with external equipment using usb protocol;
If external apparatus interface module type is serial transceiver interface module, the shielding of main control unit control interface screen unit
Usb interface module exchanges data with external equipment using serial transceiver interface module protocol.
In the present invention the serial transceiver interface module of single-chip microcontroller by sharing USB port and peripheral hardware connecting communication, it can be achieved that
The connection of the peripheral hardware of a port and different function.Embedded system no setting is required multiple diverse interface modules connect to meet
The needs of peripheral hardware are connect, the connection of a port can be realized by common circuit for serial transceiver interface module, simplify embedded
The installation and configuration of system.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is the circuit block diagram of serial transceiver interface module and usb interface module common port;
Fig. 2 is single-chip microcontroller and port device communication flow figure;
Fig. 3 is the circuit diagram of usb interface module and UART interface module common port;
Fig. 4 is the circuit diagram of usb interface module and SPI interface module common port;
Fig. 5 is the circuit diagram of usb interface module and SPI interface module, UART interface module common port;
Fig. 6 is the circuit diagram of multiple usb interface module common ports;
Fig. 7 is the circuit diagram of multiple usb interface modules and SPI interface module, UART interface module common port.
Specific embodiment
In the following, referring to attached drawing to the circuit of serial transceiver interface module of the invention and usb interface module common port into
Row is described in detail.
As shown in Figure 1, serial transceiver interface module is connect with usb interface module with a common port, and respectively with connect
Mouth screen unit connection, interface screen unit connect main control unit and detection unit.
As shown in Fig. 2, constantly alternately shielding usb interface module and the serial transmitting-receiving of main control unit control interface screen unit
Module, the external equipment that detection unit is connect by the unscreened interface module detection of interface screen unit with common port connect
Mouth mold block type.
When detection unit detects that peripheral hardware is communicated using usb protocol by usb interface module, what detection unit will test
The interface module type information of external equipment is sent to main control unit, and main control unit shields serial transceiver interface module, uses USB
Agreement exchanges data with external equipment, until port for peripheral equipment is disconnected with common port.
When detection unit by serial transceiver interface module detect peripheral hardware using serial transceiver interface module protocol communicate,
The interface module type information for the external equipment that detection unit will test is sent to main control unit, and main control unit shielding USB connects
Mouth mold block exchanges data with external equipment using serial transceiver interface module protocol, until port for peripheral equipment and common port
It disconnects.
As shown in figure 3, the serial transceiver interface module for sharing USB port includes usb interface module and UART interface module.
The operating voltage of usb interface module is 5V, and usb interface module line is four lines, i.e. VCC, D+, D- and GND.USB port is for inserting
External equipment is connect, USB is divided into master-slave equipment in this circuit connection.Main equipment, that is, end USB HOST is that the USB of single-chip microcontroller connects
Mouth mold block, usb signal are differential signal, and signal wire D+, D-, at the end USB HOST, D+ and D- respectively connect a pull down resistor, with
D+, D- of USB port are connected, and when USB device is inserted into USB port, host scm detects insertion device signal, and judgement is set
The type of standby access and the equipment, and start to communicate with this equipment.
The operating voltage of UART interface module is 5V, and UART interface module line includes RXD data receiver line and TXD data hair
Line sending.RXD data receiver line, the end USB HOST D+ interface module line connect with the D+ of USB port.TXD data transmission line,
The D- interface module line at the end USB HOST is connect with the D- of USB port.
Single-chip microcontroller during operation, constantly switches usb interface module and the detection of UART interface module accesses common port
Peripheral type.In detection process, when peripheral hardware is using one of protocol interface module, another interface module of system mask makes
Carried out data transmission with peripheral hardware communications protocol, eliminates its possible influence or conflict that may be present.
For example, being inserted into port using USB flash disk, single-chip microcontroller detects that peripheral hardware is communicated using usb protocol by usb interface module,
UART interface module is then shielded, exchanges data with peripheral hardware using usb protocol, until USB flash disk is pulled out.USB flash disk extract after, single-chip microcontroller after
The peripheral type of continuous constantly switching usb interface module and UART interface module detection access shared interface module.
When using UART interface module bluetooth module, when being inserted into USB port, single-chip microcontroller detects that peripheral hardware uses UART protocol
Communication, then shield usb interface module, exchange data with peripheral hardware using UART protocol, until bluetooth module is pulled out.Bluetooth module
After extraction, single-chip microcontroller, which keeps, switches the peripheral type of usb interface module and UART interface module detection access common port.
As shown in figure 4, the serial transceiver interface module of common port includes usb interface module and SPI interface module, share
Port is USB port.The operating voltage of usb interface module and SPI interface module is 5V, and spi bus is made of four signal lines:
Serial time clock line SCLK, serial data send line SDO, Serial data receiving line SDI and the effective slave selection line SS of low level.String
Row data receiver line SDI, the end USB HOST D+ interface module line connect with the D+ of USB port.Serial data sends line
SDO, the end USB HOST D- interface module line connect with the D- of USB port.
Single-chip microcontroller during operation, constantly switches usb interface module and the detection of SPI interface module accesses the outer of common port
If type.In detection process, when peripheral hardware is using one of protocol interface module, another interface module of system mask is eliminated
Its possible influence or conflict that may be present.
For example, being inserted into port using USB flash disk, single-chip microcontroller detects that peripheral hardware is communicated using usb protocol by usb interface module,
SPI interface module is then shielded, exchanges data with peripheral hardware using usb protocol, until USB flash disk is pulled out.USB flash disk extract after, single-chip microcontroller after
The peripheral type of continuous constantly switching usb interface module and SPI interface module detection access shared interface module.
When using SPI interface module insertion USB port, single-chip microcontroller detects that peripheral hardware is communicated using SPI protocol, then shields
Usb interface module exchanges data with peripheral hardware using SPI protocol, until SPI interface module is pulled out.SPI interface module is extracted
Afterwards, single-chip microcontroller, which keeps, switches the peripheral type of usb interface module and SPI interface module detection access common port.
As shown in figure 5, the serial transceiver interface module of common port includes usb interface module, SPI interface module and UART
Interface module.The operating voltage of three is identical, is 5V.UART interface module RXD data receiver line and SPI interface module are serial
Data receiver line SDI, the end USB HOST D+ interface module line connect with the D+ of USB port.UART interface module TXD data
Send line and SPI interface module serial data send line SDO, the end USB HOST D- interface module line with the D- of USB port
Connection.
During operation, constantly switching usb interface module, SPI interface module and the detection of UART interface module connect single-chip microcontroller
Enter the peripheral type of common port.In detection process, when peripheral hardware is using one of protocol interface module, system mask is in addition
Two interface modules eliminate its possible influence or conflict that may be present.
As shown in fig. 6, the serial transceiver interface module of common port is usb interface module, the D+ of each usb interface module
Interface module line is connect with the D+ of USB port, the D- connection of D- interface module line and USB port.Two usb interface modules are total
With a USB port.
As shown in fig. 7, the serial transceiver interface module of common port includes usb interface module, SPI interface module and UART
Interface module, each two groups of every kind of interface module.Six operating voltage is identical, is 5V.The RXD number of two UART interface modules
According to receive the D+ interface module line of the serial data in line SDI of line, two SPI interface modules, two ends USB HOST with
The D+ connection of USB port.The TXD data transmission line of two UART interface modules, the serial data of two SPI interface modules export
Line SDO, two ends USB HOST D- interface module line connect with the D- of USB port.
During operation, constantly switching usb interface module, SPI interface module and the detection of UART interface module connect single-chip microcontroller
Enter the peripheral type of common port.In detection process, when peripheral hardware is using one of protocol interface module, system mask is other
Interface module eliminates its possible influence or conflict that may be present.
In the present invention the serial transceiver interface module of single-chip microcontroller by sharing USB port and peripheral hardware connecting communication, it can be achieved that
The connection of the peripheral hardware of a port and different function.Embedded system no setting is required multiple diverse interface modules connect to meet
The needs of peripheral hardware are connect, the connection of a port can be realized by common circuit for serial transceiver interface module, simplify embedded
The installation and configuration of system.
It should be understood that above embodiments only express the preferred embodiment of the present invention, description is more specific and detailed
Carefully, but it cannot be understood as limitations on the scope of the patent of the present invention;It should be pointed out that for the common skill of this field
For art personnel, without departing from the inventive concept of the premise, above-mentioned technical characterstic can be freely combined, can also be done
Several modifications and improvements out, these are all within the scope of protection of the present invention;Therefore, all to be done with scope of the invention as claimed
Equivalents and modification, should belong to the covering scope of the claims in the present invention.
Claims (10)
1. a kind of serial transceiver interface module and usb interface module common port circuit, including single-chip microcontroller and USB port, special
Sign is that the single-chip microcontroller includes:
The serial transceiver interface module and usb interface module being connect with the USB port;
It is separately connected with the serial transceiver interface module and usb interface module single with the interface shielding for blocking interface module to communicate
Member;
It is connect with the interface screen unit and main control unit to detect the external apparatus interface module class for accessing the USB port
Type, and will test the detection unit that information is sent to the main control unit;
The detection information control interface shielding to send according to detection unit is connect with the interface screen unit and detection unit
The main control unit of unit, the main control unit control the interface screen unit and constantly alternately shield the usb interface module
With the serial transceiver module.
2. common port circuit according to claim 1, which is characterized in that the serial transceiver interface module includes data
It sends line and data receiver line, the data transmission line is connect with USB port pin D-, the data receiver line and USB port
Pin D+ connection;
The usb interface module includes data line D- and data line D+;The data line D- of usb interface module with
The D- connection of USB port pin, data line D+ are connect with USB port pin D+.
3. common port circuit according to claim 2, which is characterized in that the serial transceiver interface module connects for UART
Mouth mold block;The data receiver line of UART interface module is connect with USB port pin D+, the data transmission line of UART interface module with
The D- connection of USB port pin.
4. common port circuit according to claim 3, which is characterized in that the serial transceiver interface module further includes
SPI interface module;The data receiver line of the UART interface module, the data receiver line of SPI interface module and USB port pin
D+ connection, the data transmission line of the UART interface module, the data transmission line of SPI interface module and USB port pin D- connect
It connects.
5. common port circuit according to claim 4, which is characterized in that the serial transceiver interface module further includes
Two usb interface modules;Data receiver line, the data line of the data receiver line of the UART interface module, SPI interface module
D+ is connect with USB port pin D+, data transmission line, the data transmission line of SPI interface module, of the UART interface module
The data line D- of two usb interface modules is connect with USB port pin D-.
6. common port circuit according to claim 2, which is characterized in that the serial transceiver interface module connects for SPI
The data receiver line of mouth mold block, SPI interface module is connect with USB port pin D+, the data transmission line of SPI interface module with
The D- connection of USB port pin.
7. common port circuit according to claim 2, which is characterized in that the serial transceiver interface module is third
The data line D- of usb interface module, two usb interface modules is connect with USB port pin D-, data line D+ with
The D+ connection of USB port pin.
8. described in any item common port circuits according to claim 1~7, which is characterized in that the common port circuit is also
Including power circuit, the power circuit is connect with the supply pin of USB port pin, and the USB port pin further includes ground connection
Return foot.
9. common port circuit according to claim 8, which is characterized in that the data of the serial transceiver interface module connect
Take-up and data transmission line pass through resistance eutral grounding.
10. a kind of working method of such as above-mentioned common port circuit according to any one of claims 1 to 9, which is characterized in that packet
Include following steps:
S1: main control unit control interface screen unit alternately shields serial transceiver interface module and usb interface module;
S2: the external apparatus interface mould that detection unit passes through interface module detection access common port not shielded in step S1
Block type, and will test information and be sent to the main control unit;
S3: if external apparatus interface module type is usb interface module, the shielding of main control unit control interface screen unit is serial to be received
Interface module is sent out, exchanges data with external equipment using usb protocol;
If external apparatus interface module type is serial transceiver interface module, main control unit control interface screen unit shields USB
Interface module exchanges data with external equipment using serial transceiver interface module protocol.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610421845.7A CN105930293B (en) | 2016-06-15 | 2016-06-15 | Serial transceiver interface module and usb interface module common port circuit and working method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610421845.7A CN105930293B (en) | 2016-06-15 | 2016-06-15 | Serial transceiver interface module and usb interface module common port circuit and working method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105930293A CN105930293A (en) | 2016-09-07 |
CN105930293B true CN105930293B (en) | 2019-04-12 |
Family
ID=56830360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610421845.7A Active CN105930293B (en) | 2016-06-15 | 2016-06-15 | Serial transceiver interface module and usb interface module common port circuit and working method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105930293B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106383794A (en) * | 2016-09-18 | 2017-02-08 | 合肥联宝信息技术有限公司 | Serial port and USB port reuse method and electronic device |
CN110347631A (en) * | 2019-07-02 | 2019-10-18 | 深圳市华星光电技术有限公司 | VBO interface turns the electronic device that UART and USB interface are shared |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100593163C (en) * | 2007-12-18 | 2010-03-03 | 南京异或科技有限公司 | Interface device used for connecting serial port or general serial bus structure |
CN101937414B (en) * | 2010-08-26 | 2013-05-15 | 惠州Tcl移动通信有限公司 | Method and device of sharing minitype USB interface for UART (Universal Asynchronous Receive/Transmitter) and USB (Universal Serial Bus) |
CN101931674B (en) * | 2010-09-01 | 2014-04-16 | 惠州Tcl移动通信有限公司 | Method and device for sharing Micro-USB interface |
CN102546869B (en) * | 2012-01-06 | 2014-09-17 | 海能达通信股份有限公司 | USB (Universal Serial Bus) interface multiplexing interphone and control method thereof |
CN102724339B (en) * | 2012-05-29 | 2017-11-10 | 惠州Tcl移动通信有限公司 | A kind of UART serial ports and USB interface common circuit and mobile phone |
CN103389958B (en) * | 2013-06-27 | 2016-08-17 | 三星半导体(中国)研究开发有限公司 | USB (universal serial bus) |
CN205983460U (en) * | 2016-06-15 | 2017-02-22 | 深圳拓邦股份有限公司 | Serial receiving and dispatching interface module and USB interface module sharing port circuit |
-
2016
- 2016-06-15 CN CN201610421845.7A patent/CN105930293B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105930293A (en) | 2016-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106104506B (en) | For entering the method, apparatus and computer program product of attachment joint mode in USB c-type interface | |
CN104838636B (en) | Ethernet on USB interface with full-duplex differential pair | |
US7895386B2 (en) | USB interface provided with host/device function and its control method | |
CN104885067B (en) | Communication and relevant cables, connector, system and method for the operation based on M PHY on the interface based on PCI | |
CN103902488B (en) | The method and system utilizing USB-OTG to extend other interfaces based on android system | |
CN101127026A (en) | Hot plug detection method of mobile memory card | |
CN204576500U (en) | A kind of usb communication circuit of compatible I2C communication and system | |
WO2018155791A1 (en) | Multi-purpose adapter card and integration method thereof | |
CN108111382A (en) | Communicator and its communication means based on I3C buses | |
CN205983460U (en) | Serial receiving and dispatching interface module and USB interface module sharing port circuit | |
CN103207852A (en) | Multi-bus embedded processing device | |
CN107203483A (en) | The interface circuit and electronic equipment of a kind of electronic equipment | |
CN105930293B (en) | Serial transceiver interface module and usb interface module common port circuit and working method | |
CN108259747A (en) | A kind of image capturing system based on SOC | |
CN107506322A (en) | Realize Type C adapters, the passage control method of USB device detection | |
CN108563537A (en) | A kind of USB principals and subordinates detection device and method | |
CN206649322U (en) | A kind of environmental parameter monitor and safety defense monitoring system based on Raspberry Pi | |
CN106713094A (en) | 1394 data collection module | |
CN1316388C (en) | USB control circuit suitable to computer-to-computer transmission and its operation method | |
CN109358995A (en) | A kind of multifunctional testing backboard and test method | |
CN108957164A (en) | A kind of test device and test method of buckle | |
Cisco | Cabling Specifications | |
Cisco | Cabling Specifications | |
Cisco | Cabling Specifications | |
Cisco | Cabling Specifications |
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 |