I'm trying to create USB data acquisition device with a PIC18F4550 and my friend and I are having a real hard time getting the software side of it to work. Does anyone know of a good tutorial that can explain the following?
Which bootloader to use?
Should we use the HID bootloader, and if so, how do we get it to work?
What compiler are you using?? Microchip's Application Library comes with a Bootloader project for MPLAB C18.
maybe i should explane more, pc recognizes the pic and the HID driver woks but beyond that we are stuck what, i would like to get to the point where i can turn leds on with the computer. any one got any ideas?
The bootloader is only for loading a new program onto the PIC via USB. It has nothing to do with communicating with a host device.
If you download the USB framework from microchip's website, there are plenty of examples. The easiest way to implement a basic device is to use their framework that enumerates the PIC as a Serial Port on the host PC. Then its pretty easy to use serial communication for control/data transfer. There's even an example app for turning LEDs on and off with all the Visual Basic projects/code included.
The HID bootloader takes up 0x1000 space while the MCHPUSB/PICDEM bootloader only uses 0x0800. However, you need to install specific drivers on the host PC to use MCHPUSB. The HID bootloader is plug and play.
There is also a HID driverless framework for communication as well but its a bit more complicated to use.
Bootloaders sometimes interfere with the main program on the PIC. The configuration bits that are fixed for the bootloader may not be compatible with the configuration bits that the main program is relying on.
That's why I never use bootloaders. I'd recommend that you buy an external programmer so that you don't get any misconfigurations.