Announcement: Open source PIC USB stack

Posted on Friday, January 14th, 2011 in USB by Ian

Forum member Honken released an open source USB firmware for PIC microcontrollers. This is a major open source contribution, congratulations!

Most PIC 18F2550 and 18F4550 USB projects you see on the web use the Microchip USB source code. It’s easy to use and free. There’s one big problem: Microchip uses a license that isn’t open source compatible. Distributing the USB source with a project is against the rules.

Until now, we’ve relied on Microchip’s non-distributable driver in projects like the USB IR Toy and Logic Sniffer. We release our source code, but you have to download the USB driver from Microchip yourself. This is a pain, especially for beginners who aren’t familiar with compilers and build configurations.

Over the last few days we’ve tested the Honken USB firmware on several different PIC18F microcontrollers.  The latest version is available in SVN and the forum.

Our current goal is to get it running on the PIC 24FJ used in the Bus Pirate v4. We can begin volume manufacturing of the new Bus Pirate as soon as the driver is in place.  Can you help? Please join us in the forum.

This entry was posted on Friday, January 14th, 2011 at 11:54 am and is filed under 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.

4 Responses to “Announcement: Open source PIC USB stack”

  1. Rohit de Sa says:

    Hi Ian/DP readers:

    I’ve got quite a few non-USB PICs so I’m looking for a firmware-only implementation of USB for the PICs (something similar to V-USB for the AVRs). I guess that 20MHz PICs will probably need to be overclocked to 24MHz for something like this, but it would still be cool (and not to mention useful for simple datalogging projects!

    Anybody with leads….?

    • Ian says:

      I’d stick with the AVR for bitbang USB. As I recall (could be wrong) the driver situation for the v-usb gets weirder with every new OS release (esp. Win 7+) because it isn’t actually compliant with any USB standard (it’s a cheat). Again, I’m sorry if I’m wrong, this is just what I recall.

  2. Rohit de Sa says:

    “(it’s a cheat)”Yes, and that’s what’s so brilliant about it! :-D

    “the driver situation for the v-usb gets weirder with every new OS release (esp. Win 7+) because it isn’t actually compliant with any USB standard “Hmm, I was going through the bitbang code and suspected that it would cause some pain to the OS….still, for projects that require just a control+interrupt endpoint, a software-PIC-based solution would be fantastic.

    I’ve found this: . A PIC ’84!! I mailed the fellow asking if he’d share his source code, but it’s being used in a commercial product. He very kindly agreed to send me a hex file though. But then again, trying to disassemble a USB implementation in hex is like trying to find a needle in a stack of needles :-P


  3. Ian says:

    I’d rather port v-usb to a PIC than reverse engineer a .HEX :) There may be a little platform dependent stuff, but maybe it’s doable.

Leave a Reply

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

Recent Comments

  • Daniel: Do I comment here or on FB?
  • Craig B: Shouldn't the default be 00xxx010? Note that bit 0 appears out of order in the documentation. In that case I think the initial value is...
  • JJM: From the datasheet extract you are showing, the power up status should be 00xxx010, not 000xxx01. Bit numbering is misleading since 'measurement resolution' is apparently...
  • Jan Ciger (@janoc200): Hmm, that could actually explain why the three sensor IMU breakout I have bought a few years ago had all sorts of issues - I...
  • Travis: Is it preset to the windows 3 fingered salute?