Clock project with PIC16F873

t06afre

Joined May 11, 2009
5,934
Think as TMR1H and TMR1L as the counter value itself. If you read from TMR1H(L) you will transfer the current counter value to some other register. If you write to TMR1H(L) you will update the counter value. And the counter will on next itteration count from the updated value.
 

Thread Starter

ecka333

Joined Oct 1, 2009
76
So i must exactly calculate instructions times, if i want to get 1 sec interrupt, or not? Can you write program example for 1 sec interrupt?
 

t06afre

Joined May 11, 2009
5,934
In the part of your ISR there you handle the Timer1 interrupt you write 0x80 to TMR1H as the first thing. Have you tried this?
 
Top