Honken's USB stack

From DP

Jump to: navigation , search

Contents

About

This project is an open source USB stack for PIC microcontrollers.

  • Interrupt driven
  • Tested on PIC 18F and 24F
  • Will initially support virtual serial port interface (CDC-ACM)

Status

  • Underlying USB stack is very solid
  • Needs old CDC layer ported back to new stack

Chips

  • 18F2550 echo test success
  • 18F24J50 echo test success
  • 24Fj256GB006 echo test success

Source

main.c

Echo example

  1. main loop configures USB and waits for enumeration. CDC characters are echoed back
  2. init has setup functions for various hardware testers are using
  3. interrupts are handled at the end of the source. Includes bootloader vector redirects for IR Toy

cdc_config.h

//#define BPv4
//#define IRTOY
//#define EA14k //Embedded adventures PIC18F14K50 module
//#define JTR_PIC24GB002        // JTR's PIC24..GB002 mockup
//#define Ians18FJ      //Ian's PIC18F24J50 test bed
//#define LPC14K  // Microchip low pin count demo board
//JTR_18FxxJ53 // JTR PIC18F27J53

This file currently defines lots of interesting stuff:

  • USB VID
  • The hardware platform (IR Toy, BPv4, etc)
  • CDC settings
  • SELF_POWER/internal vreg/etc