5.6.4 Universal Serial Bus (USB)
Some PIC16F, PIC18F and PIC32CM MCUs offer integrated USB peripherals that comply with USB 2.0 Full-Speed (12 Mbps) device standards, supporting all four endpoint transfer types, endpoint buffering, and low-power operation with suspend/resume features, with minimal CPU intervention and interrupt load. Table 5-24 provides a comparison of features between PIC16F, PIC18F and PIC32CM.
| Feature | PIC16F USB | PIC18F USB | PIC32CM USB |
|---|---|---|---|
| USB Support | USB 2.0 Full-Speed Device | USB 2.0 Full-Speed Device |
USB 2.1 (Full-Speed 12 Mbps, Low-Speed 1.5 Mbps) Device, Host, OTG |
| Host/Device Modes | Device mode | Device mode | Host and Device mode |
| Host Mode Features | Host-detection | Host-detection |
Eight physical pipes Unlimited virtual pipes Feedback endpoint SOF clock output |
| Endpoint Addresses | 8 bidirectional endpoints | 16 bidirectional endpoints | 8 (16 endpoints: 8 IN, 8 OUT) |
| Endpoint Transfer Types |
Control Interrupt Bulk Isochronous |
Control Interrupt Bulk Isochronous |
Control Interrupt Bulk Isochronous |
| Max Payload per Endpoint | Up to 1023 | Up to 1023 | No endpoint size limitation (typically up to 1023 bytes) |
| Endpoint Buffering | Dual Access RAM | Dual Access RAM | Internal SRAM, fully configurable |
| Multi-Packet Transfer | Supported (through software) | Supported (through software) | Supported |
| Double Buffering | Dual bank (ping-pong) | Dual bank (ping-pong) | Dual bank (ping-pong) |
| Power Management |
Suspend mode Wake-up from sleep |
Suspend mode Wake-up from sleep |
Suspend/Resume Wake-up from sleep Link Power Management (LPM-L1) support |
| On-Chip Transceiver | Supported | Supported | Supported |
| DMA Support | N/A | Supported | Built-in for endpoint data and configuration |
| Crystal-less Operation | Supported | Supported | Supported |
| Debug Support | Supported | Supported | N/A |
| Buffer Size | Up to 64 bytes | Up to 512 bytes | Up to 1 KB+ |
| VBUS/ID Pin Support | N/A | Supported | Supported |
| USB Classes Supported | CDC, HID | CDC, HID, MSC | CDC, HID, MSC, Audio |
