
This guide shows how to configure and customize the latest version of the JTR-Honken open source USB stack for PIC microcontrollers. The demo will run on most USB-enabled projects from Dangerous Prototypes. Be sure to check the wiki for the latest documentation and downloads.
Many PIC microcontrollers have USB hardware. We use some of these chips in the IR Toy, Bus Pirate v4, Logic Sniffer, LCD Backpack, and more. Microchip provides free code to run the USB hardware, but it can’t be distributed with open source software. This has always been a disappointment to lots of people, and a barrier to using Microchip stuff in open source and education.
Over the last few years forum members wrote and tested an open source alternative. The stack has these features:
- USB CDC (virtual serial) support
- USB HID support
- Double buffered
- Interrupt or polling driven
All our projects are now running on the most recent version of the USB stack, but there’s never been a simple example and complete documentation. We put together a bare-bones USB to serial echo demo to help get you started with the stack. The example has lots of comments, several pages of documentation, and it can be used as the basis for a new project. It works on many PIC 18Fs and 24Fs right out of the box.
This guide shows how to configure and customize the USB stack. The stack and example code are licensed Creative Commons Attribution, so you can use it pretty much however you want. A huge thanks to Honken, JTR, and many others who contributed bug reports and improvements.
For more details continue reading below.
Continue reading “HOW-TO: Open Source USB stack for PIC microcontrollers”