Shop OBEX P1 Docs P2 Docs Learn Events
SV: [basicstamps] Please help clearing my doubts — Parallax Forums

SV: [basicstamps] Please help clearing my doubts

ArchiverArchiver Posts: 46,084
edited 2002-12-12 20:06 in General Discussion
Greetings!

1. you will need some sort of external clock.
(Someone will no boubt recomment one made for the Stamp :-)

2. You may be able to get away with just the storage space on the BS2...

4 events a day for a week is 28.
- Time can be stored as two Bytes, Hour and minutes, and
- Date can be stored as YY:MM[noparse]:D[/noparse]T, three Bytes. Possibly, you could even
scrunch the three bytes into 2, but lets say 3 for now. (For a low number of
events the scrunching procedure will take up more program space than you
save :-)

That gives a total of 5 Bytes multiplied by 28 which is 140Bytes in total.
The BS2 have 2KB of storage, so there should be room to spare for your
program...
(PBasic makes for very compact code :-)

:-)
Trygve


Opprinnelig melding
Fra: chongkhaishin <800205015763@n...>
[noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=J5Q0AinQJn7EekWC8uXlUP4l7-8x_KZDJNRxaozok3_kpWg8NJue8ONE8UcP15uSzDaalczOxF7V6MpV19Mt]800205015763@n...[/url
Sendt: 11. desember 2002 04:14
Til: basicstamps@yahoogroups.com
Emne: [noparse][[/noparse]basicstamps] Please help clearing my doubts


Situation: new to BS, having a BS2 module

Task: log date and time upon triggered of sensor, 4 sets of date &
time per day for a week. Size ia a problem for this porject.

Doubts:
1. Can i achieve this without a Real Time Clock & External EEPROM?
2. Do i need to write/get a program that count year, month, day,
hour, min and download to BS2?
3. Any better suggestion?

Thanks pals, and have a nice day!


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/

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-12-12 20:06
    You can save the YY:MM[noparse]:D[/noparse]T once for the start of the test. You then
    only need save a nibble (4 bits) for how many days after the test
    started each measurement was made. That still gives 15 days of
    coverage. It also saves bytes instead of saving the whole date each
    time.

    Harry
    Stamp Robotics to the next level
    www.bluebelldesign.com

    --- In basicstamps@yahoogroups.com, Trygve Henriksen
    <trygve.henriksen@v...> wrote:
    > Greetings!
    >
    > 1. you will need some sort of external clock.
    > (Someone will no boubt recomment one made for the Stamp :-)
    >
    > 2. You may be able to get away with just the storage space on the
    BS2...
    >
    > 4 events a day for a week is 28.
    > - Time can be stored as two Bytes, Hour and minutes, and
    > - Date can be stored as YY:MM[noparse]:D[/noparse]T, three Bytes. Possibly, you could
    even
    > scrunch the three bytes into 2, but lets say 3 for now. (For a low
    number of
    > events the scrunching procedure will take up more program space
    than you
    > save :-)
    >
    > That gives a total of 5 Bytes multiplied by 28 which is 140Bytes in
    total.
    > The BS2 have 2KB of storage, so there should be room to spare for
    your
    > program...
    > (PBasic makes for very compact code :-)
    >
    > :-)
    > Trygve
    >
    >
    >
    Opprinnelig melding
    > Fra: chongkhaishin <800205015763@n...>
    > [noparse][[/noparse]mailto:800205015763@n...]
    > Sendt: 11. desember 2002 04:14
    > Til: basicstamps@yahoogroups.com
    > Emne: [noparse][[/noparse]basicstamps] Please help clearing my doubts
    >
    >
    > Situation: new to BS, having a BS2 module
    >
    > Task: log date and time upon triggered of sensor, 4 sets of date &
    > time per day for a week. Size ia a problem for this porject.
    >
    > Doubts:
    > 1. Can i achieve this without a Real Time Clock & External EEPROM?
    > 2. Do i need to write/get a program that count year, month, day,
    > hour, min and download to BS2?
    > 3. Any better suggestion?
    >
    > Thanks pals, and have a nice day!
    >
    >
    > 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/
Sign In or Register to comment.