Hi Rob,

RTCC can be used for multiple timers in the same time, for example one is
keeping the real time (second,minute, hour, day, month, etc) in incrementing
sequence and other can be used for a process in decrementing sequence, while
the third (or the alarm but not a good idea) for other processes.

The key I found, is using the halfsec as a separate time generation. The
routine for extracting the halfsec rising edge and decrement an user second
is below, maybe you wish to implement in the library in your well structured
style.

Vasile

var bit block_halfsec = high
var byte _1st_second, _2st_second
var byte second_trt = 59, minute_trt = 59

if block_halfsec then
    _1st_second = RTCCFG_HALFSEC
    block_halfsec = low
 end if

   if _1st_second == 0  then
      _2st_second = RTCCFG_HALFSEC
       if _2st_second == 1 then
         second_trt = second_trt - 1 ; decrement the user second
         _1st_second = 1
       end if
   else
    block_halfsec = high
   end if


   if second_trt == 255 then
      second_trt = 59
      minute_trt = minute_trt - 1
   end if






On Sat, Jul 24, 2010 at 1:18 PM, <[email protected]> wrote:

> Revision: 2139
> Author: robhamerling
> Date: Sat Jul 24 13:17:59 2010
> Log:  Added to rtc_hardware library function to obtain day of week.
>  Enhanced the description and comments for JalAPI.
>  Added rtc_hardware and alarm_clock to TORELEASE.
>
>
> http://code.google.com/p/jallib/source/detail?r=2139
>
> Modified:
>  /trunk/TORELEASE
>  /trunk/include/peripheral/rtc/rtc_hardware.jal
>  /trunk/project/alarm_clock/alarm_clock.jal
>
> --
> 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]<jallib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jallib?hl=en.
>
>

-- 
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