PIC18f - USB - CDC

The most two common USB protocols are HID and CDC. Most of the popular open source projects which use the microchip are using the CDC for interfacing with PC. For example, the popular bus pirate, logic scrimp, ir toy are using CDC. The dangerous prototype has their open source USB stack so the bus pirate, logic scrimp, logic pirate are all using the Honken USB Stack source. Another popular open source stack is M-Stack (Free USB Stack for PIC 16F, 18F, 24F, and 32MX Microcontrollers), it has more organised source code and more detail commented. However it only has support on x series compiliers like xc8, xc16, and xc32. Last, is the microchip default USB stacks, the most common, least problem and abundant of examples. Shouldn't be troublesome if you are using microchip library and microchip compiler. In this tutorial, I am using microchip library. I like CDC over HID because it has higher transfer rate, and it appeared as serial communication. The latter feature ensures all of the terminal software can be used. My favourite terminal software is termite, http://electronictoofree.blogspot.my/2015/05/pic18f-usb-cdc.html
Published: May 14, 2018
More from Tan Chin Yew
text based user interface: termbox tutorial
Isolated AC voltage sensing using LV25-P
Controlling two stepper motors using msp430
kingst logic analyzer LA1002 review
USB-CDC and HD44780 and DS18B20
OSA rtos
chat placeholder

Build Your Professional Network

Click icon on the company page or under talent search engine to start the conversation.