Shop OBEX P1 Docs P2 Docs Learn Events
Turn on a led for two minutes each 13 minutes all day long... — Parallax Forums

Turn on a led for two minutes each 13 minutes all day long...

ArchiverArchiver Posts: 46,084
edited 2003-04-28 14:27 in General Discussion
This would be my guidance. If time-of-day isn't required by the project, I
would simply reset the clock to midnight at the beginning of each cycle, then
check the time in my main loop. In this manner, the LED control becomes a
"background" process since the timing is handled by the RTC.

-- Jon Williams
-- Parallax


In a message dated 4/27/2003 9:32:00 AM Central Standard Time, leroy@f...
writes:

> What about using a clock chip? you would just need to see if the time has
> passed, and if so process the logic??



[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-27 16:49
    I thought the RTC chips had an alarm feature as well?


    Original Message

    > This would be my guidance. If time-of-day isn't required by the project,
    I
    > would simply reset the clock to midnight at the beginning of each cycle,
    then
    > check the time in my main loop. In this manner, the LED control becomes a
    > "background" process since the timing is handled by the RTC.

    > > What about using a clock chip? you would just need to see if the time
    has
    > > passed, and if so process the logic??
  • ArchiverArchiver Posts: 46,084
    edited 2003-04-27 18:28
    Yes, most do. Using this feature would, however, require another input to
    monitor the alarm output of the chip. It may be easier just to look at the
    time values coming back, especially if not using the RTC for time-of-day.

    -- Jon Williams
    -- Parallax

    In a message dated 4/27/2003 10:52:11 AM Central Standard Time,
    daweasel@s... writes:

    > I thought the RTC chips had an alarm feature as well?
    >



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-04-27 19:50
    While I was laid up with a busted knee, I threw together a 15/30/60 minute
    timer for reminding me to do radio checks for a neighborhood patrol group I
    belong to. I used one of the timer / counters and a 32,767 xtal, tied to a
    BS1 and one of the crappy serial LCD's. Worked pretty well and I would take
    it down to the radio room when it was my turn to work there.

    Since it was rather unusual looking and had a count-down display, I decided
    leaving it unattended down at the police office would be bad. However, it
    got left behind one night and the other operators latched onto it and told
    me I needed to leave it there more often. Now I have to clean it up and make
    it run off a wall-wart. Since I have a spare DS1302 I may use it also, so I
    can do the date and time.

    Original Message

    > Yes, most do. Using this feature would, however, require another input to
    > monitor the alarm output of the chip. It may be easier just to look at
    the
    > time values coming back, especially if not using the RTC for time-of-day.

    > > I thought the RTC chips had an alarm feature as well?
  • ArchiverArchiver Posts: 46,084
    edited 2003-04-28 14:27
    I believe the DS1305 does have an alarm pin -- but this
    doesn't help much with the BS2, which has no interrupt
    inputs.

    One approach would be to set up a DS1302 time chip,
    'sleep' the BS2 for some period, then on wake up ask
    the time chip what time it REALLY is, and cycle on
    that until the desired time occurs.

    --- In basicstamps@yahoogroups.com, "Rodent" <daweasel@s...> wrote:
    > I thought the RTC chips had an alarm feature as well?
    >
    >
    >
    Original Message
    >
    > > This would be my guidance. If time-of-day isn't required by the
    project,
    > I
    > > would simply reset the clock to midnight at the beginning of each
    cycle,
    > then
    > > check the time in my main loop. In this manner, the LED control
    becomes a
    > > "background" process since the timing is handled by the RTC.
    >
    > > > What about using a clock chip? you would just need to see if
    the time
    > has
    > > > passed, and if so process the logic??
Sign In or Register to comment.