TIMER And COUNTER Of AVR (ATmega16)

timer

___________________________________________________________________________________________________

 



  • What is Timer ?-  Timer is used to calculating the amounts of time between events.

timer

  • What is Counter ?-  Counter is used to count external events.

31fbm4j8tqL

 

  • About Timer & Counter-  Timer is fully depend upon the oscillator that attached externally to the microcontroller because it uses the frequency of oscillator to operate. When we trigger timer it start from initial value and run up to decided value stored by user in special function registers. When it reach its maximum value, it overflows and a certain bit is decided to show over flow in SFR(special function register) also called flag bit. Some timers also used prescalar technique to enhance its limits. ATmega32 contain three timer/counter T0, T1 and T2 which is of different size 8 bit and 16 bit. Maximum value that can be achieved by timer is depending upon its size. Suppose a timer is of 16 bit so it can achieved up to = 65536
  • Applications- Generating rectangular pulses (signal modulation), Watchdog timers, Counting objects, Measuring intervals, generating delay, etc.

 

Click Here : understanding of timer/counter as program point of view

1.CREATING A SQUARE WAVE OF 100 MS USING TIMER 0  OF ATMEGA16

CREATING A SQURE WAVE OF 100MS USING TIMER 0 OF ATMEGA16

 1. CREATING A DELAY OF 1 SEC USING timer of ATMEGA 16

 

PROTEUS File for SIMULATION(Password Of RAR file is :-firmcodes.com)

download (1)

____________________________________________________________________________________________________

2. CREATING A SQUARE WAVE OF 100 MS USING TIMER 0 OF ATMEGA16

 

PROTEUS File for SIMULATION(Password Of RAR file is :-firmcodes.com)

download (1)

____________________________________________________________________________________________________

Content for the tab VIDEO