Chess is a game whose origins no one can say for sure but it seems that they were born more than 2000 years ago in india.
Of course, over time it has evolved and were drawn up new rules.
The result is the need for a watch that had to count the time used by each one of the two players.
The hourglasses were first used but very imprecise and a source of dispute.
In 1883 he made the first apparizzione a oroligio, rather two, grandfather who, with their inclination not allow the simultaneous use.
From then on there was much more functional versions and reduced measures. Even today, using a mechanical orologgio with two quadrants operating a swinging lever allows the use of only one quadrant at a time. But in the era of consumer electronics now they were born so many electronic clocks that automatically perform various phases of the game.
In fact, besides the game for amateurs where there is a time within which the game has to end, in specific circles using the most rigorous and complicated methods.
In anycompetition and the players have a certain time within which they must have carried out a specific number of moves. Sometimes it is made available an additional time for each move made. Honestly, I did not understand much every chance that a discrete digital clock must be provided. However, being only a software problem everything is easily editable.

Now to my chess clock. It is not comparable to professional products, but can be helpful for those who can not afford them.
The wiring diagram is close to the bone. The pic used was the first one I found in the drawer, It has no special features and clock time, It is formed from quartz frequency with its precision and its thermal drifts. For visualization I used a handy MAX7219, Also this already at home, so I got out of the way having to turn on the LEDs directly from the pic and a greater number of components.
To power all I used a 12V power supply bringing the 5V voltage regulator with a common.

The whole is mounted on a breadboard because something I have not told you yet, I do not play chess, I did it just to push the idea read in a discussion forum. You see who .

The Filmware I tried to comment as much as possible, I do not often.
As you have seen from the diagram, there are three buttons that have different functions depending on the switching state.
The two side buttons are used, in State of Play, to pass the opponent's hand and when the respective LED is not lit., to learn the moves made. In setting status instead increase and decrease the selected value.
The central button instead has various functions and serves to stop or restart the time with a simple pressure, start the game holding it down for about 2 seconds and enter the settings menu by holding down 5 seconds.
The settings menu is what determines how it should run the clock.
They are set 3 values:
1) the hours of game time,minutes,seconds.
2) The time bonus that is granted to every move, at most 90 seconds.
3) the number of moves they have to do within that time, maximum 999.
As a common rule is that light up the dots in the figure that is changed.
The clock on the right indicates the first digit of the period of play, at most 5 , followed by a sign -, indicating what is set. If you find the second display shows the playing time, the bonus in the third and fourth the number of moves.
Let's see how to set the playing time.

settings 0 ore

Initially, the period is indicated 1 and the hyphen will be in the second display.
The display on the left appears instead the time previously recorded.
The LED is mounted between the two values ​​is then turned on will be present the hours and the minutes, but the dots are lit only on the hour digits. By pressing the external buttons, ones to pass your opponent's hand, It increases or decreases the value. If you stay with the pressed key figures are advancing quickly. With the central key to accept the digit and move to the next or the minutes.
The LED in the middle of the figures is turned off and displays the minutes and the seconds.

settings 5 minutes

settings 10 seconds

You can change the value in the same manner or ACCEPT the value with the middle button.
Same thing for seconds and once accepted is switched to the value of the bonus highlighted in addition to the number of digits from the dash also lit in a different position on the right of the display.
Set Bonus, a value 0 It means no bonus, It is passed to the number of moves.
In the same manner and same way to set, also the value here 0 It means any control of the moves.
Accepted the number of moves you pass the time 2 that is executed when the time in the period 1 is terminated or have been reached on the number of moves set in the previous period.
To set values ​​are valid for the period rules 1. To be specified that the time is added (It will be fair??) that the bonus is replaced by the new value, and that the number of moves is total or not is added to the previous one and does not reset the count.

second period

If you do not want to use the period and his later just set in 0 both the hours and the minutes and the seconds the program will exit the settings menu and stores the new values.
at this point you are ready to initiate a challenge, just press the stop button and begin to make their moves through the game to the opponent by pressing the right button until Checkmate, or checkmate the king?.

Flag, time run out

I hope someone is interested in this watch and if there are imperfections are always willing to change the filmware.

Good games Marcello

i file:



The hex file