4x20 LCD with keypad support
Manuel
Posts: 105
Hey, can anyone help me with the code for the 4x20 LCD with keypad support sold by parallax.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
Comments
·· What sort of help are you looking for?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
·· 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
·· 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
·· 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
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
What is the model number of your LCD?
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 Savage
Parallax Tech Support
csavage@parallax.com
Thanx
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Best Regards
Manuel C. Reinhard
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