How do I make a AM , PM clock
-
- Posts: 2
- Joined: Thu Aug 03, 2006 8:37 pm
- Contact:
-
- Posts: 3
- Joined: Wed Aug 23, 2006 11:47 pm
- Contact:
-
- Posts: 110
- Joined: Thu Sep 29, 2005 10:53 am
- Location: Matrix Multimedia
- Been thanked: 1 time
- Contact:
The Timer macro is called at so many times a second e.g 75 times a second or 75Hz.
The prescaler and crystal clock frequency allow you to set the refresh rate to a useable time period such as 75hz that you use.
Count to 75 in the timer interrupt macro and a second has passed.
Update the seconds minutes hours etc. .
The main program can display the time and check for inputs.
12 or 24 hour clock is simply a way to display the 24 hours.
The prescaler and crystal clock frequency allow you to set the refresh rate to a useable time period such as 75hz that you use.
Count to 75 in the timer interrupt macro and a second has passed.
Update the seconds minutes hours etc. .
The main program can display the time and check for inputs.
12 or 24 hour clock is simply a way to display the 24 hours.