How do I make a AM , PM clock

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Posts: 2
Joined: Thu Aug 03, 2006 8:37 pm

How do I make a AM , PM clock

Post by VirusAlert »

any ideas?

User avatar
Matrix Staff
Posts: 3183
Joined: Tue Jan 03, 2006 3:59 pm

Post by Steve »

Use the TIMER0 interrupt with a suitable crystal clock frequency and prescaler. Update the timer info in the TIMER0 macro, and repeatedly display the time within your main routine.

Posts: 3
Joined: Wed Aug 23, 2006 11:47 pm

Post by rrwoods1978 »

Can we get that in English please? If we don't even know how to make a clock, then I am thinking we are pretty new to this.

I need to make a standard 12 hour clock with am & pm functions and alam. Also need a way to set the time and alarm using the switch board.

Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia

Post by Ian »

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.

Post Reply