I picked up one of Microchip's PICDEM FS USB boards.
It's an all-on-one package for developing USB peripherals.
The package comes with sample firmware and a tool for loading the firmware into the board. It also comes with some sample Win32 code for "talking" to the board. Unfortunately (typically), that sample Win32 code is pretty marginal. What I really wanted was the source to their Windows Demo App, but Microchip doesn't offer it.
I searched the Web and found the following link to the FS USB WinApp source:
That is what the Web is all about - techies sharing nuggets of great info!
It turns out that the Demo App source has several shortcomings:
1) It's written in Borland C++ Builder (WTF?!?!?) - useless to any real Windows coder.
2) The guy who wrote it is a HORRIBLE programmer so the code is really hard to use as a tutorial.
So I ported it to C++ under MS Visual Studio 2005, and offer it to anyone who's interested:
Questions? Comments? email me!
- PD_FSUSB.zip - Full C++ source and pre-built binaries for my ported version.
There's a readme in this ZIP that explains what I did.
Note: There's a bug in the code that writes the hex data to the bootloader. I'm working on a fix.
- PICDEMUSBFSDemoTool.zip - The original C++ Builder code from the picbasic.co.uk site mentioned above.
No docs... you're on your own :)
- mchip_pdfsusb.zip - The original PDFSUSB binaries from Microchip (EXE and DLLs).