Page 1 of 1

TMR0 interrupt on 16F886

Posted: Wed Aug 27, 2008 10:44 am
by Mark
Hi there,

I have tried to implement a simple timer 0 interrupt on a 16F886, identical to one that works on a 16F876 and it does not work. In simulation it works but rather slowly.

Please confirm that you can get it to work on the chip.

thanks,

Mark

Re: TMR0 interrupt on 16F886

Posted: Wed Aug 27, 2008 12:46 pm
by Benj
Hello Mark

In the Timer interrupt properties can you make sure that the clock sorce is set to CLKO and not T0CKI pin. The T0CKI is an external input that can act as a clock for the timer if you wish but the CLK0 is driven directly from the internal program frequency clock (Crystal Frequency / 4) / Prescaler.

Re: TMR0 interrupt on 16F886

Posted: Wed Aug 27, 2008 6:30 pm
by Mark
Benj,

Yes, thanks for the suggestion, my Idiot mistake.
(of course the form still says that interrupt is at a given frequency even when an external input is chosen)

Thanks a lot for the quick response, the error had been bugging me for days.

Thanks,

Mark