Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

usb programmation error

Status
Not open for further replies.

haroun

Newbie level 2
Joined
Apr 10, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
Hi,
I have a problem in the usb programmation ,
i had built a program in MiKroC that worked perfectly , but when I try it in ISIS this error message appear : " [PIC18EXEC] PC=0xaA5E . Attempt to execute illegal opcode [loaded from Pc=1A5C]. Instruction executes as a NOP ".
The help menu in MikroC about usb didn't work either ,it shows the same error. i used pic 18f4550
Please help me !!!
 

djc

Full Member level 6
Joined
Jan 27, 2013
Messages
399
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
India
Activity points
4,507
It could be because of some of header files in Mikroc which are not valid in ISIS or some commands like NOP.
 

haroun

Newbie level 2
Joined
Apr 10, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
My program :
Code:
unsigned char readbuff[64] absolute 0x500;   // Buffers should be in USB RAM, please consult datasheet
unsigned char 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 communication

  while(1){
    while(!HID_Read())
      ;

    for(cnt=0;cnt<64;cnt++)
      writebuff[cnt]=readbuff[cnt];

    while(!HID_Write(&writebuff,64))
      ;
  }
}
i configure HID terminal and edit project.
Finally, i have built a program in MiKroC that worked perfectly , but when I try it in ISIS this error message appear : " [PIC18EXEC] PC=0xaA5E . Attempt to execute illegal opcode [loaded from Pc=1A5C]. Instruction executes as a NOP ".
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top