Hi,
Well, I don't know if that's actually what it does at the low level (ie within the USBSERVICE "command") but for a basic HID keyboard there's, to my knowledge, no "user readable" data (ie to be read with USBIN) sent from the PC to PIC.
I can't test this at the moment but I think what I want is something like:
Code:
USBDeviceState VAR BYTE EXT
CONFIGURED_STATE CON EXT
And then I should be able to do something like:
Code:
' Don't proceed until device enumerates
WHILE USBDeviceState <> CONFIGURED_STATE
USBService
WEND
Yeah the board is quite nice, pretty bare bones but a simple way to get up and running. - and it has the 32768Hz x-tal for the 46J50 on-board RTC. It took me a bit a longer than usual (like an hour and a half) to get the obligatory blink-a-led going, mostly due to not knowing how the Microchip HID bootloader was setup, then another hour or two to get the USB stuff going. Will probably order a couple more to add my growing collection of dev.boards.
/Henrik.
Bookmarks