Shop OBEX P1 Docs P2 Docs Learn Events
timer ? — Parallax Forums

timer ?

JurgenJurgen Posts: 8
edited 2005-01-10 16:36 in BASIC Stamp
Hi,

I'm looking for a solution to let my BS2 know when an exact time has elapsed.

Does anyone have a suggestion what hardware I need to let my BS2 know when for example exactly 4 minutes have elapsed since it performed a certain action?

I guess this can't be done through software?

To use PAUSE for 4 minutes is of course not the solution, in the meanwhile my BS2 has other jobs to do yeah.gif

Comments

  • achilles03achilles03 Posts: 247
    edited 2005-01-07 14:04
    Consider a timekeeping chip:

    http://www.parallax.com/detail.asp?product_id=604-00005

    It might be a little more than you need, but it'd work.

    Another option is to use a 555 and a counter. Setup the 555 to pulse at, say, 1 second intervals. Have the BS2 periodically read the counter (which is being increased for every 555 pulse), and when the counter hits 240, you're at 4 minutes.

    Dave
  • agentileagentile Posts: 101
    edited 2005-01-08 16:13
    I agree that a 555 and a counter would work well.· I am in the process of designing a circuit which will check the temperature of a room every 15 minutes, and then store the time and the temperature to EEPROM.· I will be using a 555 wired in an astable configuration.· This will be the clock.· Then as a counter I will use a 74191 (a 4 bit synchronous counter).



    AG
  • MatthewMatthew Posts: 200
    edited 2005-01-09 15:55
    Is there a certain benefit that one may attain by using a 555 timer? Why not use the 'pause' command? Is the timer more accurate?
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-09 17:29
    Because the stamp is "hung" for the duration of the execution of a PAUSE command.

    DEBUG "I'm going to pause", CR
    PAUSE 60000
    DEBUG "I'm done pausing", CR

    The above will display the first message, then nothing for 60 seconds, then the second message. Nothing else happens on the stamp in the interim. If you need to do other tasks while waiting for the time to expire you can't use the PAUSE.

    Jim
  • MatthewMatthew Posts: 200
    edited 2005-01-09 19:46
    Okay, that's cool.
  • FranFran Posts: 1
    edited 2005-01-10 16:36
    I am also looking into timers.·

    For my application I need to timestamp data at .01 second intervals, so the 555 timer will not work.· I'm looking at the DS1994 iButton from Dallas Semiconductors.· Has anyone·used the DS1994 and if so how difficult is it to program?
Sign In or Register to comment.