Steve,

I got my parts in for USB (gotta love ebay), and I've built up a breadboard with a 4550 and LED's, switches etc.
I've looked at the example from post #143, the second one, with DT_INTS, and found two problems. The ...

INTCON = %10100000 ' Enable global and TMR0 interrupts

was causing the TMR0 interrupts to start servicing the USB before it was initialized. DT_INTS handles all the interrupt enable bits, so you don't need it anyway.

The other problem was ...

goto skipmacro

was skipping over the interrupt defintion. That section of code needs to execute so that it can handle the enable bits and setup a couple other variables.

Once I made those changes, the program works as expected, and never looses connection.
<hr>
But here's the good part,

After going through the USB18.ASM file and seeing how things worked, it soon became apparent that those routines are setup to use the USB interrupts(even though PBP doesn't use them that way). It just needs a "kick-start" to get it going. The "kick-start" is simply a tight loop servicing the USB until the driver gets to the "CONFIGURED_STATE". After that it takes off and handles itself.

But the best part is that it doesn't use ANY PBP system variables to service the USB. So the whole thing can be treated like ASM interrupts, and tied directly into the USB_INT interrupt.

This also seems to improve the response time since it can react immediately to each step of the USB protocol, instead of after each interval of the timer, or whenever ON INTERRUPT get's around to it, but I don't have any hard data to back that up yet.

Here's your PIC program from the [USBDemo, something to learn USB a little bit ]thread /.zip file.
Modified to use DT_INTS-18 and the USB interrupt.
All the other files are the same.

http://www.darreltaylor.com/files/USBDemo2_DT.txt

Works great with the "Mister E USBDemo" program.
<br>