This clock is equipped with a DCF-77 receiver. It automatically synchronizes to accurate time. It also has date, automatic summer and winter time, alarm, operating hours counter and adjustable brightness with automatic dimming at night time. The settings (brightness, default display mode, alarm, DST ...) are stored in EEPROM and retained even without power.
The clock is based on IO1 - Atmel AVR ATmega8A (ATmega8, ATmega8L). It provides all functions required for its operation. It is clocked from 4MHz crystal. The clock has six-digit LED display. It has a common anode and is controlled in multiplex. Multiplex frequency is about 100Hz. Anodes are switched by transistors T1 to T6. Cathodes are switched directly via AVR ports. Pulsed display current is determined by resistors R3 to R10. Piezo speaker Rep1 ensures the alarm sound. It can be replaced by an induction speaker with about 1uF capacitor in series. The clock is controlled using buttons TL1 and TL2. Radio time reception from DCF-77 transmitter with a frequency of 77.5 kHz is done using ready made module with ferrite antenna. Place the ferrite rod horizontally - sideways to the transmitter. The module is supplied with a voltage of 1.2 - 3.3V, consumption is max. 120uA. Supply voltage is obtained by a Zener diode ZD1 with a voltage of 2.7V (you can use a white or blue LED instead of this zener diode). The logic level is adjusted to 5V via transistor T7. Coding system and the DCF77 reception method are described in detail here: DCF-77 radio controlled clock with VFD display. Put ceramic capacitors C3, C4 as close as possible to IO1. The circuit is powered from 5V.
How to use and this clock:
The clock is controlled by TL1 and TL2 buttons.
• 1. Time / date display
The clock has two basic modes of display. The first one shows only the time in the form "HH.MM.SS" (Hours : Minutes : Seconds). Second mode alternately displays the time and date with a period of 7 seconds. Time is always displayed for 5 seconds and date for 2 seconds. Date is displayed in the form "WW DD.MM" (Weekday Day.Month). Use TL2 to switch between time display, time+date display and alarm setting. Use TL1 to set display brightness in 6 levels (1/32 - 1/16 - 1/8 - 1/4 - 1/2 - max). If there was a successful synchronization with DCF in the last 10 minutes, the decimal points in hours and minutes display are flashing with a frequency of 1Hz. Otherwise they are lit continuously. At the moment of successful synchronization they blink rapidly (4 Hz). The decimal point in seconds display flashes according to raw pulses from DCF receiver and it indicates its correct function (every second it blinks for 0.1 - 0.2s).
• 2. Alarm
This clock is equipped with an alarm. Button TL2 gradually switching between displaying the time, date-time and four-step alarm settings: Alarm hours, alarm tens of minutes, alarm minutes and alarm mode. The setting is done using TL1 button. Alarm modes are: 0 - disabled, 1 - once, 5 - five working weekdays, 7 - every day. Displayed as: "hh.mm.Ax" (hh = hours, mm = minutes, x = alarm mode). Alarm sound can be stopped using any button.
• 3. Manual setting, special functions
The clock is automatically set using DCF-77 radio signal, but if necessary it can be set manually. Long pressing TL2 you get to time settings and special functions and settings. Then you go through the setting proces using TL2. Use the TL1 to change the setting. First, total time of operation (in hours) is displayed. The following press TL2 displays the time elapsed since the last successful sync with DCF. Another press of TL2 displays various raw data from DCF receiver - counter of received bits, bit value and receiver state. The last two digits are the seconds of real time. Another press of TL2 get you into the process manual time setting. You set hours, tens of minutes, minutes, seconds, year, day of the week, day and month. In the next step you can select the language for the day of the week (dAY CE - Czech, dAY En - English). Then you set night dimming (n.di). A value of 0 means off. Values 1 and 2 indicate that at night (9:00 p.m. to 5:00 a.m.) the display brightness is reduced by 1 or 2 levels. Next, you set the automatic switch to daylight saving time (dSt). The value 0 means off, 1 means on. In next step you can enable / disable synchronization with DCF-77 signal (dCF). The value 0 means off, 1 means on. Another press of TL2 takes you into alarm settings (already described above), then to the basic display.
• 4. Automatic summer / winter time
If the automatic DST is enabled, the switch to summer time takes place on the last Sunday in March. 1:59:59 is followed by 3:00:00. Switch to winter time takes place on the last Sunday in October. 2:59:59 is followed by 2:00:00. (According to the rules valid in nearly all European countries including the Czech Republic and Slovakia since 1996)
• 5. Operating hours counter reset
Operating hours counter can be reset using jumper wire connected at DP1 and then long press of both TL1 and TL2 simultaneously. Then the counter is reset to 000000.
The program for download:
Source code in assembler (ASM)
Compiled HEX file (5 188 Bytes)
How to write the program into the AVR is described here.