Shop OBEX P1 Docs P2 Docs Learn Events
lcd display (non backlight) — Parallax Forums

lcd display (non backlight)

R0y4LR0y4L Posts: 23
edited 2008-09-20 18:43 in BASIC Stamp
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?

Thank you

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit: www.vbnoobs.co.uk

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-18 14:53
    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.
  • R0y4LR0y4L Posts: 23
    edited 2008-09-18 15:39
    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
    Its connected by 3 pins to my ARobot's circuit board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit: www.vbnoobs.co.uk
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-09-18 16:34
    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
  • R0y4LR0y4L Posts: 23
    edited 2008-09-18 16:40
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit: www.vbnoobs.co.uk
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-18 16:46
    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.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-18 16:56
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-18 17:45
    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.
  • R0y4LR0y4L Posts: 23
    edited 2008-09-18 17:52
    I am using pin 3

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit: www.vbnoobs.co.uk
  • CarlinuxCarlinux Posts: 15
    edited 2008-09-20 04:12
    Hi,

    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.

    Thanks,
    Carl


    TXpin CON 0

    LcdOn1 CON $16
    LcdCls CON $0C

    i VAR Word

    FOR i = 150 to 200
    DEBUG DEC i, CR
    HIGH TXpin
    pause 1500
    serout TXpin, i , [noparse][[/noparse]LcdOn1, LcdCls]
    pause 250
    SEROUT TXpin, i [noparse][[/noparse]"This is a test !!!"]
    pause 1000
    LOW TXpin
    NEXT
  • R0y4LR0y4L Posts: 23
    edited 2008-09-20 09:35
    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...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit: www.vbnoobs.co.uk
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-09-20 10:31
    R0y4L -

    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.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-09-20 13:41
    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

    PAUSE 3000
    SEROUT TX,baud,[noparse][[/noparse]22] 'LCD on no cursor no blink
    PAUSE 1000
    SEROUT TX,baud,[noparse][[/noparse]128] 'move to position 0 line 0
    PAUSE 1000
    SEROUT TX,baud,[noparse][[/noparse]"A"]· 'send character A

    if you can get everything set up right the above should place an A on the first line

    Jeff T.
  • R0y4LR0y4L Posts: 23
    edited 2008-09-20 18:28
    nothing works, still i get a "\" or "_"...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit: www.vbnoobs.co.uk
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-20 18:43
    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
Sign In or Register to comment.