G3Cube,
Here's a PIC based Clock I'm workin' on... I hope it may give you some ideas...
It uses a 20-MHz xtal time-base and you can adjust the timer routine in software in plus or minus 200-nsec/second increments (theoritical accuracy to within 6.3-sec/year) instead of using a hardware oscillator trimmer capacitor... Lower switch functions are 'long' 1.5-sec switch presses compared to 'short' switch presses for the upper functions... You get a single short beep when you press a switch and two short beeps when you've held it for 1.5 seconds... Switch LEDs flash for 'long' functions and return to the 'short' switch state (on or off) when you press the switch to turn off the 'long' function... Confusing, isn't it? In reality it's pretty intuitive (grin)... The rotary encoder has 'detent' positions and provides a very nice feel when you rotate it to select the display mode (CLK, ALM, TMR or CAL) or when you rotate it to adjust settings after pushing and lighting the SET switch... In SET mode you adjust settings of the blinking display group (Hours/Days, Minutes/Month, or Seconds/Year) by rotating the encoder and you switch blinking groups by pressing the built-in push-button switch on the encoder... PWM brightness or 'level' control from 00% (off) to 100% (full brightness)...
Kind regards, Mike - K8LH
**broken link removed**