with Excel 97 Work Sheet for
Available Microchip PIC Assembler Source Code
Precise time is always a nice feature. In Europe, we have a public RF transmitter located in Mainflingen, Germany, providing standardized time information at 77.5 kHz. A cheap DCF77 receiver unit translates the RF data into PWM. A PIC 16F84 microcontroller performs software-based PWM decoding and transmits the data through RS232 to a PC with dedicated Excel 97 work sheet. The Excel 97 work sheet is able to acquire and log RS232 data, and also visualizes and translates complete DCF77 frames. A complete DCF77 evaluation setup is created.
See also the short technical introduction to
The receiver has been ordered by Conrad Electronics, 92240 Hirschau, Germany (www.conrad.de)
based on Temic 4224 DCF77 IC
This unit performs the translation from 77.5 kHz RF to DCF77
PWM data. The information is encoded as follows: Pulse of 0.1s =
0, 0.2s = 1, numbers are encoded in BCD (binary coded
For detailed information, please refer to this document or the data sheet section.
1 - GND
For best reception, the Ferrit-antenna should be positioned
rectangular to the direction of Mainflingen, Germany, the
location of the DCF77 transmitter.
This picture shows the test setup with DCF77 receiver unit at the lower right corner. The LCD display serves only for debugging purposes and is not used within this project. This setup consists of DCF77 PWM bit stream decoder, PIC 16F84 microcontroller, and MAX232 level shifter for serial transmission.
A second view on my standard PIC 16F84 test board. On this
setup, I only use serial transmission, no reception. At the upper
left corner of the picture, you can see the RS232 to USB1.1
converter, which I bought because my Laptop has only a single
serial port. It works astonishingly well and entirely transparent
to all my software. That's what I like - and expect from quality
Screen shot of Excel 97 based DCF77 Visualizer
This is the graphical user interface of my Excel 97 work sheet
designed to visualize and translate received serial DCF77 data
from the PIC microcontroller. You can see two valid DCF77 data
frames, each of them containing 59 bits of information. Every
frame is enclosed with marks of value 2. Reception and decoding
is done using Visual Basic macros. I used serial port 2, provided
by the USB1.1 serial converter, configured to 19200 baud, 8 data
bits, no parity, 1 stop bit. The entire chart is setup to display
150 samples. This is normally carried out within 150 seconds,
assuming a clean DCF77 data reception containing a single PWM
pulse every second.
The bit streams of the two consecutive valid frames are displayed within the two large text boxes below the chart. The Visual Basic code carries out a simple frame consistency check (59 data bits, no marks inside) automatically every complete frame and displays the translation of the last valid frame in the three smaller text boxes at right. To keep it simple, there is neither DCF77 parity bit checking nor any error handling implemented in the software.
|Download assembler source
|Download Hex File:
|The above program needs additional include files (modules) to get successfully assembled: m_bank.asm, m_wait.asm, m_lcd.asm
Technical introduction to DCF77
Download Excel 97 work sheet (DCF77 data visualization and translation): DCF77_Visualizer.zip (155 kB)
Last updated: 27.04.2004