Use a timer prescaler of 256 instead of 1024 in the TempDataLogger project for better accuracy.

This commit is contained in:
Dean Camera 2013-08-18 13:56:12 +02:00
parent 25b0f55d99
commit 3f99d419aa
1 changed files with 2 additions and 2 deletions

View File

@ -211,8 +211,8 @@ void SetupHardware(void)
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 */