Announcing an open source USB stack for PIC 18F and 24F

in open source, PIC, USB by Ian | 7 comments

Good news everyone! A new free and open source USB stack is now available for PIC microcontrollers. Today we finished testing and prepared a simple echo test that works with PIC 18F and 24F. We hope a demo release will get more developers involved. A release package and overview are in the forum. As always, thanks to Honken and JTR for making this possible.

Microchip has a free-as-in-beer USB firmware for the PIC microcontroller, but it can’t be redistributed. For a project like the USB IR Toy, we can give you our source code but not the USB source. You have to get that on your own from Microchip. It’s not a huge problem, but it is a barrier for people new to PICs. We used the Microchip firmware because it works great and there wasn’t an alternative.

Over a year ago we released the first Bus Pirate v4 hardware. It uses a PIC with integrated USB, it needs a USB stack. We think the Bus Pirate exemplifies everything good and wholesome about open hardware. There’s no way we’d release it using non-distributable source.

The road to the open USB stack is strewn with the corpses of attempted ports, and the empty promises of rentacoders who didn’t deliver. Eventually, a solution came from Honken, who contributed the foundation of the USB stack. JTR took from there and baked-up the code we’re using now.  This USB stack would not exist without the herculean efforts of Honken and JTR.

Things are speeding up. A few weeks ago an open source bootloader for the Bus Pirate v4 was finished. Last week we completed testing of a USB IR Toy firmware that uses the new stack. Later today we hope to make the first official Bus Pirate v4 firmware release.

Thanks to everyone who made this possible. If you test the demo please give us a shout in the forum.

This entry was posted in open source, PIC, USB and tagged , , , , , .


  1. zikzak says:

    Whoa ! That’s great ! I’m waiting for some nice tutorials on dangerousprototypes now !

  2. arhi says:


  3. “The road to the open USB stack is strewn with the corpses of attempted ports, and the empty promises of rentacoders who didn’t deliver.”

    Shouldn’t that be:

    “The road to the open USB stack is strewn with the corpses of rentacoders who didn’t deliver, and the empty promises of attempted ports.”

  4. vimark says:

    Congratulations to the team who worked so hard on it!

  5. dsgfds says:


    Hopefully this will be further developed and maintained for integration into all kinds of open source hardware projects.

  6. VaclavPe says:


    I think that USB stack by Alexander Enzmann is open sourced, too. I tried this code and made changes to have bulk USB device and CDC device. It is quite simple.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.