AN UNUSUAL CLOCK
This is an unusual type of clock. Twelve LED's are arranged every thirty
degrees on a three inch diameter circle. As you look at the clock, most of
the LED's are on. The brightest represents the hour. A blinking one shows
the multiple of five minutes count. The others are lit but dim to show the
hour positions in the dark. As minutes pass by, LED's clockwise from the
blinking one will successively go dark representing an additional one to four
minutes. The hour position does not go dark.
The circuit is quite simple. Anodes from the LED's are connected to PIC16F84
pins RB0 - RB7 and RA0 - RA3 through IK resistors. They start at 12 o'clock
and run clockwise viewed from the front. MCLR and RA4 are pulled up to +5
volts through 10K resistors. RA4 is also connected to ground through a
normally open SPST pushbutton used to set the time. A 4 Mhz crystal is
connected across OSC1 and OSC2 with small capacitors, (33 pf or so), to
ground.
To set the time, push the button and hold until the lit LED moves to the
desired hour position. Release the button and press again within two
seconds. Hold the button down until the LED moves to the correct multiple of
five minutes. Seconds and additional minutes are reset to zero so time your
setting to fall on a five minute interval.
***
<< You can extrapolate assembly listing and use Your favorite pic® assembler or
IDE cad software >> ( by zantaz® sep 2013 )
***
Timer zero is used for timing. With a prescaler division of 1:16 it rolls
over about ever 4 milliseconds setting the T0IF flag. Interrupts are not
used but the flag is polled and cleared with the counter TICKS decremented
at each timer zero overflow. 244 ticks add up to almost exactly one second.
Slight additions are made when counters for minutes, 5 minutes and hours roll
over. The result is a quite accurate clock.