USB Endpoints

The mechanisms used for Universal Serial Bus (USB) communication are data buffers called Endpoints. Endpoints exist on the Device and are typically implemented in CPU registers or dual-port memory.

Endpoints are unidirectional, i.e. each endpoint is designed to transmit data in one direction. OUT endpoints send data out of the Host to the Device. IN endpoints take data from the Device intended to go in to the Host. Endpoints exist in numbered pairs and each pair contains an OUT and an IN endpoint.

Endpoint 0 (EP0IN and EP0OUT) are reserved in every Device for control purposes. Control Endpoints are used during enumeration providing the Host the ability to read the Device Descriptor tables and to send control commands to the Device during normal application execution.

A USB device can have up to 32 endpoints (16 OUT and 16 IN). Since EP0IN and EP0OUT are set aside as control endpoints, the maximum number of endpoints available to transmit application data is 30.

Software Considerations

Communication between the Host and the Device is asynchronous over USB. The Device is not informed when a Host-initiated transfer starts. A USB Device must proactively seek to see if a data-packet has been received from the Host. If the Device were to read or write to an endpoint while a Host transaction is accessing the endpoint, the result could corrupt the data.

Microchip’s USB software, combined with the dual-port implementation of the endpoints on PIC@ MCUs, prevents corruption of endpoint data. Microchip arbitrates between the Host and the Device resulting in exclusive access to the endpoint memory.

 Learn More

 
Enumeration
Learn more >
 
USB Control Commands
Learn more >
 
USB Device Descriptors Detail
Learn more >
 
Developing USB Applications with Microchip
Learn more >

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.