Shop OBEX P1 Docs P2 Docs Learn Events
Problem with Serial LCD Display — Parallax Forums

Problem with Serial LCD Display

aviator3.1aviator3.1 Posts: 20
edited 2010-10-17 17:01 in BASIC Stamp
Real quick,

I have read up on all the documentation regarding the Parallax 2x16 Serial LCD. When I place it in test mode I get the proper display on the screen

"Parallax, Inc.
www.parallax.com"

and after a while pac man starts to eat the characters up.

I'm assuming that if the test functions correctly that the display is in proper working order.

What is happening is I am setting the Baud Rate to 9600 with SW1 OFF and SW2 ON since I'm using the BS2. A cursor is showing up at line 0 character space 0.
When I go to load a simple program onto the BS2 such as the one found in the documentation nothing happens.

' Smart Sensors and Applications - LcdTestMessage.bs2
' Display a test message on the Parallax Serial LCD.
' {$STAMP BS2} ' Target device = BASIC Stamp 2
' {$PBASIC 2.5} ' Language = PBASIC 2.5
SEROUT 14, 84, [noparse][[/noparse]22, 12] ' Initialize LCD
PAUSE 5
SEROUT 14, 84, [noparse][[/noparse]"See this?", 13, ' Text message, carriage return
"The LCD works!"] ' more text on Line 1.
END ' Program end


This is not a new display that I just purchased but one I found laying around the lab and it doesn't appear to be damaged in any way.
I'm familiar with all the command sets used to write characters to the display but I'm not getting anything.

I've tried different baud rates and different pin numbers etc etc and nothing.

Has anyone encountered a problem like this before?

Thanks
-Dan

Comments

  • MoskogMoskog Posts: 554
    edited 2010-04-20 15:52
    ·Will this code work for you?
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
     TX              PIN     14               ' serial output to LCD
    
    ' -----[noparse][[/noparse] Constants ]-------------------------------------------------------
    #SELECT $STAMP
      #CASE BS2, BS2E, BS2PE
        T2400       CON     396
        T9600       CON     84
        T19K2       CON     32
      #CASE BS2SX, BS2P
        T2400       CON     1021
        T9600       CON     240
        T19K2       CON     110
    #ENDSELECT
     
    LcdBaud         CON     T9600           ' Baud rate 9600
    LcdBkSpc        CON     $08             ' move cursor left
    LcdRt           CON     $09             ' move cursor right
    LcdLF           CON     $0A             ' move cursor down 1 line
    LcdCls          CON     $0C             ' clear LCD (use PAUSE 5 after)
    LcdCR           CON     $0D             ' move pos 0 of next line
    LcdBLon         CON     $11             ' backlight on
    LcdBLoff        CON     $12             ' backlight off
    LcdOff          CON     $15             ' LCD off
    LcdOn1          CON     $16             ' LCD on; cursor off, blink off
    LcdOn2          CON     $17             ' LCD on; cursor off, blink on
    LcdOn3          CON     $18             ' LCD on; cursor on, blink off
    LcdOn4          CON     $19             ' LCD on; cursor on, blink on
    LcdLine1        CON     $80             ' move to line 1, column 0
    LcdLine2        CON     $94             ' move to line 2, column 0
     
     
    Reset:
      HIGH TX                               ' setup serial output pin
      PAUSE 100                             ' allow LCD to initialize
    
    Main:
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBLoff, LcdOn1, LcdCls]
      PAUSE 250
      SEROUT TX, LcdBaud, [noparse][[/noparse]"See this?"]
      PAUSE 2000
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdCr]
      SEROUT TX, LcdBaud, [noparse][[/noparse]"The LCD works!"]
      PAUSE 2000
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBLon]
      PAUSE 2000
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBloff,Lcdoff]
      END
    
    
  • aviator3.1aviator3.1 Posts: 20
    edited 2010-04-20 21:56
    No it doesn't. I have tried that piece of code as well. I have tried almost every piece of code I could find documented.

    I'm just under the assumption that if the test mode works then the display should be functioning properly. But its not working at any other time as if it has something locked in memory somewhere.
  • Adrian SchneiderAdrian Schneider Posts: 92
    edited 2010-04-21 10:48
    I use
    LCDBD       CON   16468               ' 8,n,9600,inv
    
    


    for my serial (Seetron 4x16) LCD baudrate. Maybe your LCD works with that one?

    Regards
    Adrian
  • wizardonmainwizardonmain Posts: 2
    edited 2010-10-17 17:01
    I am having this same problem. There dose not seem to be a solution in this thread. Does anyone have some answers?
Sign In or Register to comment.