
Note that there are four versions of the software:

04120217A - for clocks with stepping hands and using the micro-USB serial adaptor
04120217B - for clocks with stepping hands and using the PICAXE serial adaptor
04130217A - for clocks with sweep hands and using the micro-USB serial adaptor
04130217B - for clocks with sweep hands and using the PICAXE serial adaptor

This is necessary because the serial signals need to be inverted when using the
micro-USB serial adaptor (TTL-level) rather than the PICAXE adaptor (full swing).

-----------------

This software has been modified by SILICON CHIP staff 24/01/2017 and the version
number bumped to 1.1 in order to set the baud rate for both GPS and PC
communications to 9600 baud (primarily to suit modern GPS modules) and to drive
pins 15, 17 and 18 (outputs RA0, RA1 & RA6) in parallel to control the clock motor.

It was further modified on 15/03/2017 and the version bumped to 2.5/1.2 to fix
a bug which caused one or more of the clock motor drive outputs to fail to switch
state correctly.

For notes, errata and updated firmware for this project please visit:
      http://geoffg.net/GPS_Synchronised_Clock.html

Generally software of this complexity will have a few bugs and as they are found 
and fixed the replacement firmware will be posted on this site.


Changelog (pre-v1.0):

Bug fixes:
* Modified to remove the chance that an interrupt might change variables while the mainline code
is using them.

New features:
* Modified to drive continuous sweep hand clock movements. Accordingly this version must be
used with modified controllers as described in the November 2009 issue of Silicon Chip.
* The clock is started by setting the hands to exactly the next hour or half hour and inserting the
batteries. The clock will wait until the correct time and then automatically start running.
* The Setup button can be pressed (while the clock is running) to force an immediate
synchronisation using the GPS. Note that the button needs to be held down for a couple of
seconds.
* When the clock is running and it successfully synchronises via the GPS the startup LED will flash
once. This is of dubious value as the clock will spend most of its time with the controller board
hidden, but it may be useful if you used the Setup button to force a synchronisation and wanted
to check the result.
* If the battery is flat the clock will stop at exactly the hour of half hour. Before you replace the
batteries you need to position the hands at the next hour or half hour.
* If the GPS module is completely dead, the microcontroller will retry 10 times with a delay of 4
hours each time before stopping at 10 minutes before the hour or half hour.
* If the GPS module cannot lock onto enough satellites it will retry 10 times with a delay of 4 hours
each time before stopping at 5 minutes before the hour or half hour.
* The setup menu has an additional option to manually run the clock for a specified amount of
time. This enables you to easily test different values for the clock pulse width.
* While the clock is waiting to start (after the batteries have been inserted) you can press the setup
button to force the clock to run. This is a handy way of getting the second hand to the exact
12 oclock position.
