piclist 1997\09\10\164006a >
Thread: Decimal clock (maths problem)
www.piclist.com/techref/method/math.htm?key=math
picon face BY : Steve Smith email (remove spam text)



In a moment of wild abandon a party piece was conceived :-

       THE DECIMAL CLOCK

The basic code is simple and published in the ECH this can easily be
converted for the decimal clock see table:-
dec time        conv time       periods
1       1       day
20      24      hours
2000    1440    minutes
200000  86400   seconds
       relationship    2.314815


The problem arises when the ability to convert or count in conventional time
as well is also required. The conversion factor for the seconds count is not
good 'easy' math's and this forced a serious overload in the thinking
department. The basis is the '57 based alarm clock as the app note driving
multiplexed LED display and keyboard. If the crystal is recalculated to
operate the decimal clock accurately then the problem becomes clear. How do
you keep track of time using the same timebase with only the limited amount
of RAM that the '57 contains? Duplicating the RAM registers I think is OK but
how do you process the number of counts to increment both time periods
accurately. The clock is not using interrupts as it waits in one location for
TMR0 to roll over this then causes a counter to increment and handle the
other functions display keyboard alarm ect. Can anyone help with this
perplexing problem please .....

Cheers Steve.....
<970910163025_-533350616@emout10.mail.aol.com>

See also: www.piclist.com/techref/method/math.htm?key=math

Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Decimal clock (maths problem)

month overview.

new search...