Quote Originally Posted by jellis00 View Post
However, DT told me in one post that you can't use his USB_Handler to awaken from sleep mode and I should sense the connection of the USB cable with an RB change interrupt and then in the ISR for the RB change do an @RESET to somehow start the USB service.
Yes I did.
But let's pretend I didn't.

You can put the PIC to sleep, and it will re-enumerate when re-connected.
The main oscillator is stopped in sleep mode, so the USB module's clock also stops.
You can also place the USB module in SUSPEND mode to reduce the current from the USB module. That's done in response to an IDLEIF, currently used to determine un-plugged state in DT_HID.

When the USB cable is plugged in, you'll get ACTVIF interrupts (a signal to RESUME from SUSPEND mode).

So you don't even need to connect USB +5V to an INT pin.
The USB module can detect the changes.

It's just that you have to do it. Nothings automatic.