maximum time delay using timer interrupt of timer 1 of 8051

Status
Not open for further replies.
i came to know that 8051 get interrupted whenever the timer overflows.. ie TF flag is set
so if i use MODE 1 timer one... the maximum delay after which MCU get interrupted comes out to be 71 ms approx(65535*1.085 micro sec)

so what if i need an interrupt delay more than 71 ms say i want an interrupt after 1sec? how it will possible?
 
I normally set a variable to increment when the timer reaches a certain value..

setup the timer for 50mS and when the timer overflows increment the variable..

pre-load the timer so it fires at 50mS... In the interrupt preload the timer again and increment the milli second var.. when it reaches 20 then you will have reached 1 second...


What crystal are you using.. can I assume a 12Mhz???
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…