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.
#include "task.h"
#include "adc_random.h"
#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 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; \
#define dbgpin_init() do { \
/* Set RA2 as output low */ \
RA2 = 0; \