Instructions

248Libraries
© 2013 Conrad Electronic
Parity Minute
Hour
Parity Hour
Day of the Month
Weekday
Month
Year
Parity Date
This signifies that reception must be in progress for at least one full minute before time information
can be provided. The information decoded during this minute is only secured by three parity bits. So
two incorrectly received bits will already lead to a transmission error that can not be recognized in
this way. For higher demands additional checking mechanisms can be used, such as plausibility
check (is the received time within the admissible limits) or multiple reading of the DCF77 time in-
formation with data comparison. Another possibility would be to compare the DCF time with the cur-
rent RTC time and only allow a specific deviation. This method does not work right after program
start since the RTC has to be set first.
Description of the example program "DCF_RTC.cc"
The program DCF_RTC.cc represents a clock which is synchronized by use of DCF 77. Time and
date are displayed on an LCD. Synchronization takes place after program start and then daily at a
time determined in the program (Update_Hour, Update_Minute). There are two libraries used:
DCF_Lib.cc and LCD_Lib.cc.
For the radio reception of the time signal a DCF77 receiver is necessary. The output of the DCF re-
ceiver is connected to the input port (Mega32: PortD.7 - M128: PortF.0 AVR32Bit: P27(PA15) ). At
first the beginning of a time information has to be found. It will be synchronized onto the pulse gap
(bit 59). Following the bit will be received in seconds time. There will be a parity check after the
minute and hour information and also at the end of the transmission. The result of the parity check
will be stored in DCF_ARRAY[6]. For transfer of the time information DCF_ARRAY[0..6] will be
used. After reception of a valid time information the RTC will be set with this new time and will then
run independently. RTC as well as DCF77 decoding is controlled by a 10ms interrupt. This time base
is derived from the quartz frequency of the Controller. DCF_Mode will control the completion of the
DCF77 time reception.
Changing the input pin
The used input port is defined as DCF_IN in the library "DCF_Lib.cc".
Table DCF Modes
DCF_Mode
Description
0
No DCF 77 operation
1
Find pulse
2
Synchronization on frame start
3
Decode and store data. Parity check