example:-
For TMR0H = B8 and TMR0L = 3E,
calculate the delay generated.
Assume XTAL = 10MHz.
Answer:-
NOC = (FFFF – B83E + 1) = 47C2 (hex)
47C2 (hex) = 18370 (dec)
Delay = 18370 x 0.4μs = 7.348ms
OR
NOC = 65536 – 47166 = 18370 (dec)
Delay = NOC x T x Prescaler
= 18370 x 0.4μs = 7.348ms
-35-