Radio clock
A digital clock which receives and displays the time from the MSF radio transmission, broadcast from Anthorn, Cumbria (54°55'N, 3°17'W).
The clock is based around a the PIC16F877 microcontroller from Microchip, which performs all of the logic necessary to decode the MSF signal and show the time on twelve 7-segment displays. The circuit consists of four main parts:
1. Power supply:
The circuit is powered by a simple 5V supply using the 7805 regulator IC. The supply uses a 240V 60Hz to 9V 3VA transformer, four 4N1001 diodes in a bridge rectifier layout, a 2200uF smoothing capacitor, and the 7805. The transformer and capacitor are probably rather larger than necessary for this project, since the circuit shouldn't draw more than about 100mA. Update: I've since switched to using an unregulated external AC adaptor to power the 7805.
Clock PSU
2. Display:
Since the PIC doesn't have enough pins to run each of the 96 segments of the display directly, the display is multiplexed. Only one digit is displayed at a time, but the digits are cycled through quickly enough to give the impression of a continuous display. Each digit has a common cathode, and each segment of all the digits a common anode. The eight anodes (one for each of 7 segments, plus the decimal point) are connected via current-limiting resistors to output pins on the PIC. The 12 cathodes are connected to ground through 2N3904 NPN transistors controlled by further output pins, since the PIC cannot sink enough current to connect the cathodes directly.
Multiplexing with PICs is described by Microchip's Application Note AN557, which uses a 50Hz refresh rate for the multiplexed displays. I found this rather flickery, so used an on-time of 1ms for each digit, which corresponds to a refresh rate of about 80Hz.
3. Radio receiver:
The radio receiver and aerial are both commercial units from Galleon designed for receiving the 60Khz MSF signal. The aerial is paired with a capacitor to form a simple LC resonator, the output of which is sent to a receiver module which tunes the circuit further and has a 5V logic level output for the MSF data stream, which is connected (with a pull-up resistor) directly to an analogue input on the PIC. I've found the radio module to be quite sensitive to the position of the antenna and to sources of interference; rather than being the sole source of a time signal, as it is in this design, the module seems better suited to occasionally calibrating an internal real-time clock.
Radio module
4. PIC:
The PIC program source code here, is released under the GNU General Public License; I used the toolchain of MPASM compiler, ICProg and JDM programmer. The program is interrupt-driven, with the interrupts being called at 1ms intervals by an internal timer. The primary function of this interrupt is to execute the display multiplexing code, which illuminates the next digit with the appropriate value. Every 10ms, the A/D converter is initialised and a value requested for the radio receiver output. 5ms later, the A/D conversion has finished and the main part of the code, the decoding of the MSF signal, is executed.
The MSF signal is a serial data stream transmitting two bits per second. The signal is always on for the first 100ms of every second. From 200ms to 300ms, and 300ms to 400ms, there are two data bits, which transmit the date, hour, minute and various other data about the upcoming minute. On the first second of each minute, the signal is held on for 600ms. For the first 600ms of each second, the PIC program reads the MSF signal and stores values of the two data bits. At 750ms, the program then interprets this data, transfers it to memory and waits for the next second to begin. When a 600ms pulse is detected, the data in memory stored over the previous minute is sent to the display to update the minute, hour and date digits as appropriate.
Clock schematic
There are several modes in which the time and date can be displayed, including an ISO 8601-inspired YY:MM:DD:HH:MM:SS, and a HH:MM:SS:hh mode (precise to 1/100th of a second).
Clock circuit board
Update: Reader Colin Manklow has put together a very nice radio clock based on the schematics and PIC firmware on this page:
Colin Manklow's clock
Update (March 2015): Reader Mark has retrofitted a radio clock that he made in the 1980s with the PIC design on this page. At his suggestion support has been added to the source code for LEDs to indicate the day of the week and whether the clock is showing British Summer Time.
Mark's clock

zngsm  -  Mar 22nd 2008, 3:25 PM

I interests your clock project.. i need your source code this MSF clock project...
project good...
best regards.
i wait you
zngsm  -  Mar 26th 2008, 5:22 AM
Large thanks Chris... I processed building your project... Best regards
francis  -  Mar 26th 2008, 2:07 PM
Hi Chris. I am interested in building a version of your project - Can you let me have any more info on decoding the MSF signal? Thanks
Chris  -  Mar 27th 2008, 12:37 PM
Hi Francis. I found this datasheet from the NPL (who broadcast the signal) to be very useful.
Lewis  -  Apr 13th 2008, 7:14 PM
Hi there, i've always wanted to build one of these! Any chance for the source code for the PIC? Many thanks.
zur  -  Apr 15th 2008, 8:44 PM
hello chris.

i interests pic to 7 seg led control hours,min,sec
ahmed  -  Jan 4th 2009, 8:56 PM
that's a great project, but i want to now what's the code which you uesed it at microcontroller which you write??
franklin  -  Sep 10th 2009, 4:10 AM
hi chris..
can you tell me the program that you made in the PIC16f877?
Jonathan Dyson  -  Dec 20th 2009, 9:47 PM
Hi Chris,

