HID Host Code in VB .Net
I am developing an HID device with the 18f2550 microcontroller and I really found it hard to even turn on and off some leds using USB communication. After a lot of search in this forum and in Internet, after reading Jan Axelson's great book USB Complete and after a lot of testing I found an HID .Net library. It has been developed by Mike O'Brien a .Net experienced programmer. Thanks to him it really simplifies the host application code to communicate with an HID device through USB. The link to his site (and the HID library) is http://labs.mike-obrien.net/Document.aspx?id=hidlibrary
I thought it would be very usefull to write a host application in VB .Net that does the same as Microchip's "Generic HID - Simple Demo - PC Software". The system I did all the tests is:
- Windows XP SP3
- Visual Basic 2008 Express
- .Net Framework 3.5 (installed with VB 2008)
- Microchip USB Framework v2.4
- Custom board with PIC18F2550
- PIC firmware: Microchip's Generic HID
I would like to share the host application so everyone wishing to develop an HID device finds a simple starting point. Below is the source code attached.
Just to mention that Jan Axelson has made a great job and offers for free a complete HID solution (both host and firmware code). However USB host code is quite complicated in itself. By putting Mike O'Brien's HID library you can hide all the details for API calling and the code becomes much simpler and easier to understand.
Feel free to send any comments