135
C-Control Pro Mega Series
© 2008 Conrad Electronic
35
Parity Hour
36 - 41
Day of the Month
42 - 44
Weekday
45 - 49
Month
50 - 57
Year
58
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 recognised 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 DCF 77 time
information with data comparison. Another possibility would be to compare the DCF time with the
current 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 DCF 77 receiver is necessary. The output of the DCF
receiver is connected to the input port (Mega32: PortD.7 - M128: PortF.0). 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
DCF 77 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 DCF 77 time reception.
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
RTC (Real Time Clock)
The RTC is controlled by a 10ms interrupt and runs in the background independent of the user
program. The display on the LCD is updated every second. The display format is in the first line:
Hour : Minute : Second, in the second line: Date of Day : Month : Year.
Содержание C-Control Pro Mega Series
Страница 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Страница 9: ...VIII Inhalt 2008 Conrad Electronic ...
Страница 10: ...Part 1 ...
Страница 17: ...Part 2 ...
Страница 23: ...Part 3 ...
Страница 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Страница 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Страница 58: ...Part 4 ...
Страница 91: ...82 IDE 2008 Conrad Electronic ...
Страница 92: ...Part 5 ...
Страница 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Страница 136: ...Part 6 ...
Страница 231: ...Part 7 ...
Страница 240: ......