Sajjadkhan
Full Member level 5
- Joined
- Sep 25, 2010
- Messages
- 307
- Helped
- 17
- Reputation
- 34
- Reaction score
- 16
- Trophy points
- 1,298
- Location
- Rawalpindi,Pakistan
- Activity points
- 4,199
Hi All, I wish someone can help me out....
I have started learning PIC so i have written simple program in MickroC 2009 in C for led on/off. The program is simulating fine in "PIC simulator IDE" but when i try to burn it through my G540 programmer it gives the error shown in fig4. May be i have no idea of config bits and there matching is must i think????
Additional: I am using 12 MHZ crystal with 27pF capacitors. But burning is the first issue
void main() {
TRISB = 0;
TRISC = 0;
PORTB = 0;
PORTC = 255;
while(1){
PORTB = ~PORTB;
PORTC = ~PORTC;
Delay_100ms;
Delay_100ms;
Delay_100ms;
Delay_100ms;
Delay_100ms;
}
}
I have started learning PIC so i have written simple program in MickroC 2009 in C for led on/off. The program is simulating fine in "PIC simulator IDE" but when i try to burn it through my G540 programmer it gives the error shown in fig4. May be i have no idea of config bits and there matching is must i think????
Additional: I am using 12 MHZ crystal with 27pF capacitors. But burning is the first issue
void main() {
TRISB = 0;
TRISC = 0;
PORTB = 0;
PORTC = 255;
while(1){
PORTB = ~PORTB;
PORTC = ~PORTC;
Delay_100ms;
Delay_100ms;
Delay_100ms;
Delay_100ms;
Delay_100ms;
}
}