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
VirusAlert
Posts: 2
Joined: Thu Aug 03, 2006 8:37 pm
Contact:

How do I make a AM , PM clock

Post by VirusAlert »

any ideas?

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

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.

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

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.

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

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