Electronic Components Datasheet Search |
|
TB054 Datasheet(PDF) 1 Page - Microchip Technology |
|
TB054 Datasheet(HTML) 1 Page - Microchip Technology |
1 / 10 page 2004 Microchip Technology Inc. DS91054C-page 1 TB054 INTRODUCTION This Technical Brief demonstrates the translation of a game port game pad to a USB game pad using the PIC16C765, Microchip's low-speed USB PICmicro® microcontroller (MCU). The purpose of this Technical Brief is not only to show the translation of a game pad to USB, but also to show how to successfully develop a USB peripheral using the PIC16C765. An under- standing of USB descriptors is the foundation for successful USB peripheral development. USB Basics All USB communication takes the form of frames sent over the USB bus. Frames are one-millisecond incre- ments in which the host schedules what device end- points it will communicate with. At the scheduled time, the host and device send one another requests, or data, in the form of packets, which are limited in length to eight bytes for low-speed devices. All packets are sent to and received by the device via endpoints. End- points are buffers where a device either puts data to wait for a chance to be sent to the host, or where data received from the host is stored until the device has a chance to access the data and utilize it. Low-speed devices have two endpoints that can be configured by the device as IN or OUT (with respect to the host). These are Endpoints 1 and 2. Endpoint 0 is reserved for control transfers between the host and device. This is the bidirectional avenue through which the host and device share administrative data. Enumeration is the process in which a peripheral describes what type of device it is to the host, and occurs via Endpoint 0. USB is a master-slave protocol. In other words, the host (i.e., PC) directs all communications to and from the peripherals. Peripherals do not send information to the host unless the host requests the information. How does a peripheral tell the host what type of device it is when it is first connected to the host? The answer lies in the use of “descriptors,” as described in the following section. Descriptors GENERAL USB descriptors tend to be the biggest stumbling block for developers that have been recently introduced to USB. The purpose of descriptors is to communicate the identity of a particular peripheral to the host. For instance, the game pad in this technical brief communi- cates to the host that it is a two axis, six-button game pad that sends data to the host via Endpoint 1. A device does not volunteer this information to the host, rather the host requests this information when it detects that a new device has been attached to the USB bus. As mentioned before, the process in which the host requests and receives a device's descriptors is called “enumeration.” Peripherals have more than one descriptor. Each new descriptor progressively provides the host more infor- mation about the peripheral or about other descriptors to follow. Descriptors can be thought of as a hierarchy. The first descriptor, the device descriptor, is very gen- eral and conveys the most basic information about the device. The next descriptor is more specific, and so on, until the host finally gains all the information it needs to communicate effectively with the device. Game pads fall under the Human Interface Device (HID) class. Mice, keyboards and LED displays are all examples of other devices that fall into the HID class. The HID class is unique in that driver support is sup- plied automatically by Windows® (Windows 98 second edition and newer) and the Macintosh® operating sys- tems. These operating systems will custom build a driver whenever they detect a new HID peripheral. The driver is constructed from the data format conveyed in the report descriptor received from that device. Devel- oping within the HID class specification is the easiest way to learn how USB works because the developer doesn't have to be concerned with writing a driver at the host end. Note: This Technical Brief is the first in a series of five technical briefs. This series is meant to familiarize developers with USB. For the best understanding of USB, read the briefs in order: TB054, TB055, TB056, TB057 and TB058. Author: Reston Condit Microchip Technology Inc. An Introduction to USB Descriptors with a Game Port to USB Game Pad Translator Example |
Similar Part No. - TB054 |
|
Similar Description - TB054 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |