Community gathered around Dangerous Prototypes site decided that it is time we have a decent USB stack for Microchip PIC micro controllers that has usable open source licence. The USB stack provided by Microchip as part of the MAL is great, works perfectly but has a huge flaw, and that is, it does not allow you to properly use it with open source projects. When you have your open source project that uses MAL you share your project on some public CVS/SVN/BZR/GIT.. repository but you have to remove all MAL files and add a readme to explain to users how to download mal, how to install it, where to put it etc … and it all makes a huge mess and is very unreliable. The worse part is that Microchip from time to time decides to make incompatible changes in the MAL so that your old code don’t work with new version of MAL. Of course Microchip don’t keep archive of old MAL releases so if you find open source project that is not using up to date version of MAL you can only cry as there’s no way you can get the same MAL developer of the project uses….
This brings us to the new open source stack being developed by the Dangerous Prototype community, namely Honken and JTR with help from everyone else. You can follow the progress on the Dangerous Prototype forum.
At the moment USB stack support only CDC, but hopefully soon we will have HID and some other profiles too. The latest version of CDC stack in form of simple echo application is available on the forum. I modified it a bit to work with 18F2550 and hid bootloader (this one is microchip’s) and you can find hid bootloader in my previous post where you can find bot HEX of the bootloader and the source for linux app to use it. The modified project for MPLAB.X that creates simple USB CDC device that echo back what you send it can be downloaded from here.
The example showing 18F2550 enumerate:
Mar 15 06:45:15 luckey kernel: [ 6694.873125] usb 5-2: new full speed USB device using uhci_hcd and address 8
Mar 15 06:45:15 luckey kernel: [ 6695.053649] usb 5-2: New USB device found, idVendor=04d8, idProduct=000a
Mar 15 06:45:15 luckey kernel: [ 6695.053653] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 15 06:45:15 luckey kernel: [ 6695.053655] usb 5-2: Product: CDC Test
Mar 15 06:45:15 luckey kernel: [ 6695.053657] usb 5-2: Manufacturer: Dangerous Prototypes
Mar 15 06:45:15 luckey kernel: [ 6695.053659] usb 5-2: SerialNumber: 00000001
Mar 15 06:45:15 luckey kernel: [ 6695.055690] cdc_acm 5-2:1.0: This device cannot do calls on its own. It is not a modem.
Mar 15 06:45:15 luckey kernel: [ 6695.055706] cdc_acm 5-2:1.0: ttyACM0: USB ACM device





No comments yet.
Leave a comment