View Full Version : lcd display (non backlight)
09-18-2008, 10:47 PM
Hello everyone, I have bought a parallax lcd display and connected it to my robot. I wanted to try it out and i have downloaded the demo from the parallax website to see if it works. When i run the the code it displays just "\" on the top row and nothing else. Could anyone help me with this, please?
09-18-2008, 10:53 PM
Parallax has 6 or 7 LCD displays in their catalog. Which display are you trying to use? Which demo program? How have you hooked it up?
At least give the links to the webstore page for the product and the demo program and either describe exactly how you've hooked it up or attach a drawing to your message.
09-18-2008, 11:39 PM
I've got #27976 display, and I am using a Serial_LCD_Demo.BS2 which can be downloaded from www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/lcd/List/1/catpageindex/2/ProductID/50/Default.aspx?SortField=ProductName,ProductName (http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/lcd/List/1/catpageindex/2/ProductID/50/Default.aspx?SortField=ProductName,ProductName)
Its connected by 3 pins to my ARobot's circuit board.
09-19-2008, 12:34 AM
What's your controller? A BS2? BS2px? The Baud codes are dependent on the specific processor you're using.
(if you bought an ARobot stock, it's almost certain a BS2, though, and the only other processor they sell is the BS2e, which uses the same codes, so that's probably not the problem).
If you're using a BS2 with code for a BS2, then I'd recheck your wiring and power supply. If you're getting a character, the power and ground lines almost have to be correct. Is your data line going to the pin you are using to transmit data?
Post Edited (sylvie369) : 9/18/2008 4:39:40 PM GMT
09-19-2008, 12:40 AM
I am using a Parallax #27976 display with BS2, and i am using The baud of 9600 and yes the data line will be on the pin that i will use to transmit the data.
09-19-2008, 12:46 AM
Did you try Test Mode as described in the documentation?
The .BS2 demo program assumes 19,200 Baud. Is your display set that way? I'd actually recommend 2400 Baud for initial testing, then maybe using 9600 Baud. You have to change the DIP-switch settings and the LcdBaud constant at the beginning of the demo program (to T2400 or T9600). 19,200 Baud is more susceptable to noise and timing problems than the lower speeds.
09-19-2008, 12:56 AM
The default baud rate for the code is 19.2Kbps so assuming no changes to the code (recommended), both DIP switches should be ON. Now, as I recall, the ARobot does some interesting things with its I/O pins. I almost think they’re pulled-up or pulled-down; perhaps it was a series resistor. In any event these things may potentially cause problems with certain serial devices if the I/O pin does not fully swing to logic high and low.
09-19-2008, 01:45 AM
What I/O pin do you have your serial LCD connected to? Is it an otherwise uncommitted I/O pin? It looks like the ARobot has 4.7K pullups (to +5V). That shouldn't affect something like this.
09-19-2008, 01:52 AM
I am using pin 3
09-20-2008, 12:12 PM
It might help. I was only sending garbage to the LCD and I found that the constant value is not 110 like the documentation says but 185 @ 19k baud.
You might want to try that to find the right speed. You can adjust the value of the FOR NEXT loop for the range you want to test. The text will appear on the LCD when the right speed is reach.
TXpin CON 0
LcdOn1 CON $16
LcdCls CON $0C
i VAR Word
FOR i = 150 to 200
DEBUG DEC i, CR
serout TXpin, i , [LcdOn1, LcdCls]
SEROUT TXpin, i ["This is a test !!!"]
09-20-2008, 05:35 PM
Hi, thank you for your replys. I have tested the code that Carlinux gave me. I even tried to go from " i = 0 to 400 ,but still no success. When i run the code i get a "_" on the top row. I realised what "\" ment. When i start the code it displays 1 "\", then i run the code again (without turning my robot off) and then it adds another "\", so its two now...and etc. So i assume that it calculates the amount of times i run my code. I have even re soldered my wires...and i am struggling to think of any mistakes that could cause my LCD to stop working...
09-20-2008, 06:31 PM
The BAUDMODE constant is not the same for each of the BS-2 models. The calculated BAUDMODE for 19,200 baud on a BS=22 is 501. Try that and see how it works.
Involvement and committment can be best understood by looking at a plate of ham and eggs. The chicken was involved, but the pig was committed. ANON
09-20-2008, 09:41 PM
Hi, the backslash is custom character zero so it seems at least the lcd is initializing and reacting to some kind of input. I would probably simplify the code and using 9600 (make sure the lcd dip switches are set to 9600) just try to send 1 character
SEROUT TX,baud, 'LCD on no cursor no blink
SEROUT TX,baud, 'move to position 0 line 0
SEROUT TX,baud,["A"]· 'send character A
if you can get everything set up right the above should place an A on the first line
09-21-2008, 02:28 AM
nothing works, still i get a "\" or "_"...
09-21-2008, 02:43 AM
Again, try the following in order (go on the next step only if the current step works as expected):
1) Put the LCD display into test mode (according to the documentation) and make sure it displays the message it's supposed to display.
2) Set the LCD display to 2400 Baud (with the DIP switches) and set your demo program to 2400 Baud. Use the Baud constant for the Stamp
module you have and normal mode as listed in the Stamp Basic Manual (or the Stamp Editor Help). Make sure your wiring is correct and the
serial LCD is connected to the I/O pin used by your demo program. Make sure +5V and ground are connected properly.
3) Try changing the demo program and the LCD display to 9600 Baud
4) Try changing the demo program and the LCD display to 19200 Baud