21
GitHub - sekigon-gonnoc/Pico-PIO-USB: USB host/device implementation using PIO o...
source link: https://github.com/sekigon-gonnoc/Pico-PIO-USB
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Pico-PIO-USB
USB host/device implementation using PIO of raspberry pi pico (RP2040).
You can add additional USB port to RP2040.
This library is WIP. API may be changed drastically in future.
demo.mp4
Project status
Planned Features Status
FS Host
LS Host
Hub support
Multi port
FS Device
Examples
- capture_hid_report.c is a USB host sample program which print HID reports received from device. Open serial port and connect devices to pico. Default D+/D- is gp0/gp1. Call
pio_usb_add_port()
to use additional ports. - usb_device.c is a HID USB FS device sample which moves mouse cursor every 0.5s. External 1.5kohm pull-up register is necessary to D+ pin (Default is gp0).
cd example mkdir build cd build cmake .. make # Copy UF2 file in capture_hid_report/ or usbdevice/ to RPiPico
Another sample program for split keyboard with QMK
https://github.com/sekigon-gonnoc/qmk_firmware/tree/rp2040/keyboards/pico_pico_usb
Resource Usage
- Two PIO
- One PIO is for USB transmitter using 22 instruction and one state machine
- Another PIO is for USB receiver using 31 instruction and two state machine
- Two GPIO for D+/D- (Series 22ohm resitors are better)
- 15KB ROM and RAM
- (For Host) One 1ms repeating timer
- (For Device) One PIO IRQ for receiver
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK