| Since 1994 the USB published, it has gotten widespread application. USB has become the facto industry standard for connecting peripherals to PC's and laptops. USB2.0 has already resolved the speed of data transmission successfully and its transmission speed reaches the 480Mb/s at the most. As the portable devices increase in popularity, USB OTG is a supplement to the USB 2.0 specification. Which can make peripherals interconnect and communicate with each other direct in case of no host participates in.The article based on Cypress' USB OTG control chip: CY7C67300, consulting the latest technique of USB OTG, designed a system module of embedded USB Host/Peripheral. The main function of the module is it can be used as a Daul-Role-Device. As a host it can identify the common USB Peripheral automatically, and configure to the equipments, collect and save the data; But when it be used as a peripheral, it can as a general USB equipment connect with PC to correspond with PC and deliver with the data.The article discussed the design process of an OTG device detailedly, including the total design, the selection of component and the design of electric circuit in each function unit, such as saving unit, power supply management unit, the RS232 transfers to connect an unit etc.. Then based on hardware designing, the article analyzed the the software design include the design of the device mode software and the host mode software.such as initialization,Enumeration,get description and file system.Finally the design of driver in OTG device is discussed. |