USB is one of the more complex things to tackle. A bit of searching and reading will get you closer. As you go through the USB section of this forum, you will find some excellent include files from Darrel to help, but it will not be something you can jump into without a lot of background reading, and significantly more code than you posted. In terms of complexity, USB is as far away from an RS232 serial port, as an airliner is from a paper plane.
USB is also time critical. You will likely have to abandon SERIN for HSERIN so that you can use interrupts.
Bookmarks