Maker Pro
Maker Pro

Timer0 16 bit mode in the pic18f4550

Hi all
I have write a program as below. using MIKROC FOR PIC compiler, i configure for microcontroller is 16 bit mode, but when simulate by ISIS it is not operated in 16 bit mode.
do you know why? please explain me why?
Thanks
/////////////////
unsigned short cnt;
void interrupt()
{
cnt++;
INTCON = 0x20; // Set T0IE, clear T0IF

}
void main()
{
cnt=0;
trisb=0;
portb=0;
t0con=0x08;
tmr0h=0x00;
tmr0l=0x00;
intcon=0xa0;
tmr0on_bit=1;
while(1)
{
if(cnt=10000)
{
cnt=0;
portb=~portb;
}
}
}
 
Top