Shop OBEX P1 Docs P2 Docs Learn Events
Question - Text in variables . . . — Parallax Forums

Question - Text in variables . . .

ArchiverArchiver Posts: 46,084
edited 2003-12-17 01:22 in General Discussion
Hello,

Working with a BS2-IC using Basic Stamp 2.5 I understand that you
can store number etc. in variables (nib byte word). How can I store
a short sentance for display on a LCD later ?

Many thanks
Billy

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-12-16 22:15
    In a message dated 12/16/2003 5:12:02 PM Eastern Standard Time,
    billy@b... writes:


    > Working with a BS2-IC using Basic Stamp 2.5 I understand that you
    > can store number etc. in variables (nib byte word). How can I store
    > a short sentance for display on a LCD later ?
    >

    You don't really need to store it. Whenever you want the LCD to display
    something, just serout the info using LCD protocol.

    Sid Weaver
    W4EKQ
    Port Richey, FL


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-16 23:22
    The easiest way to do that is to store the strings in EEPROM. There are
    several examples on our web site that show how to do this.

    -- Jon Williams
    -- Parallax


    Original Message
    From: billy@b... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=aNTNNWyvwPspbn7-DWGLy3IwPzwMyYPnu837giCi4iNq0TK1-qabO0Fx_F2NSKxkDpeCF454LrgZLA]billy@b...[/url
    Sent: Tuesday, December 16, 2003 1:33 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Question - Text in variables . . .


    Hello,

    Working with a BS2-IC using Basic Stamp 2.5 I understand that you
    can store number etc. in variables (nib byte word). How can I store
    a short sentance for display on a LCD later ?

    Many thanks
    Billy



    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.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-17 01:22
    I recommend you to bye the BS2p- version. This stamp has something
    very impotent if you're planning to store serial info. It's a
    scratch pad RAM, and can hold up to 126 bytes (letters). It's not
    Eeprom, so the info is cleared if power is removed. Still, the
    scratch pad RAM doesn't ware out after 100.000 writings like the
    Eeprom.

    Then I recommend you to store one char at the time in the Scratch
    Pad RAM. You can do a few calculations if the baud rate is less then
    4800, but it's better to store all the serial info first, then
    prose's it later.

    If you start with:
    '{$STAMP BS2p}
    '{$PBASIC 2.5}

    KeyIn VAR Byte `(0-255) input char
    Ix VAR Byte `(0-255) Counting scratch pad adr
    Ix2 Var Byte `(0-255)

    Ix=0

    MainLoop:
    SERIN 16,18447, 500, No_Data, [noparse][[/noparse]Keyin]`Port 16,1200 Baud, 500 ms wait
    Put ix,KeyIn ' Store in scratch pad RAM
    If KeyIn=128 Then Goto process_Data ` decimal value 128 could be
    the `end of transmission char'
    Goto MainLoop

    No_Data:
    ` Do something if nothing has arrived in 500ms.
    Goto MainLoop

    process_Data:
    For Ix2=0 to Ix
    Get ix2,KeyIn
    If Ix2>=??? Then LCDOUT ????? something
    Next
    Goto MainLoop

    You find better way of processing data on you're own, I guess.

    Stein.


    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > The easiest way to do that is to store the strings in EEPROM.
    There are
    > several examples on our web site that show how to do this.
    >
    > -- Jon Williams
    > -- Parallax
    >
    >
    >
    Original Message
    > From: billy@b... [noparse][[/noparse]mailto:billy@b...]
    > Sent: Tuesday, December 16, 2003 1:33 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Question - Text in variables . . .
    >
    >
    > Hello,
    >
    > Working with a BS2-IC using Basic Stamp 2.5 I understand that you
    > can store number etc. in variables (nib byte word). How can I
    store
    > a short sentance for display on a LCD later ?
    >
    > Many thanks
    > Billy
    >
    >
    >
    > 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.
    >
    >
    > Yahoo! Groups Links
    >
    > To visit your group on the web, go to:
    > http://groups.yahoo.com/group/basicstamps/
    >
    > To unsubscribe from this group, send an email to:
    > basicstamps-unsubscribe@yahoogroups.com
    >
    > Your use of Yahoo! Groups is subject to:
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
Sign In or Register to comment.