OK, I think I've got it figured out. It looks like the USB framework assumes you'll use a standard I/O pin for Vbus sense. But, the PIC32 has a pin devoted to that function and a bit in a status register that indicates whether Vbus is present. So, I changed this definition to this: #define USB_BUS_SENSE U1OTGSTATbits.VBUSVD // Use this register bit to detect bus voltage. hh 7/27/10 Then, at the top of my UsbTask(), I added this: if(OldVbus!=3DU1OTGSTATbits.VBUSVD){ // usb was plugged in or unplugged OldVbus=3DU1OTGSTATbits.VBUSVD; // remember the new value if(OldVbus){ // newly attached USBDeviceAttach(); // connect it }else{ USBDeviceDetach(); // disconnect it } } Also, in UsbInit, I commented out the attach at the end. Instead, we'll wait for the task itself to discover an attachment. // below commented out. We'll wait to attach in UsbTask. // #if defined(USB_INTERRUPT) // USBDeviceAttach(); // #endif }//end UsbInit So, I had not dug into the details of the USB Framework. Instead, I slightly revised the Generic USB sample code to do what I wanted. It apparently left the USB attached even when no host was connected. It appears that this resulted in a lot of bus errors when no host was connected, really slowing stuff down due to all the interrupts. I'd eventually get a watchdog timeout. So... it seems to work so far. Time to test more! THANKS! Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .