Use a timer prescaler of 256 instead of 1024 in the TempDataLogger project for better...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 18 Aug 2013 11:56:12 +0000 (13:56 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 18 Aug 2013 11:56:12 +0000 (13:56 +0200)
Projects/TempDataLogger/TempDataLogger.c

index 15c3e6a..bbbea47 100644 (file)
@@ -211,8 +211,8 @@ void SetupHardware(void)
        RTC_Init();
 
        /* 500ms logging interval timer configuration */
        RTC_Init();
 
        /* 500ms logging interval timer configuration */
-       OCR1A   = (((F_CPU / 1024) / 2) - 1);
-       TCCR1B  = (1 << WGM12) | (1 << CS12) | (1 << CS10);
+       OCR1A   = (((F_CPU / 256) / 2) - 1);
+       TCCR1B  = (1 << WGM12) | (1 << CS12);
        TIMSK1  = (1 << OCIE1A);
 
        /* Check if the Dataflash is working, abort if not */
        TIMSK1  = (1 << OCIE1A);
 
        /* Check if the Dataflash is working, abort if not */