I realize i'm likely behind about 2 years on this one.. i've been trying to modify Mister E / Darrel's USBDEMO code so that it works with my existing setup (a vb app that aquires 8 bit a/d result from the chip over usb cdc com port and also relays it to a serially connected 16F767.

Can anyone make comment or point me to the appropriate thread discussing the DT INTS & Microchip bootloader on an 18F4550. I can't seem to get it going.. i'm doing a cdc device that otherwise works fine with the standard "usbservice" everywhere method.. so I know I don't have a hardware issue... basically what occurs with the new program is nothing. and stuff freezes too (Hyperterminal, my application) without getting any data (or so it seems).

The device i'm building (i'm not showing you it's a total hackjob - that works) is "self powered" (i think) It runs off either a Max756 or a 7805C output or USB power, which on my hackjob of a board, is selected with jumpers. I've been attempting to detect the state of the usb connection, with limited success.. which currently involves 1x 100k and 1x 10k resistors to ground and USBV+ (5v from the usb cable) meeting in the middle at PORTB.0 which i've named "USBCONNECTED".

Do I need the INTERRUPT_ORG defines, something else? I'd also like to implement a "SLEEP" command when the cable isnt connected, if anyone can tell me how to properly detect the cable and connection as this is a self powered device which will run off battery / solar power. I've done some research and have a working device but I think my newbish methods for doing things is limiting the speed and using more power than it needs to (logic draws about 60-120mA running full tilt while not connected to USB (no sleep)


Basically I suppose my question is what should I do in addition to this code in order to use Darrels Interrupt system and use the Microchip Bootloader.


The Instant Interrupts modified code, sorry for the long post: