Timers in AVR ATMEGA32

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
rags
Posts: 29
Joined: Thu Dec 22, 2011 5:33 pm
Has thanked: 1 time

Timers in AVR ATMEGA32

Post by rags »

hello sir,

my project is to start a timer untill i recieve a high pulse in any of i/o port, and print the timer value in a 16x2 lcd

am thorough with LCD but can any one guide me with timers pls??

thank you
ragesh

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: TIMERS IN AVR ATMEGA32

Post by Enamul »

Hi,
Here I put LCD and TMR/COUNTER1, as you said the LCD will print time when sw goes high...But the issue is with internal 4MHz clock the TMR1 overflows very quickly...so you can't display TMR register contents as that will be meaning less...that's why I have printed TIME value every time you press the sw....so by knowing the interrupt occurring time, value in LCD you can determine the time elapsed...Elapsed_Time=TIME*INT_TIME
Hope this will be a start :)
Attachments
AT32.fcf_avr
(11.6 KiB) Downloaded 300 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Timers in AVR ATMEGA32

Post by DavidA »

Hi rags,

Please stop making topics with All caps titles.

Post Reply