]> oss.titaniummirror.com Git - rgblamp.git/commitdiff
Auto: 5 hrs on, 19 hrs off
authorR. Steve McKown <rsmckown@gmail.com>
Sat, 17 Dec 2011 17:46:13 +0000 (10:46 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Sat, 17 Dec 2011 17:46:13 +0000 (10:46 -0700)
The 32 kHz clock is running about 7.3 seconds slow per hour.  Not great.
Perhaps the board just needs a capacitance tweak or adjustment.
Currently using 22 pF load caps with a 12.5 pF crystal, using Vss pin 8
on the micro as ground.

main.c

diff --git a/main.c b/main.c
index f9d45cfa0b6bd68a714ee85a8855f48df2254bd2..8d1792bceab6593c83b9e83c9687c3a75bf717f1 100644 (file)
--- a/main.c
+++ b/main.c
 #include "task.h"
 #include "adc_random.h"
 
-#define AUTO_OFF_COUNT   150  /* 5 mins on*/
-#define AUTO_ON_COUNT    300  /* 10 mins off */
+//#define AUTO_OFF_COUNT   150  /* 5 mins on*/
+//#define AUTO_ON_COUNT    300  /* 10 mins off */
 //#define AUTO_OFF_COUNT   450  /* 15 mins on*/
 //#define AUTO_ON_COUNT    1350 /* 45 mins off */
 //#define AUTO_OFF_COUNT   600  /* 20 mins on*/
 //#define AUTO_ON_COUNT    1200 /* 40 mins off */
 //#define AUTO_OFF_COUNT   450  /* 2 hours on*/
 //#define AUTO_ON_COUNT    1350 /* 22 hours off */
-//#define AUTO_OFF_COUNT   9000U  /*  5 hrs in 2 sec units */
-//#define AUTO_ON_COUNT    34200U /* 19 hrs in 2 sec units */
+#define AUTO_OFF_COUNT   9000U  /*  5 hrs in 2 sec units */
+#define AUTO_ON_COUNT    34200U /* 19 hrs in 2 sec units */
 #define dbgpin_init()    do { \
                              /* Set RA2 as output low */ \
                              RA2 = 0; \