aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/TempDataLogger
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-11-08 03:41:48 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-11-08 03:41:48 +0000
commit0ce2950d811b8dc11e46602e7490d795d8ddfb5d (patch)
tree3f070d28b9fe15ef998300769c256477669d5848 /Projects/TempDataLogger
parentbac860b173c938bda02be4d2b1e6c72d21380a38 (diff)
downloadlufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.tar.gz
lufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.tar.bz2
lufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.zip
Added board hardware driver support for the Adafruit U4 breakout board.
Fixed calculation of timer register reload values derived from F_CPU; must subtract one from the division result for the compare value to be correct. Change AVRISP-MKII rescue clock speed to 4MHz to ensure that a 125KHz ISP speed works regardless of the target's fuses (i.e. DIV8 set).
Diffstat (limited to 'Projects/TempDataLogger')
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index c572a3870..c3cfd65f9 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -208,7 +208,7 @@ void SetupHardware(void)
TWI_Init();
/* 500ms logging interval timer configuration */
- OCR1A = ((F_CPU / 1024) / 2);
+ OCR1A = (((F_CPU / 1024) / 2) - 1);
TCCR1B = (1 << WGM12) | (1 << CS12) | (1 << CS10);
TIMSK1 = (1 << OCIE1A);