-->

Timer

By

Timer 

What is a Timer ? 

A Timer is device it sense the time interval and produce an output at a set value . example alarm Timer setting.(Timer in Wikipedia )


,What is the need of a timer in Micro controller ?
1) Some time  micro controller Code need some accurate  Delay  ( Example blinking An LED in each      accurate 1 sec. Look LED Blinking example

2)Some Time the code needs the code Repeat

3) Most of the Interfacing devices with micro-controller needs a clock (accurate interval of clocks)
   Example:   LCD module require Clock  Signal Look LCD Interfacing
               

Timer in 8051

Also a Timer actually require a clock pulse  (pling) .These pulse are given from controller  (actually it is in software based not giving ) see below picture
8051 type controller has  two Timer Timer 0 and Timer 1 (These two timer is the length of 16 bit ,0000 to  FFFF ).These Timer is named as TR0 and TR1. 



The Timer Setting/configuring  can controlling by the TMOD register 



These TMOD register Values is used to decide how the Timer Works .
Sample program




download the fullcode and Test

More Posts

gElectron. Powered by Blogger.

Contributors

16x2 LCD Interfacing with STM32,STM32F103C6

 16x2 LCD  Interfacing with STM32,STM32F103C6 lcd_init(); LCD_LINE1; lcd_String(" GeElectron"); LCD_LINE2; lc...

Contact Form

Name

Email *

Message *

Contact us

Name

Email *

Message *

Follow Us

https://www.facebook.com/gElectron-393939667321867/ FBbox/https://www.facebook.com/IVYthemes

Comments

[blogger]

MKRdezign

Test
google.com, pub-8429441124104529, DIRECT, f08c47fec0942fa0
[blogger]

Latest

[recent][newsticker]

Technology

Top Ads

RECENT COMMENTS

Subscribe Via Email

Subscribe to our newsletter to get the latest updates to your inbox. ;-)


Your email address is safe with us!

RECENT COMMENTS