Create a realtime timer on ATMega8535

Sponsored Link :

. .


timer digital 300x225 Create a realtime timer on ATMega8535

timer digital

To create a realtime timer, realtime microcontroller is not required (RTC). You only need a crystal and a timer prescale settings. for example, if used for 8MHz crystal, then choose the timer prescale of 8. Prescale is a divisor which will be conditional on crystal beats as needed.

timer frequency = frequency of crystal / prescale

so,

timer frequency = 1MHz

since T = 1 / F, then

T = 1US

This means that every single wave oscillation takes 1US.
To simplify the calculation, the timer0 registers (TCNT0) shall be 155. TCNT0 then oscillates between 155 to 255. so that any overflow occurs, the timer has counted 100us. when made variable “x” to be in increments of each of the Overflow occurs when x = 10, the timer value is 1ms. and if each x = 10 will raise the value of variable “y”, then “y” is the timer value in ms. (In experiments conducted used ATMega8535 with 8MHz crystal).

Keyword :
microcontroller ,project ,target ,programmer ,microcontrollers ,interface ,implementation ,how to ,download ,design ,controller ,circuit ,avr studio ,avr microcontroller ,atmega ,atmega ,atmega ,application note ,student ,software ,site licence ,sensor ,picmicro microcontrollers ,formula ,flowcode ,electronic systems ,eeprom ,education version ,driver ,debugging ,datasheet ,bluetooth ,atmega ,arduino ,application.


admin tagged this post with: , , , , , , Read 322 articles by

One Response to Create a realtime timer on ATMega8535

  1. arsalan says:

    pleas download realtime timer on ATMega8535+source code and schematic

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Select Category