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
Timers in AVR ATMEGA32
- 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
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
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