CN103902488B - The method and system utilizing USB-OTG to extend other interfaces based on android system - Google Patents

The method and system utilizing USB-OTG to extend other interfaces based on android system Download PDF

Info

Publication number
CN103902488B
CN103902488B CN201210587645.0A CN201210587645A CN103902488B CN 103902488 B CN103902488 B CN 103902488B CN 201210587645 A CN201210587645 A CN 201210587645A CN 103902488 B CN103902488 B CN 103902488B
Authority
CN
China
Prior art keywords
usb
interface
panel computer
data
hid
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
CN201210587645.0A
Other languages
Chinese (zh)
Other versions
CN103902488A (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201210587645.0A priority Critical patent/CN103902488B/en
Publication of CN103902488A publication Critical patent/CN103902488A/en
Application granted granted Critical
Publication of CN103902488B publication Critical patent/CN103902488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of USB of utilization OTG interface based on android system and carry out the method and system of other Interface Expandings.Described method/system utilizes embedded IC and USB HUB extended chip, by circuit debugging and software programming, in the case of the system of panel computer itself and interface not being made any change, have developed a set of method and system utilizing USB interface extension panel computer external interface.Scheme designed by the present invention, uses the USB OTG agreement of standard on the panel computer of standard, and expansion interface carries out communication with the form of USB HID device with panel computer;Greatly reduce the difficulty of panel computer secondary development, accelerate the speed of secondary development;Save the customisation costs of panel computer, reduce product cost.

Description

The method and system utilizing USB-OTG to extend other interfaces based on android system
Technical field
The present invention relates to USB-OTG extended method and the system of android system, especially with IC circuit design and software programming use USB interface to extend other interfaces such as UART interface, SPI The method and system of interface and I2C interface etc..
Background technology
USB OTG is the abbreviation of USB On-The-Go, is the technology got up of developed recently, 2001 On December 18, is announced by USB Implementers Forum, be mainly used in various not Connection between same equipment or mobile device, carries out data exchange.Particularly PDA, mobile electricity Words, consumer devices.Change as multiple in equipment rooms such as digital camera, video camera, printers The inconvenience of data exchange between different systems connector, the up to storage card of 7 kinds of standards.USB skill The development of art so that PC and peripheral equipment can pass through plain mode, the manufacturing cost of appropriateness Various equipment are linked together, usb bus can be passed through, as the periphery of PC, Data exchange is carried out under the control of PC.But this convenient exchanged form, once have left PC, Each equipment room cannot utilize USB port to operate, because neither one equipment potentially acts as PC The same Host.On-The-Go, i.e. OTG technology is exactly the real situation that there are currently no Host Under, it is achieved the data transmission of equipment room.
Interface on the panel computer of android system have employed this USB-OTG at present Technology, it is achieved that the data interaction between plurality of devices, but general on above-mentioned panel computer All only one of which USB or SDIO(Secure Digital Input and Output Card Secure digital input-output card) etc. minority interface, interface quantity and interface type all cannot meet The needs of secondary development.
Traditionally, the method such issues that of solution is drawn for changing hardware circuit design fabric swatch again Other required interfaces, such as UART(UniversalAsynchronous Receiver/Transmitter, Universal Asynchronous Receive/dispensing device), SPI(Serial PeripheralInterface--Serial Peripheral Interface (SPI)), I2C (Inter-Integrated Circuit) etc., or in the case of not changing external interface, need android system It is updated, enrolls new driving with support demand.Two kinds of traditional methods, are required for flat The hardware of plate computer or software are modified or upgrade, and bring greatly to secondary development Not convenient.
Summary of the invention
The present invention utilizes embedded IC and USB-HUB extended chip on this background, passes through Circuit debugging and software programming, carry out any changing in not system and interface to panel computer itself In the case of Dong, have developed a set of side utilizing USB interface extension panel computer external interface Method and system.
The described method utilizing USB interface extension panel computer external interface uses embedded IC Control circuit and USB-HUB extended chip, concrete steps include:
The USB-OTG interface of panel computer based on android system is arranged to USB-HOST Pattern;
Utilize USB-HUB extended chip that USB-OTG is extended to multiple USB-HOST interface, One connects embedded IC control circuit, and other interfaces connect other USB devices;
Drawing UART serial interface from embedded IC control circuit, SPI interface, I2C connects Mouthful;
Described embedded IC control circuit performs protocol conversion, by UART protocol, SPI protocol With the USB-HID agreement that I2C protocol conversion is standard and android system host computer USB-HID protocol conversion is different types of agreement, and described protocol conversion includes: embedded IC Control circuit by panel computer by the Data Analysis that USB-HID agreement sends become UART serial ports, SPI interface or the form of I2C interface data, be sent to UART serial ports, SPI interface, Or the equipment that I2C interface connects, and by UART serial ports, SPI interface or I2C interface is packaged into the USB-HID data form of standard from the data of external reception, by with The USB interface that panel computer connects, is carried out with panel computer with the form of the USB-HID of standard Communication.
According to an embodiment of the invention, described USB-HUB extended chip uses CY7C65632 chip.
According to an embodiment of the invention, described embedded IC control circuit uses CY8C3246LTI-128 chip.
According to an embodiment of the invention, UART interface is set as dynamic rate, arranges Scope is between 9600-115200BPS.
According to an embodiment of the invention, with different data between different types of agreement Packet header is distinguished, and the data between each different packet header can pass in a time-multiplexed manner Defeated.
The described system utilizing USB interface extension panel computer external interface includes:
Panel computer based on android system, it has USB-OTG interface, described USB-OTG interface is configured to USB-HOST pattern;
USB-HUB extended chip, becomes multiple USB-HOST interface by USB-OTG Interface Expanding, One connects embedded IC control circuit, and other interfaces connect other USB devices;
Embedded IC control circuit, draws UART serial interface, SPI interface, I2C thereon Interface, described embedded IC control circuit performs protocol conversion, and by UART protocol, SPI assists Negotiation I2C protocol conversion is USB-HID agreement and the android system host computer of standard USB-HID protocol conversion is different types of agreement, and described protocol conversion includes: embedded IC Control circuit by panel computer by the Data Analysis that USB-HID agreement sends become UART serial ports, SPI interface or the form of I2C interface data, be sent to UART serial ports, SPI interface, Or the equipment that I2C interface connects, and by UART serial ports, SPI interface or I2C interface is packaged into the USB-HID data form of standard from the data of external reception, by with The USB interface that panel computer connects, is carried out with panel computer with the form of the USB-HID of standard Communication.
According to another implementation of the invention, described USB-HUB extended chip uses CY7C65632 chip.
According to another implementation of the invention, described embedded IC control circuit uses CY8C3246LTI-128 chip.
According to another implementation of the invention, UART interface is set as dynamic rate, arranges Scope is between 9600-115200BPS.
According to another implementation of the invention, with different numbers between different types of agreement Distinguishing according to packet header, the data between each different packet header can pass in a time-multiplexed manner Defeated
Scheme designed by the present invention, the shortcoming preferably overcoming traditional scheme:
● existing panel computer on fully utilized market, it is not necessary to any hardware of panel computer or Person's systems soft ware is modified;
● completely disengage from the support of panel computer manufacturer, it is not necessary to panel computer manufacturer Any technical support is provided;
● use the USB-OTG agreement of standard on the panel computer of standard, expansion interface with The form of USB-HID equipment and panel computer carry out communication;
● greatly reduce the difficulty of panel computer secondary development, accelerate the speed of secondary development;
● save the customisation costs of panel computer, reduce product cost.
Accompanying drawing explanation
Fig. 1 is the connection diagram that the embodiment of the present invention provides;
Fig. 2 is the extended chip circuit diagram () that the embodiment of the present invention provides;
Fig. 3 is control circuit chip circuit figure (two) that the embodiment of the present invention provides;
Detailed description of the invention
The present invention realizes in the secondary development of panel computer.It is achieved in that utilization The PSOC3 series of the usb expansion chip CY7C65632 and a CYPRESS of CYPRESS company MCU CY8C3246LTI-128 extends UART, SPI and I2C interface.
As it is shown in figure 1, the USB-OTG interface of Android panel computer is arranged to USB-HOST Pattern, utilizes USB-HUB extended chip to be extended to four USB-HOST interfaces, and one is used for even Meeting CY8C3246LTI-128, other three can be used to connect other USB devices, according to this A bright embodiment, described USB-HUB extended chip selects CY7C65632(such as accompanying drawing 2 Shown in).The USB-HOST interface that usb expansion is come is connected to embedded IC control circuit, According to an embodiment of the invention, described embedded IC control circuit is selected CY8C3246LTI-128 chip (as shown in Figure 3), utilizes the circuit design on chip, from CY8C3246LTI-128(hereinafter referred to as MCU) one UART serial interface of upper extraction, a SPI Interface, an I2C interface.Illustrate as a example by UART serial ports below: UART can set For dynamic rate, the scope that arranges is between 9600-115200BPS.UART is from the number of external reception After entering MCU, it is packaged into the USB-HID data form of standard, by being connected with panel computer USB interface, form and panel computer with the USB-HID of standard carry out communication, panel computer Can be regarded as USB-HID normal data after receiving these data, user has only to adjust Just can be soft in Android application layer with the api routine of android system layer standard USB-HID These data are called on part.Panel computer sends data to MCU, MCU by USB-HID agreement These Data Analysis become the form of UART serial data, and be sent to be connected with UART interface sets Standby.SPI interface is essentially identical with UART interface with the principle of I2C interface.
The software kernels of this method is to utilize CY8C3246LTI-128 chip to carry out protocol conversion, By UART protocol, SPI protocol and the USB-HID agreement that I2C protocol conversion is standard.Again will The USB-HID protocol conversion of android system host computer is different types of agreement, dissimilar Agreement between distinguish with different data packet head, the data between each different packet header can be with The mode of time-sharing multiplex is transmitted, to prevent data collision.
Present invention achieves the function utilizing the external multiple different interface devices of single USB interface, The distinct interface of ancillary equipment is converted to the USB-HID protocol package of standard, and marks difference Packet header be distinguish between, use time-sharing multiplex method to prevent data collision.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, relevant The those of ordinary skill of technical field, without departing from the spirit and scope of the present invention, Can also make a variety of changes and modification, the technical scheme of the most all equivalents falls within the present invention Category, the scope of patent protection of the present invention should be defined by the claims.

Claims (2)

1. the method utilizing USB-OTG to extend other interfaces based on android system, described method uses embedded IC control Circuit processed and USB-HUB extended chip, it is characterised in that comprise the steps:
The USB-OTG interface of panel computer based on android system is arranged to USB-HOST pattern;
Utilizing USB-HUB extended chip that USB-OTG is extended to multiple USB-HOST interface, one connects embedded IC and controls Circuit, other interfaces connect other USB devices;Described USB-HUB extended chip uses CY7C65632 chip, described Embedded IC control circuit uses CY8C3246LTI-128 chip;
UART serial interface, SPI interface, I2C interface is drawn from embedded IC control circuit;
Described embedded IC control circuit performs protocol conversion, is standard by UART protocol, SPI protocol and I2C protocol conversion The USB-HID protocol conversion of USB-HID agreement and android system host computer is different types of agreement, described agreement Conversion includes: embedded IC control circuit by panel computer by the Data Analysis that USB-HID agreement sends become UART serial ports, SPI interface or the form of I2C interface data, be sent to be connected with UART serial ports, SPI interface or I2C interface Equipment, and being packaged into standard by UART serial ports, SPI interface or I2C interface from the data of external reception USB-HID data form, by the USB interface being connected with panel computer, the form with the USB-HID of standard is electric with flat board Brain carries out communication;UART interface is set as dynamic rate, and the scope that arranges is between 9600-115200BPS;Different types of association Distinguishing with different data packet heads between view, the data between each different packet header can be transmitted in a time-multiplexed manner.
2. the system utilizing USB-OTG to extend other interfaces based on android system, it is characterised in that described system bag Include:
Panel computer based on android system, it has USB-OTG interface, and described USB-OTG interface is configured to USB-HOST pattern;
USB-HUB extended chip, becomes multiple USB-HOST interface by USB-OTG Interface Expanding, and one connects embedded IC control Circuit processed, other interfaces connect other USB devices;Described USB-HUB extended chip uses CY7C65632 chip, institute State embedded IC control circuit and use CY8C3246LTI-128 chip;
Embedded IC control circuit, draws UART serial interface, SPI interface, I2C interface thereon, and described embedded IC controls Circuit performs protocol conversion, by UART protocol, SPI protocol and USB-HID agreement that I2C protocol conversion is standard and The USB-HID protocol conversion of android system host computer is different types of agreement, and described protocol conversion includes: embedded IC Panel computer is become UART serial ports, SPI interface or I2C by the Data Analysis that USB-HID agreement sends by control circuit The form of interface data, is sent to the equipment being connected with UART serial ports, SPI interface or I2C interface, and passing through UART serial ports, SPI interface or I2C interface are packaged into the USB-HID data form of standard from the data of external reception, By the USB interface being connected with panel computer, carry out communication with the form of the USB-HID of standard with panel computer;UART Interface setting is dynamic rate, and the scope that arranges is between 9600-115200BPS;With different data between different types of agreement Packet header is distinguished, and the data between each different packet header can be transmitted in a time-multiplexed manner.
CN201210587645.0A 2012-12-30 2012-12-30 The method and system utilizing USB-OTG to extend other interfaces based on android system Active CN103902488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210587645.0A CN103902488B (en) 2012-12-30 2012-12-30 The method and system utilizing USB-OTG to extend other interfaces based on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210587645.0A CN103902488B (en) 2012-12-30 2012-12-30 The method and system utilizing USB-OTG to extend other interfaces based on android system

Publications (2)

Publication Number Publication Date
CN103902488A CN103902488A (en) 2014-07-02
CN103902488B true CN103902488B (en) 2016-08-17

Family

ID=50993820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210587645.0A Active CN103902488B (en) 2012-12-30 2012-12-30 The method and system utilizing USB-OTG to extend other interfaces based on android system

Country Status (1)

Country Link
CN (1) CN103902488B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090857A (en) * 2014-07-07 2014-10-08 成都联星微电子有限公司 System and method for expanding peripheral interfaces of intelligent terminal
CN104484305B (en) * 2015-01-06 2021-02-05 浪潮(北京)电子信息产业有限公司 Server debugging analysis interface device
CN105426194A (en) * 2015-12-03 2016-03-23 北京利云技术开发公司 Method and system for driving cameras based on Android OTG interface
CN105446929A (en) * 2015-12-14 2016-03-30 武汉芯昌科技有限公司 Port multiplexing circuit capable of supporting SPI, I2C, I2CL and UART protocols
CN105429239A (en) * 2015-12-29 2016-03-23 昆山映台电子科技有限公司 Android platform-based OTG (On-The-Go) charging device and control method thereof
CN106919527A (en) * 2017-01-25 2017-07-04 柳黎 The method and device that a kind of Android intelligent equipment USB interface is expanded
CN107450408A (en) * 2017-09-06 2017-12-08 深圳增强现实技术有限公司 A kind of system and method for sensor plug and play
CN108205511A (en) * 2017-12-29 2018-06-26 上海哈诚电子科技有限公司 A kind of USB serial paralled interfaces expander
CN110391823B (en) * 2019-07-31 2020-11-13 珠海格力电器股份有限公司 Communication circuit, control method thereof, and device having communication function
CN110808876A (en) * 2019-10-30 2020-02-18 厦门亿联网络技术股份有限公司 Telephone debugging system and equipment
CN112286854A (en) * 2020-10-12 2021-01-29 杭州德旺信息技术有限公司 Multiplexing system, method and storage medium for UART interface and SPI interface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480801B2 (en) * 1999-01-19 2002-11-12 Sun Microsystems, Inc. Universal serial bus test system
CN201533359U (en) * 2009-11-23 2010-07-21 中国华录集团有限公司 Vehicle-mounted mobile digital television receiver
CN102143266A (en) * 2011-02-18 2011-08-03 深圳桑菲消费通信有限公司 Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480801B2 (en) * 1999-01-19 2002-11-12 Sun Microsystems, Inc. Universal serial bus test system
CN201533359U (en) * 2009-11-23 2010-07-21 中国华录集团有限公司 Vehicle-mounted mobile digital television receiver
CN102143266A (en) * 2011-02-18 2011-08-03 深圳桑菲消费通信有限公司 Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface

Also Published As

Publication number Publication date
CN103902488A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103902488B (en) The method and system utilizing USB-OTG to extend other interfaces based on android system
US7895386B2 (en) USB interface provided with host/device function and its control method
KR101725536B1 (en) Device, method and system for operation of a low power phy with a pcie protocol stack
US10261930B2 (en) System, device and method for transmitting signals between different communication interfaces
CN104090857A (en) System and method for expanding peripheral interfaces of intelligent terminal
CN104375855A (en) Device and method for upgrading firmware through storage devices on basis of multiple vehicle-mounted MCUs
CN104793590B (en) A kind of extended method of intelligent domestic system and its functional module
CN112416841A (en) Multi-machine communication realization method based on I2C bus and multi-machine communication system
CN102902650A (en) Data sharing and transfer systems and methods
CN103019981B (en) Signal converting control method and signal adapting device
CN204374963U (en) A kind of server for encrypting module based on TCM chip
CN108111382A (en) Communicator and its communication means based on I3C buses
CN104933004A (en) System and method for expanding CPU module by using SPI bus
CN102445981B (en) Data transmission system and data transmission method
CN205983460U (en) Serial receiving and dispatching interface module and USB interface module sharing port circuit
CN102508799B (en) Automatic control method, system and USB (universal serial bus) device
CN106610909A (en) System, device and method for separating half-duplex signals
CN202694039U (en) Adapter circuit
CN107370651A (en) A kind of communication means between SPI slaves
CN210129206U (en) Interactive intelligent tablet
CN102567249B (en) A kind of electronic equipment and data transmission method thereof
CN108808398A (en) A kind of Type-C types usb hub and on-vehicle host
CN208477514U (en) A kind of SPI of intelligent temperature controller turns the analog circuit of UART
CN104102871A (en) Electronic signature verification extension equipment and information processing method
CN105930293B (en) Serial transceiver interface module and usb interface module common port circuit and working method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant