| Author |
Message |
|
|
Posted: Aug 02, 2012 - 02:16 PM |
|

Joined: Jul 19, 2012
Posts: 4
|
|
does anyone have a code example for this kind of programm?
i want to programm a RTC what syncs with the dcf radio signal. ive found some similar programms but most of them dont work because of the interrupt
(old programms on tiny and mega8).
im not a freak in interrupts so maybe someone have a hint for me .
the programm shuld tgl the led on portE every second but it dont |
|
|
| |
|
|
|
|
|
Posted: Aug 02, 2012 - 02:42 PM |
|

Joined: Aug 29, 2002
Posts: 786
Location: Muenster, Germany
|
|
I've done a DCF77 receiver to show the currently active amateur radio beacons. Quite early in the coding stages, i switched from interrupt-driven signal reception to polling based on a timer. The signal is much too flakey to be useful as an interrupt source.
So, setup a 1ms timer, read the state of your DCF receiver pin each ms, integrate it to get it averaged over some time, and then make your decision after let's say 120 ms if the pulse was a short or a long one.
In addition, my particular DCF receiver shortened the length of its pulses when the received signal got weaker, so don't hang up on the specification of DCF77 for what makes a short vs. a long pulse. |
_________________ Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."
|
| |
|
|
|
|
|
Posted: Aug 02, 2012 - 03:01 PM |
|

Joined: Feb 12, 2005
Posts: 16323
Location: Wormshill, England
|
|
If you try making any DCF77 of MSF clock, you must do serious error checking.
The signal is likely to have many glitches, so you only 'correct' a free running AVR timer when every check bit is correct (and field values are reasonable).
I am pretty sure that my Kitchen Clock works like this. i.e. only listens to MSF60 every few hours, and makes a correction if necessary.
Don't try to display the raw decoded time every minute. Your cakes will burn !
David. |
|
|
| |
|
|
|
|
|
Posted: Aug 02, 2012 - 04:06 PM |
|


Joined: Oct 30, 2002
Posts: 5720
Location: The Netherlands
|
|
When I did my DCF77 decoder I didn't adjust until it received two consecutive frames that differed only one minute in time (and that the parity checks are ok).
My latest DCF77 enabled clock that I bought checks the radio signal only at 2:00 AM; or on demand by pressing the 'wave' button. |
|
|
| |
|
|
|
|
|
Posted: Aug 03, 2012 - 02:30 PM |
|

Joined: Jan 24, 2008
Posts: 521
|
|
|
|
|
|
|