Great project. I'm interested in building one for myself with a binary display (just for fun) and would greatly appreciate a copy of your source for the MSF decoding. Would you be so kind?


Mike  -  Dec 23rd 2009, 8:09 PM
Hi Chris,

Your first picture has the radio receiver and ferrite rod outside the main enclosure. Did you find that an additional aerial was required, and if so where/how did you attach it?

I've found that the time can be scrambled as the signal's not very strong without an aerial. Maybe you compensated in the PIC code.

Richard White  -  Nov 6th 2010, 10:08 AM
Hi Chris,
I'm using a basic PLC to determine accurate minutes from a Galleon MSF receiver by identifying the 600mS long pulse. Can I determine the hour start point from the MSF signal using a PLC?
Richard White
nano  -  Nov 15th 2010, 5:46 PM
hello chriss.. good projrct.. please send me your clock source code this MSF clock...
best regards.
i wait you
Chris  -  Dec 27th 2010, 9:42 AM
Looks like a fantastic project - have you a copy of the source code please?
Many thanks
Martin Down  -  Aug 1st 2011, 11:04 PM
Hello, Many years ago I built a digital clock using TTL logic and 7 segment display indicators. A seconds pendulum provides the input. I should like to educate myself, move into the 21st century and modify the clock to incorporate a microcomputer, which would adjust the pendulum length to keep my pendulum clock synchronised with the Anthorn one. If you could send me your program, I believe this would be a great help to me in getting going with the project. Regards, Martin Down
Graham Bindon  -  Sep 25th 2011, 8:06 PM
I am very interested in this project.
Is it possible to obtain commented source code?
Many thanks, Graham
nurfarahin  -  Oct 6th 2011, 10:43 AM
from your circuit given,can you pls tell me ur coding for microcontroller for this project?
Chris  -  Oct 12th 2011, 10:26 PM
Source code is now available - see the link in the article.
Johann Caubergh  -  Nov 14th 2011, 11:43 AM
Dear, if you are Christopher Johnson, the same on with Face Recognition, can you contact me on s kype qisqibiometrics or mobile +32479541722 or my email. looking forward.
Francis  -  Feb 23rd 2012, 11:43 AM
Just wondering, why is the receiver module tested from an analogue input, why not just a schotty digital input?
Is the output range too variable for accurate TTL input levels?
Chris  -  Feb 24th 2012, 12:26 PM
Frances - I can't recall why I used an analogue input (it is getting on for 10 years since I designed it...). The output of the radio module is not rail-to-rail, but exactly what it did was not very well documented - and without an oscilloscope I had no way of measuring it. I think just used an analogue pin on the basis that I could cope with any output levels just by changing the software thresholds. In retrospect I think a Schottky pin would have worked OK too.
Kevin  -  Jun 9th 2012, 1:35 PM
Hi chris,
What a great project, the dual displays look really good. What sort of options did you incorporate within the software. I also noticed you have two buzzers connected, what is connected to BC108?.
Chris  -  Jun 9th 2012, 2:41 PM
Hi Kevin. Thanks for your kind words. The component connected to the BC108 is an electromechanical buzzer that I was planning to use for an alarm. Unfortunately the radiation generated by the buzzer tended to interfere with the radio, so I disabled that part of the circuit. The software is very simple and just allows switching between four display modes (various combinations of day month year, hour minute second, tenths and hundredths of seconds across the 12 digits), and, when the alarm was present, options for setting the alarm time.
Fergus Graham  -  Sep 11th 2014, 9:00 PM
Hi Chris... I 'm interested in building your project, I'd love to have a look at your code as I can then try to write it in PICC as a C-Code learning exercise.
Kind regards, Fergus.
Bob Lilley  -  Jan 26th 2016, 7:01 PM
Hi Chris, the link to github seems to be broken. Is the code still accessible elsewhere?
colin manklow  -  Nov 27th 2016, 2:27 PM
Hi Chris can you please send me the ASM file for your clock. i built this some 2/3 years ago from 2 chips that i sent you.

Iain Diccox  -  Nov 9th 2017, 2:44 PM
Hi Chris, I'm considering building your kit, but I live in South Wales and seem to have MSF signal reception difficulties with an Acctim analog radio clock that I have. I suspect that I may have the same issue with this device. I need to expand the functionality to provide serial time output for synchronizing a PC - any ideas? Alternatively, GPS time references, (eg, <a href="">TimeTools T100</a>) seem to be cheaper than they used to be, and may be a better option. Have you considered a GPS version of your clock?
Iain Diccox  -  Nov 9th 2017, 2:48 PM
Hi Chris, I'm considering building your kit, but I live in South Wales and seem to have MSF signal reception difficulties with an Acctim analog radio clock that I have. I suspect that I may have the same issue with this device. I need to expand the functionality to provide serial time output for synchronizing a PC - any ideas? Alternatively, GPS time references, eg: seem to be cheaper than they used to be, and may be a better option. Have you considered a GPS version of your clock?
Add a comment:
E-mail (optional, will not be published):
Anti-spam measure: