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

Posted on Monday, August 29th, 2011 in open source, PIC, USB by Ian

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 on Monday, August 29th, 2011 at 9:37 am and is filed under open source, PIC, USB. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

7 Responses to “Announcing an open source USB stack for PIC 18F and 24F”

  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 Reply

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

Recent Comments

  • Jack: I hope everyone at Dangerous Prototypes wins a share of the MegaMillions jackpot tonight.
  • Edward Mallon: While I loved the Nokia 5110 LCD's readability in full sun, the pressure sensitivity was a real problem for the underwater units. So I started...
  • ConnyCola: I like this article a lot! And in contrast to Max I love to hear what you guys are doing in Shenzen and Hong Kong....
  • Max: Thanks for the writeup, it's always interesting to read about a different culture. Other than that though I'm afraid I was spoiled by living neither...
  • Tepa: Heps keikkaa