LCD Help
ineedlcdhelp
Posts: 19
I got a parallax 2x16 LCD screen for use with a BS2 (Rev G) for a project. None of the sample code worked. The screen would just stay there with the cursor in the upper left and not respond to my commands. I was thinking that maybe it is a problem with the baud rate, and maybe the screen I got, or something I am using differs from the sample code. Does anyone know how I can get it working?
Comments
First of all, I'm assuming that what you have is a serial LCD. Everything is very different for the parallel ones. If yours is parallel, let us know - otherwise you'll get a bunch of meaningless advice.
The LCD should have a couple of dip switches on the back to set self test and the various baud rates. Set it to 19,200 (ON - ON). Then try this piece of code (from the docs):
If that doesn't work, try setting it to 9600 (OFF - ON) and change the second constant to 84 in the code and run it again. What happens?
This is how everything is wired:
+9V (Battery)----voltage regulator
GND (Battery)----voltage regulator(GND)----screen GND
+5V output from regulator----screen +5V
P0----screen Rx
Can you confirm that you have set the DIP switches on the back?
Also you can try moving both DIP switches to OFF and supplying +5V to the LCD (+5 and gnd connections). That should give you the standard
"Parallax, Inc.
www.parallax.com"
self-test display. If that does not work, you've got a broken LCD.
Did you by· any chance hook power to the wrong pins
The reason I ask is I did this once then after that it did the same thing
With that type of pin connector this is very easy to do
One more thing
YOU MUST POWER DOWN THE LCD WHEN CHANGING THE BAUD RATE·SWITCHES
·for the chances to take hold.......not doing this will make the LCD not work Also
·Try this routine and see if this works·I used the same LCD Display· ·
·' {$STAMP BS2}
' {$PBASIC 2.5}
LCD············ · ·PIN···· 0
LineOne0······· ·CON···· $80
LineTwo0······· ·CON···· $94
ClearScreen····· CON···· $0C
Baud············· ·CON···· 32············· ' baudmode constant for LCD Display
DO
SEROUT LCD, Baud, [noparse][[/noparse]lineOne0," HELLO"]
SEROUT LCD, Baud, [noparse][[/noparse]lineTwo0," WORLD"]
LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 12/2/2008 1:58:52 AM GMT
Have you tried using a different I/O pin? Move the wire to one of the higher pins, and change the constant in the program, and try that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Make sure that you power down both the Basic Stamp and the LCD display when doing this
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
is this on a bread board that you are doing this on
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
You tried a new battery?
(sorry, but we've already gone through all of the obvious things)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
It sounds to me like you do know what you're doing, and you've tried the right stuff already.
coryb do You have the cable attch. to the back of the LCD rite???
You showed 4 pins on the back of the LCD but are useing a 3 pin cable?
___________$WMc%_____"We arnt dune Yet"__
coryb..Your not pluging into X4 14 or 15 with the LCD are You?
I just set up a test demo from My sons BOE bot. with the serial LCD. It worked fine
RX to pin 0 on $stamp header NOT X4
Vdd to 5 volts+
Vss to GRD.
'{$STAMP BS2}
TxPin CON 0
Baud19200 CON 32
HiIGH TxPin
PAUSE 100
SEROUT TXPin, Baud19200,[noparse][[/noparse]"Helo,this text will wrap."]
______$WMc%__Try this____