Page 44 - DEC40053 Ebook_Timer
P. 44

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-
   39   40   41   42   43   44   45   46   47   48   49