summaryrefslogtreecommitdiff
path: root/timebase.c
diff options
context:
space:
mode:
authorChristian Koch <christian_koch@gmx.de>2012-05-06 15:29:24 +0200
committerChristian Koch <christian_koch@gmx.de>2012-05-06 15:29:24 +0200
commitf7a48dc590f5e8bf2d6d9d92248734566c175cf2 (patch)
treeb8c5f2f5b60ec9e39a5f3dd80566533ad74e86ea /timebase.c
parentf714cacefc9a04fbae7249cc4b707a27cedabc36 (diff)
added hardware documentation, minor software changesHEADmaster
Diffstat (limited to 'timebase.c')
-rw-r--r--timebase.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/timebase.c b/timebase.c
index ea8f8b9..07a5fe7 100644
--- a/timebase.c
+++ b/timebase.c
@@ -2,10 +2,10 @@
#include "timebase.h"
// at 12MHz:
-#define T0COUNT (XTAL / 1024 / 64) // 183
-#define T0SECERR (XTAL - 1024L * 64 * T0COUNT) // 6912
+#define T0COUNT (F_CPU / 1024 / 64) // 183
+#define T0SECERR (F_CPU - 1024L * 64 * T0COUNT) // 6912
#define T0COUNTSEC (T0COUNT + T0SECERR / 1024) // 189
-#define T0MINERR (XTAL - 1024 * (63 * T0COUNT + T0COUNTSEC)) // 768
+#define T0MINERR (F_CPU - 1024 * (63 * T0COUNT + T0COUNTSEC)) // 768
#define T0COUNTMIN (T0COUNTSEC + (T0MINERR * 60 + 512) / 1024) // 234
// 234 = 12000000 Hz
@@ -26,7 +26,7 @@ void timebase_init( void )
extern uint8_t waitctr;
-SIGNAL (TIMER0_OVF0_vect)
+ISR (TIMER0_OVF0_vect)
{
static u8 dcf77_time, old_dcf77;
// DCF77 receive