The PIC that controls the timer can be reprogrammed either in an external programmer or in-circuit using the connections available from CN6. This allows you to add your own functionality to the timer or use the hardware as a platform for your own projects.
If you want to share your mod with the world then email me and I'll add a link to your site, or host your mod on this site. Bugfixes or mods that don't require additional hardware can be emailed to me and I'll add them to the main software release.
Source code
Download the source code
The zip file contains the following files:
alarm.asm - alarm setting functions
clock.asm - clock setting functions
countdown.asm - count up/down setting functions
delay.asm - delay functions
display.asm - handle the display for each mode
initialise.asm - initialise the hardware and variables
interrupts.asm - interrupt handler: 100Hz events, make alarm noises
keyboard.asm - scan keyboard, validate time and alarm values
maths.asm - multiplication and division routines
multiplexer.asm - display multiplexer, called by 100Hz interrupt
tables.asm - keycodes, LED bit patterns, time/alarm maximum digit values
timer.asm - main asm file, main program loop, vectors
macros.inc - some useful macros
system.inc - system config flags, RAM variables, constants, pin definitions
Just compile 'timer.asm' and the other files are included with it.
Compiling the code
The following development environments are available for free. They will allow you to build the source code and produce a .hex file that can be loaded onto the PIC microcontroller.
Programming
The PIC can be removed from its socket for programming, alternatively it can be programmed in-circuit via connector CN6. In-circuit programming is much faster than having to remove the PIC from its socket each time, and also reduces the risk of damage to the PIC and the socket by repeated extraction and insertion. The connector provides direct connections to the PIC programming pins with no diodes to isolate it from the rest of the circuit (see the
schematic) so it may not be suitable for all programmers. To choose a programmer, a
Google search will turn up many commercial and DIY programmers for the PIC16F72. As an example, this range of programmers from
Quasar Electronics in the UK are suitable.
I made a simple plug and socket for my timer and programmer out of a SIL socket strip. These plug in to themselves allowing me to make a plug for my programmer (a Quasar
3149) to connect directly to the board. Here's an example of a programming connection to the timer:
 SIL socket |
 SIL socket mounted on the board |
 The SIL sockets connect with themselves so can be used to create a plug for the programmer |

The final in-circuit programming setup.