Greetings Joep,

Yes, GIE will work.  But if someone objected to using GIE, then they
could use a timer IE instead. That is what I was trying to suggest
with the define -- let them choose which IE to use, but we could
supply a default value of GIE.  I am wondering if "alias" would work
for this?

Thank you,

William


On Feb 25, 7:57 am, Joep Suijs <[email protected]> wrote:
> Hi William,
>
> What is cal_isr?
>
> I think it is pretty safe to asume that there is an interrupt on the
> background to count seconds. If this is done properly, it is based on
> timer with automatic reload (like timer 2 on 16f chips iirc).
> However, as you state, this is a pretty rare case. So maybe just
> disable all interrupts:
>
>  while seconds > 59 loop    -- if seconds < 60, nor harm is done
>      var bit old_gie =  INTCON_GIE
>      seconds = seconds - 60
>       INTCON_GIE = old_gie
>      minutes = minutes + 1
>   end loop
>
> Joep

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to