Code Monkey home page Code Monkey logo

pico-pio-usb's Introduction

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

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

pico-pio-usb's People

Contributors

sekigon-gonnoc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.