Time & Basicstamps
Archiver
Posts: 46,084
Hello Stampers
I'm looking for a cheap solution to incorpore time control in my BS2 project.
I tray to control time with pause & Sleep but it don't work.
I need to read the time/date from someplace.
Any idea?
Tks!
-Bruno-
[noparse][[/noparse]Non-text portions of this message have been removed]
I'm looking for a cheap solution to incorpore time control in my BS2 project.
I tray to control time with pause & Sleep but it don't work.
I need to read the time/date from someplace.
Any idea?
Tks!
-Bruno-
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
Chapter 7 of the newely revised Industrial Control uses the DS1302
Real time clock and works through 3 scenarios:
- Real Time Events
- Real Time Intervals Events
- Logged-Data Dumps
The PDF version may be found here:
http://www.parallaxinc.com/html_files/downloads/downloads_sic.htm
The text is also in other locations on Parallax's website, but don't
seem to be updated with CH7 yet.
Another option, if you don't mind having a PC as a co-processor, is
to use StampPlot Pro for real-time clock processing.
For example, the BS2 code:
DEBUG "!READ [noparse][[/noparse](RTIME),>,13:00]",CR
SERIN 16,84,[noparse][[/noparse]timeok]
Will return a 1 or 0 depending if time is greater than 13:00 and
store it in timeok.
Or:
DEBUG "!READ [noparse]/noparse][noparse][[/noparse](RTIME),>,13:00]*[noparse][[/noparse](RTIME),<,14:00",CR
SERIN 16,84,[noparse][[/noparse]timeok]
Will return a 1 if between 13:00 and 14:00.
Or:
DEBUG "!READ [noparse][[/noparse][noparse][[/noparse](PRDT),>,03/05/02 13:00]",CR
Will check if it's past a certain date and time.
http://www.selmaware.com/stampplot
-Martin Hebel
--- In basicstamps@y..., Bruno Barang
>Hello Stampers
>
>I'm looking for a cheap solution to incorpore time control in my BS2 project.
>I tray to control time with pause & Sleep but it don't work.
>
>I need to read the time/date from someplace.
>Any idea?
>Tks!
>
>-Bruno-
>
>Hi Bruno -
Check out the Timekeeper Board which can be found here:
http://www.high-techgarage.com/
Regards,
Bruce Bates
DS2417. They all use 1-wire communication, but you might have trouble using
the BS2 with them, it's tricky, a easier way is to use a DS1481 (PIO to
1-wire) or a DS2480 (serial to 1-wire) buss master chips to interface them.
Also Dallas' DS1216 would work too, it uses the SERIN and SEROUT BS2
functions. Much easier to program.
These chips also have some NV RAM so you could store stuff (variables) in
the RAM too.
You may also be able to get a couple as free samples.
But in anycase the prices aren't bad.
Also Dallas' DS1216 would work too, it uses the SERIN and SEROUT BS2
functions. Much easier to program.
These chips also have some NV RAM so you could store stuff (variables) in
the RAM too.
http://www.al-williams.com/awce/pak7.htm has a Pak VII that you can use to
keep a RTC with too.
Original Message
From: Bruce Bates [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=u9djh2ugpavaFF48o1g4k7-cmTy-SOgcsSPlvfuxHbDlqX9FNPIp--_9fGNvpvukVq48VMnu_ohQ3GY_PA]bvbates@u...[/url
Sent: Wednesday, March 06, 2002 12:08 AM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Time & Basicstamps
At 10:30 PM 3/5/2002 +0100, you wrote:
>Hello Stampers
>
>I'm looking for a cheap solution to incorpore time control in my BS2
project.
>I tray to control time with pause & Sleep but it don't work.
>
>I need to read the time/date from someplace.
>Any idea?
>Tks!
>
>-Bruno-
>
>Hi Bruno -
Check out the Timekeeper Board which can be found here:
http://www.high-techgarage.com/
Regards,
Bruce Bates
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>I'm looking for a cheap solution to incorpore time control in my BS2 project.
>I tray to control time with pause & Sleep but it don't work.
>
>I need to read the time/date from someplace.
>Any idea?
>Tks!
>
>-Bruno-
Hi Bruno,
The cheapest (~$2) serial real time clock chip may be the NJR6355
<http://www.Digikey.com>. It only needs a 32768 hz crystal and 4
lines to the Stamp: data, clock, CS and R/W. Search this group
archives and you will find discussion and links to code.
-- Tracy