Shop OBEX P1 Docs P2 Docs Learn Events
Giving Commands to the 2x20 Serial LCD from Matrix Orbital — Parallax Forums

Giving Commands to the 2x20 Serial LCD from Matrix Orbital

crgwbrcrgwbr Posts: 614
edited 2006-10-12 11:17 in BASIC Stamp
Hey Everyone,
I'm working on a project that's using the 2x20 LCD display from Matrix Orbital, sold by Parallax.· I can write words to it just fine, the problem comes when I try to give it commands, like clear screen.· Acording to the manual these are the commands for clear screen...

Hexadecimal 0xFE 0x58
Decimal 254 88
ASCII 254 “X”
I can't seem to put these into a program without the BS Editor raising an Error.· Does anyone have an idea of how to use them?
Thanks Everyone

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-11 20:52
    Hello,
    ·
    ·· The following should get you going…
    ·
    ·SEROUT LCD_Pin, Baud, [noparse][[/noparse]254, 88, “Hello World!”]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • crgwbrcrgwbr Posts: 614
    edited 2006-10-11 20:59
    Thanks Chris, works great. Hello World, never thought of doing that with a stamp, only python.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-10-11 21:06
    Ah, "Hello world". Yes, ever since the first 'C' book was released, that's the first thing every new language compiler writer has to implement. As a test program, if for no other purpose.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-11 21:45
    crgwbr -

    Chris's answer was kindly, short and fixed your problem, but I'm not sure how much you learned from that. PBASIC will accept any of the number/letter representations which you offered. You just need to tell the PBASIC IDE which representation you are using, as it's certainly no mind reader.

    ASCII - Numbers and letters are plain, and all are in quotation marks:

    · "A", "B", C", "Hello world", etc. per se

    · "1" ," 2", "3", "4", "10", "20", "40", "50", "100" etc. per se

    HEX (hexidecimal) - Alphanumeric characters must be preceeded by the Hex designator which is the $ prefix, as follows:

    · Decimal 1, 2, 3, 4, 5 , 10, 16

    · Hex $01, $02, $03, $05, $0A, $20

    DECIMAL - Decomal numbers are plain and without any prefix:

    1, 2, 3, 4, 5, 10, 20, 50, 100, etc.

    BINARY - Numbers consist of NOTHING but 1's and 0's and are predeeded by the binary designator which is a % sign:

    %0, %1, %01, %11, %1010 0101, etc

    =-=-=-=-=-=-=-=

    I hope that is helpful.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 10/11/2006 9:48:55 PM GMT
  • crgwbrcrgwbr Posts: 614
    edited 2006-10-12 11:17
    Thanks Bruce,
    After Chris showed me how to use decimal, I was trying to figure out Hex. I ended up using the HEX command; I almost scraped the LCD by accedently sending it a new baud rate. Wow am I glad it had a manual reset.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
Sign In or Register to comment.