Hey Simon
First of Thanks for the tutorial for building a PIC18F USB device.
I build the circuit displayed in this article
http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device. I had to use a PIC18F4455 instead of a PIC18F4550 as it was all I had lying around.
Ok so after opening the firmware almost all the files where missing, I linked them all from the C:\Microchip Solutions v2011-07-14\Microchip\USb or INLCUDE directories. Is this right? The only example for a PIC18F4455 only contained the usb.h file.
So after this trying to compile gives me the next error telling me there should be a /USB folder in my project file with all the header files in. I then created the file and added the same files I linked to the missing files.
I proceeded to replace the link file with the link file for the 18F4455 in C:\Microchip Solutions v2011-07-14\USB\Device - Bootloaders\HID\Firmware - PIC18 Non-J\ .I then added the code to the main.c file to allow a 18F4455 pic and added to the linking string in the project option->MPLINK the "/p18f4455" variable. this yielded the following error.
Error -section '. code_usb_device.o' can not fit the section.Section '. code_usb_device.o' length = 0x000013ac
I reverted back to your linking file and changed the lines
Code:
//FILES p18f4550
FILES p18f4455
// And the following line
// CODEPAGE NAME=page START=0x102A END=7FFF
CODEPAGE NAME=page START=0x102A END=5FFF
After this project compiles I load it onto the PIC,verified it and then If I plug it into either my XP or Win7 Computer it doesn't detect the device. I have checked the circuit a few times unless the breadboard is broken it is fine.
I assume I did something wrong with the linking file. Could you please advise on how I can fix this.
Thanks in advance
Overklog