Shop OBEX P1 Docs P2 Docs Learn Events
LCD Commands — Parallax Forums

LCD Commands

CheechCheech Posts: 30
edited 2005-07-19 18:39 in BASIC Stamp
I just got my BS2p40 and I am playing with the LCD.· How do I implement some of the commands shown on page 23 of http://www.parallax.com/dl/docs/prod/audiovis/molcd4x20.pdf·?· I used one of the demos and the animation was all off.· For a simple test I just to turn the backlight on and off
PDF said...
6.1.4 Backlight off (254 70)
This command turns the backlight of the LK204-25 off.
but I dont know where to shove 254 70

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-16 03:55
    Cheech,

    ·· The timing of the Demo may be off because you're using the BS2p40, which is faster than a BS2.· As for the commands to turn things on and off, well they go into the SEROUT statement.

    SEROUT LCD, Baud, [noparse][[/noparse]254, 66, 1, "Backlight on for one minute!"]
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • CheechCheech Posts: 30
    edited 2005-07-16 04:02
    Mind elaborating on how you got that command? Don't I need to put that 70 somewhere?
  • CheechCheech Posts: 30
    edited 2005-07-16 04:10
    Ah nevermind, I fixed your code:
    SEROUT TX, LcdBaud, [noparse][[/noparse]254, 70]
    

    Edit: Now how do I get that into hex so I can put that in my Constants?· Or is there another way to define a constant that you dont need hex?·

    Post Edited (Cheech) : 7/16/2005 4:16:17 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-16 06:03
    Cheech,

    ·· My code didn't need any fixing.· You asked for an example of how to use the commands and I provided one.· You simply need to try them out based on the examples you're given.· And constants don't need to be in Hex, they can be in Decimal or even Binary.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • CheechCheech Posts: 30
    edited 2005-07-16 18:29
    LcdCls          CON     254, 88
    


    That gives me Unexpected ':' or end-of-line error
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-07-16 20:33
    Cheech -

    From the Stamp Editor's point of view the " , " (comma) is the end of line character, and that is not a legal line termination. Why does it think that? A CON statement (constant) can only have one legitimate character, or number following the word CON. In this case you have the " , " (comma) and " 88 " as additional characters/numbers.

    These would be legitimate uses as an alternative:

    CLSchar1 CON 254
    CLSchart2 CON 88

    SEROUT blah, blah, blah, [noparse][[/noparse]CLSchar1, CLSchar2]

    OR

    CLSChar VAR NIB

    CLSchar = 254 + 88

    SEROUT blah, blah, blah, [noparse][[/noparse]CLSchar]

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 7/16/2005 8:52:33 PM GMT
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-07-19 18:39
    You can also find app notes on interacing a Stamp to a Matrix Orbital display at http://www.matrixorbital.ca/appnotes/basic_stamp/

    Best Regards,

    Tom Lam
Sign In or Register to comment.