Final state-machine implementation for a Casio clock