I am newbie in USB PIC programming. I am simple trying USB example given in MicroC USB library. I can easily "Build" this example. But whenever i try to "Start Debugger" it shows some application Error. I have also included descriptor file in my project.
Actually i wanted to make DAQ board for labview by using PIC18f4550 through USB communication. so just for beginning i want to simulate USB communication in proteus. Here is my code.(From USB library)
Crystal freq=12Mhz
unsignedchar readbuff[64] absolute 0x500;// Buffers should be in USB RAM, please consult datasheetunsignedchar writebuff[64] absolute 0x540;char cnt;char kk;void interrupt(){
USB_Interrupt_Proc();// USB servicing is done inside the interrupt}void main(void){
ADCON1 |=0x0F;// Configure all ports with analog function as digital
CMCON |=7;// Disable comparators
HID_Enable(&readbuff,&writebuff);// Enable HID communicationwhile(1){while(!HID_Read());for(cnt=0;cnt<64;cnt++)
writebuff[cnt]=readbuff[cnt];while(!HID_Write(&writebuff,64));}}
I can build it successful. But the moment i press "Start debugging" i got this error.(Attached files)