croberts
Nice design, Nice and simple.
Pin 3 on the mpu, A very small change to dual purpose the board, I like it.
=====
Now using croberts circuit as a reference, If you have software space left, what changes could be made in the hardware to add more capabilities?
One of my clocks has two buttons, one for forward in time, one for back in time, Holding the button down makes the time change faster.
The Two buttons makes setting the clock nice and quick.
Some other ideas also need more switches, and switches can bounce.
So can you see some simple hardware changes to add more switches to croberts's circuit?
What would happen if instead of connecting a switch across pins 1 & 2 of JP1 or JP2 and you connected it to pin 1 and the collector of one of the transistors T1 -T5?
You could read the switch state just before you turned off the transistor it was connected to.
There are four more transistors, so you could have 5 switches where you did have one.There is a problem with this if you press 2 or more switches at the same time as it would mess up the display, BUT there is a simple fix also of just putting a diode in-line with each switch. And with that diode in-line with switch you could have a Alarm-On switch with out problems.
So the question becomes,
Do you want more switches and if so, do you have a little space for software & is a switch and diode to much cost.
Software switch DE-bounce.
Now you could get cheaper switches that could bounce to cut costs if you had a little more software space. Some of the little mpu's are really lacking in ram space, so it could be a good idea to keep that use low when adding de-bounce. So if you had a byte sized integer, That was positive for switch pressed and negative for not, that would be nice When you read the switch status you could increase/decrease this integer until you reached a display scan count that would cover switch bounce time. So if this integer is 1 to display scan count, the switch is pressed and if 0 to -display scan count it is not pressed.
So applying this to your clock
4 digits = 4 pins
5 tactile push spst = 5 pins (each one has a different function)
becomes
4 digits = 4 pins
4 tactile push spst = 1 pins (each one has a different function) connected via a diode to digits pins.
For a savings of 3 pins at the cost of a little more software and 4 diodes.
EDIT:
croberts
In addition to switches, You could use this idea to add a zero cross ac input and/0r a one pulse per second input to your clock. Just gate the signal with the proper digit signal and diode in logic output.
C