Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[PIC] MicroC USB library Example shows problem.

Status
Not open for further replies.

chandresha1

Member level 2
Joined
Dec 4, 2010
Messages
43
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Bremen, Germany
Activity points
1,673
Hello,

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.
 

Would you please show the code you are trying to build.. And Exactly what's the error code you are being viewed by MikroC...!

- - - Updated - - -

Would you please show the code you are trying to build. And Exactly what's the error code you are being viewed by MikroC?
 

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


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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));
  }
}



start1.png

Bug_report.png

I can build it successful. But the moment i press "Start debugging" i got this error.(Attached files)
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top