Shop OBEX P1 Docs P2 Docs Learn Events
4x20 LCD with keypad support — Parallax Forums

4x20 LCD with keypad support

ManuelManuel Posts: 105
edited 2005-08-05 16:03 in General Discussion
Hey, can anyone help me with the code for the 4x20 LCD with keypad support sold by parallax.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards

Manuel C. Reinhard

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-01 18:37
    Manuel,

    ·· What sort of help are you looking for?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ManuelManuel Posts: 105
    edited 2005-08-01 19:16
    Well i read that it uses I2C or RS-232 comunication. what would be the best option for me?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-01 20:32
    Manuel,

    ·· That's kind of a hard question to answer.· On the one hand serial uses only 1 I/O pin, whereas I2C uses 2.· However there is no native support for the I2C on the BS2, so unless you have a BS2p or higher you will need to handle it manually in code.· That's just a couple of quick things to consider.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ManuelManuel Posts: 105
    edited 2005-08-01 22:11
    The project is using a BS2p40

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-01 22:48
    Manuel,

    ·· I guess it boils down to a combination of choice (Preference) and whether or not you'll have any other I2C devices attached that may make it worth going that route.· Personally I use serial when available.· Although if I needed to connect 2 or 3 other I2C devices, I might be inclined to use that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ManuelManuel Posts: 105
    edited 2005-08-01 23:53
    Are the shiftin and shiftout used for this this communication, or what commands will be the best for me to use?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-02 14:45
    Manuel,

    ·· You said you have a BS2p40, correct?· That Stamp Model has I2C commands built-in.· Please see your help file under I2CIN and I2COUT.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-02 16:24
    Hey guys,

    sorry to interrupt you - did you notice the http://forums.parallax.com/showthread.php?p=544960 thread in the Sandbox section.

    Manuel, why didn't you - at first place - exactly specify the type of LCD display you want to use (Parallax stock number, or manufacturer plus type code) and the device you plan for controlling the display, a BASIC Stamp (which one) or an SX controller.

    This would make it a lot easier for Chris (and others) to give you the right answers quickly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-08-04 21:21
    Manuel,

    What is the model number of your LCD?
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-04 23:25
    Tom-Matrix Orbital,

    Yep - you're hitting the nail.

    Manuel,

    my last post was not intended to discourage you from posting to the forum - I just asked you to be a bit more specific, so please don't mind.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-04 23:26
    That model LCD is LK-204-25-WB

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ManuelManuel Posts: 105
    edited 2005-08-05 15:17
    Sorry i didnt answer this tread for a long time, i got really sick and only had time to check some other threads concerning to my project. This thread is for me to try to help someone. I will check the I2Cin and out commands.
    Thanx

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-08-05 16:03
    Manuel,

    I written a basic program that just displays the large digits for the display via I2C. This may come in handy for you. Any RS-232 samples being used with Matrix Orbital displays can be found at http://www.matrixorbital.ca/appnotes/basic_stamp/

    '{$STAMP BS2p}

    Digit VAR Byte 'Create the variables
    Reps VAR Nib

    Digit = 0 'Make sure the variables are 0
    Reps = 0

    I2COUT 1,$5C, [noparse][[/noparse]254] 'Command Prefix
    I2COUT 1,$5C, [noparse][[/noparse]88] 'Clear screen command

    I2COUT 1,$5C, [noparse][[/noparse]254] 'Command Prefix
    I2COUT 1,$5C, [noparse][[/noparse]110] 'Initilize Large Digits command

    FOR Reps = 1 TO 10 'A loop to repeat it self 10 times

    I2COUT 1,$5C, [noparse][[/noparse]254] 'Command Prefix
    I2COUT 1,$5C, [noparse][[/noparse]35] 'Display large digit command
    I2COUT 1,$5C, 'Display large digit in column 1
    I2COUT 1,$5C, [noparse][[/noparse]Digit] 'Display the large digit
    Digit = Digit + 1 'Increment by 1
    PAUSE 1000 '1 second pause to see the text
    NEXT

    STOP

    Best Regards,

    Tom Lam
Sign In or Register to comment.