This code is for PIC16F876A with 20Mhz crystal to learn using Timer0 .
I am getting the following error in mikroc Pro:-
Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void main(){unsignedchar count;
TRISB=0;
TMR0=0;
OPTION_REG=0B00001000;
PORTB=0x00;while(1){if(TMR0IF){//<---------no error here
count++;
TRISB=count;
TMR0IF=0;//<----------Error : Assigning to non lvalue "TMR0IF" but no error if I write INTCON.TMR0IF=0;}}}
Why TMR0IF=0; giving error?
Also please suggest some site/blog to learn 16F87Xa timer0 programming