Pause longer than 65535
Stevezila
Posts: 35
I have an application in which·I want to take a sample every twenty minutes. the problem is that when I try to pause for that long I get the message that pause is longer than 16 bits. Pause is only 16 bits or 0-65535. Sleep is the same 0-65535 aside for entering twenty 60 sec. pause cmds how can I get· a BS2 to excute only once every twenty minutes.
Thanks in advance for your replies
Steven
Thanks in advance for your replies
Steven
Comments
Or, make a subroutine of say 10 seconds delay. From the main program, call it repeatedly to get the total time needed. This has the added benefit of letting the processor do something else each time it comes back from the subroutine. Otherwise, the Stamp is "blind" during the long PAUSE.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
And in any event, to 'recalibrate' something means you have to compare it to some 'standard', right? Thus your suggestion for an external RCT chip. I'm just curious what you meant by the quote above.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
time var Word
Do
"Take measurement"
For time = 0 to 20
Pause 60000 ' one minute
Next
Loop
time·· VAR·· Word
DO
· FOR time = 0 TO 20
· PAUSE 60000·· ' One minute
· HIGH 15········· ' LED
· PAUSE 1000
· LOW 15
· NEXT
LOOP
I noticed that the pause is always one minute instead of 20 minutes.
where is my error?
·
It's also possible lighting the LED is resetting your BS2, if you have a low battery, or your LED is actually a lamp.
And thanks for the update, Tracy, I was not aware the BS2 used an RC circuit for the watch-dog timer.· Fascinating.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com