Skip to content

kwolf1909/DCF77-clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program receives the european DCF77 time signal and syncs it with the external RTC-clock. It is displayed on a 8-digit 14- or 7-segment display with display-controller HT16K33. The MCU used is an ATtiny 814 or 1614. Without external RTC, serial debugging and OneWire, an ATtiny 412 can be used (99 % of flash space used). The circuit can be powered by a LiPo-cell. If the voltage drops below 3.0 V, the voltage is displayed as a low voltage indicator. A push button switches between different display modes: Time with date, time with seconds, time with temperature, time with battery voltage. A sync to DCF-time is performed in the background every 30 minutes, and immediately after power-up. The software uses a layer-based approach. Low-level: DCF-object with interrupt handler, mid-level: receiving data state machine, upper level: display handling. No blocking code exists, fully asynchronous operation.

MCU-clock: 8 MHz, Timers used: TCA0 (DCF signal processing), TCB0 (timing for OneWire), TCD0 (millis), RTC (2 Hz generation via interrupt)

External RTC: DS3231 with battery backup, supplies 32K clock for internal RTC, 8-digit display (I2C): DFRobot 7-segment, or custom built 14-segment. External DCF77-receiver: ELV DCF-2 (MAS6180 AM-receiver) Temperature-sensor: DS18B20 with external pullup

Pins used:
PA3 - Input, DCF-signal, input-pullup enabled, low-active signal
PA4 - Input/Output, used by tiny OneWire-implementation (temp sensor DS18B20), external pullup 4,7K
PA6 - Output, LED which reflects the DCF-input signal
PA7 - Input, mode select button, active low with input-pullup enabled
PB0 - I2C CLK for display
PB1 - I2C DATA for display

Compiles with MegaTinyCore on Arduino IDE. External libraries required: RTClib.h (Adafruit fork)

Custom built alphanumeric display used: http://www.technoblogy.com/show?2ULE

alpha

About

DCF77-clock with RTC backup and 8-digit alphanumeric display on ATtiny 412/814/1614

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages