Using the USB_INT source is much more efficient than using a 1ms timer.
During Enumeration it may only be a few microseconds between interrupts, and there are a lot of them. Consequently, it connects to the PC much faster.
But during normal operation, it drops to about every 10-20 milliseconds, although that depends on the polling time set up in the descriptor.
When the cable is un-plugged, you don't get any USB interrupts at all (after the IDLE int).
Plus using the USB_INT frees up a Timer. 
ADDED:But that doesn't explain why the Plugged example above doesn't work with the Timer Interrupts. It should work.
Are there any other USBSERVICE statements in the program?
There should only be 1.
Bookmarks