hi all, is there a tutorial on this forum for a real time clock on Atmega16? i tried to search but couldnt find it.. thanks
I understand not the need of such a tutorial.
Simple connect a crystal and establish a timer interrupt to get one second ticks, thats all.
On mains powered designs a standard crystal e.g. 11.0592MHz can do the job.
On battery powered designs a second crystal of 32.768kHz may save some power.
Maybe, you should look on the timer tutorial.
i did. i already got the timer working but how do i get it to display the time on an LCD? i am trying to work on a project with an LCD and want to see the time on it.do i have to use the EEPROM/SRAM inside the AVR?
There are at least two typical ways:
1. count seconds (0..59), minutes (0..59), hours (0..23) in separate variables (unsigned char).
2. count seconds as 32 bit variable (unsigned long) and convert it to time/date.
you should found examples on the web for both.
Displaying variables was another task.
E.g. "printf" or "itoa" can be used to do so.
© 2019 Microchip Technology Inc.