[Pziz] wrote in with one of his projects. He created a linux kernel driver for the PIC 18F*55* series based on some available development tools. Continue reading for his (slightly edited) writeup.
I think Hack-a-day readers might be interested by a project I did, as a french (…) engineering school project. The goal was to provide a way to do Linux-only USB communications with the PIC18F4550 (the “linux” part was actually my idea ;-) ). While most projects seen on the internet involving this chip end up with some kind of MS windows driver, this one shows how to make a kernel module that will create simple /dev/ interfaces and sysfs attributes.
It’s actually a modified version of the PIC USB Framework, which didn’t provide for data transfer code in the firmware (except for the bootloader), and no kernel module, but it includes everything needed to get you started with the PIC18F*55* series: (a compiler (sdcc), programmer, firmware and a USB bootloader.
The transfer speed is not huge (you should be able to reach something like 300kB/s, and I used some tricks to get that speed with that chip), but that’s not what the 18F4550 was made for anyway.
That driver was made without any feedback from “experts” in kernel modules, and there’s probably a lot of bugs, so if you have any remarks, you can contact me at psizzz+hackaday at gmail.com.
Possible developments with this firmware and driver include “proprietary” protocols for any low/full speed application, but you can also modify the firmware to make it behave as a HID for example (low speed inputs (as a keyboard, mouse, …) / outputs (as keyboard leds, etc.)), or a mass storage device, which means no driver development, and the ability to use it on any OS.
May the Hack be with you.