SinelaboreRT Header Logo


It's better when it's simple!

User Tools

Site Tools


DCF77 Radio Clock

In this example a decoder for the DCF77 standard-frequency radio signal is presented. The transmitter is located nearby Frankfurt in Germany and continuously transmits a 77.5 kHz signal that encodes the local time using amplitude and phase modulation. The sender is controlled by the high-precision atomic clocks of the German institute of standards (Physikalische Bundesanstalt in Braunschweig). The signal can be received almost everywhere in central Europe with very simple and cheap receivers. A short description about the motivation and the encoding of the DCF-77 signal can be found here and here.

DCF77 Radio Clock Hardware based on a Texas Instruments MSP430 Eval Board from Olimex

Task of the state-machine

The DCF-77 modulation reduces the signal amplitude for 0.1 seconds (short pulse, 0-bit) or 0.2 seconds (long pulse, 1-bit) at the beginning of each second, allowing to transmit 1 bit of data per second. A simple BCD-encoding scheme is used to transmit the hours, minutes, days, and data information for the next following minute. To allow synchronization into the signal, no pulse is send during the 59th second, so that the start of the next pulse exactly marks the beginning of the minute. The following state machine decodes the received pulses and calles setClock() if the clock/date information was successfully received.

State machine of the DCF77 decoder

The software runs on a MSP430-1232 evaluation board and can be compiled with the IAR KickStart Editon for MSP430. The CPU is normally in low power mode and wakes up about every 5ms triggered from a timer interrupt. Within this timer interrupt the pulse width is measured. If a pulse was detected the state machine is called with event evTick. If the pulse length does not fit the defined limits an evTimingError event is sent. At the end setClock() gets called e.g. to display the time/date on a LCD display.

The complete source code and model file is part of the Sinelabore demo download.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
You could leave a comment if you were logged in.
wiki/examples/dcf77_radio-clock_decoder.txt · Last modified: 2020/02/23 19:27 by pmueller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki