Get Date and time from BS2
Archiver
Posts: 46,084
Hi everyone
Is there a special code or command to get correct time and date from
BS2?
Thanks,
Is there a special code or command to get correct time and date from
BS2?
Thanks,
Comments
wrote:
> Hi everyone
>
> Is there a special code or command to get correct time and date
from
> BS2?
>
> Thanks,
I am not sure if you can set up a clock in the BS2 ? but it does not
have a Real Time Clock (RTC) chip on the board itself.
Shamelss self promotion....
The CC-RTC-1302 is the SPI 3 wire version and the CC-RTC-1307 is the
I2C version, both come with PBasic code that can be put into your
program.
Our website is currently under construction, but we got the
www.ChipCircuit.com url so it is easier to remember. (gotta remeber
to ask those who have linked us to change also....)
http://www.chipcircuit.com look under the ChipCircuit heading on
the left.
Dave
module.
You can easily interface a DS1302 RTC to it
though.
--- In basicstamps@yahoogroups.com, "nima_jahedi" <nima_jahedi@y...>
wrote:
> Hi everyone
>
> Is there a special code or command to get correct time and date
from
> BS2?
>
> Thanks,
varieties of RTC chips that are compatible with the BASIC Stamp
microcontroller.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: nima_jahedi [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=naPWh5kvhXXok_f_WEgbbJzNIXk_ZPVdw78m9HJKzDFiuw8HFaX3nCOY4gzbRHaSSg20auuHevC7mlJ_]nima_jahedi@y...[/url
Sent: Friday, July 16, 2004 4:10 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Get Date and time from BS2
Hi everyone
Is there a special code or command to get correct time and date from
BS2?
Thanks,
wrote:
> There are no such commands. You can, however, use on of the many
> varieties of RTC chips that are compatible with the BASIC Stamp
> microcontroller.
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
Speaking of RTC chips, I myself am having an small issue with the
DS1302 on the BS2P40. I have a test module which consists of a
BS2P40 Demo Board connected to a 20 X 4 LCD and my laptop.
I have sample code from various sources for testing LCD chips &
displays, keypads, sound chips, etc. Recently I was playing around
with Jon Williams code for the DS1302 from the Stampworks manual.
That sample code does not include handling the Date, Month or Year,
so I tried to add it. However, when my code tries to do a rollover
for the Day, Date & Month, I noticed my Day variable ends up as $07
instead of $00, which means it's not rolling over back to Sunday.
I know when you've been working on code for a long time it's easy to
overlook something simple, so I am asking if someone fluent with the
DS1302 could take a look at my code and see if I am reading/writing
the data to/from the DS1302 correctly?
Remember, this is a test module. The code uses DEBUG for now, and
should be ported to the LCD Display once I've figured out what my
mistake is (Or someone else does).
Instead of pasting a HUGE amount of code here, I will link to the
code on one of my web sites.
http://www.lightlink.com/dream/bs2pcode.bsp
I appreciate any help on this. Thanks!
Chris Savage
Knight Designs