Hi mackrackit
I must add him to my Christmas card list too.....!But... Bruce to the rescue again.
So @SLEEP (no period) for the visits count with IOC and a WDT timing loop for the "is it dark or just very cloudy" 30 min sleep.
So with OPTION reg bit.4 set to 1 prescaler assigned for WDT on and a 128 prescaler I'm thinking that:Code:OPTION_REG = %00001111
30mins x 60sec / 2.304secs = 781 counts for Bruce's timing / SLEEP loop below.
So not really sleeping, more power napping.........Code:COUNTER=0 ' clear before entry WHILE COUNTER < 781 @ SLEEP COUNTER=COUNTER+1 WEND
How does the above sound / look.
Dave




Bookmarks