Hello
I use a PIC18F2550 for CDC serial port emulation based on cdc_demo.bas:
USBInit
For input and output I use:
inloop:
icnt = inbuff
USBService
USBIn 3, inbuffer, icnt, inloop
outloop:
USBService
ocnt = outbuff
USBOut 3, outbuffer, ocnt, outloop
and it works really fine.
At start PIC tests 5V from PC-USB-Port to wait with 'USBInit'. Sometimes PC is rebooting w/o switch off, but equipmend with the PIC interface still running. Is it possible to let the PIC routine know that Windows VSP is gone and the 'USBInit' has to be done again?
Thanks to everybody who can help
Bookmarks