diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-08-18 13:56:12 +0200 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-08-18 13:56:12 +0200 |
commit | 3f99d419aaf93836f5d05002042def104e799202 (patch) | |
tree | 91836df9d354e834ad6f78fff3088b3b75ad274b | |
parent | 25b0f55d99b11ff71a59b6c493c3998fccf8ffe4 (diff) | |
download | lufa-3f99d419aaf93836f5d05002042def104e799202.tar.gz lufa-3f99d419aaf93836f5d05002042def104e799202.tar.bz2 lufa-3f99d419aaf93836f5d05002042def104e799202.zip |
Use a timer prescaler of 256 instead of 1024 in the TempDataLogger project for better accuracy.
-rw-r--r-- | Projects/TempDataLogger/TempDataLogger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c index 15c3e6a44..bbbea47f2 100644 --- a/Projects/TempDataLogger/TempDataLogger.c +++ b/Projects/TempDataLogger/TempDataLogger.c @@ -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 */ |