• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

maximum time delay using timer interrupt of timer 1 of 8051

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?

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
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???

Latest threads

EE World Online Articles