Guys,
Here's the bootloader code for the PIC18f14k50.
http://www.sethmods.com/downloads/USB_Bootloader_18F14k50.zipIt came directly from Microchip. I don't exactly remember what tweaks that I made to compile it. I want to say that I had to register for the evaluation version of some C Compiler to optimize the code to compile in a small enough space to fit on the chip.
If RA3/MCLR is not held low during power-up then the chip jumps to 0x1000. At 0x1000 you should jump over the interrupt vector to the main code. I usually jump to 0x1030 and start the main code there. The interrupt vector is 0x1008 I believe.
If RA3/MCLR IS held low during power-up then the chip goes into the HID USB Bootloader code. From there you just hook the chip/controller to your computer and program via Microchip's HID Programmer. I'll see if I have a generic copy that I can
Here's the Windows App. Again, default Microchip.
http://www.modmyprogram.com/HIDBootLoader.zipCaution!!!: If you have an 18F14k50 with HID Bootloder code and you overwrite the code with code that starts before 0x1000, YOU WILL BRICK THE USB BOOTLOADER CAPABILITIES!!!!
[gmod]please use the edit button[/gmod]