Shop OBEX P1 Docs P2 Docs Learn Events
problems with display messages on LCD — Parallax Forums

problems with display messages on LCD

wu4m4nwu4m4n Posts: 22
edited 2010-05-21 20:44 in BASIC Stamp
I buy the super basic stamp carrie with lcd screen
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/27976/List/0/SortField/4/ProductID/51/Default.aspx

Guide
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/27976-7-9-ParallaxSerialLCD-v2.1.pdf

Achievement to show me the example of parallax message

Now change the "baudrate" to 19200 2 swich bone are in "On"

Now run the following program


' {$STAMP BS2}
TxPin CON 0
Baud19200 CON 32
HIGH TxPin ' Set pin high to be a serial port
PAUSE 100 ' Pause for Serial LCD to initialize
SEROUT TxPin, Baud19200, [noparse][[/noparse]"Hello, this text will wrap."]




But the LCD only shows me "_" , and nothing happens

What could be happening?

Thank you very much

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-20 00:16
    Basic stamps can't do serial that fast reliably, try a slower baud rate. Check out the manual to see what the max baud rates are for the stamp you have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • wu4m4nwu4m4n Posts: 22
    edited 2010-05-20 00:43
    yes, i down the rate to 9600 ((SW1 off) + (SW2 on))

    and i test this code

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    '84 is argument for 9600 buad
    
    SEROUT 14, 84, [noparse][[/noparse]22, 12, 22] ' 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
    



    but stil dont working.

    Post Edited (wu4m4n) : 5/20/2010 1:26:52 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-05-20 01:24
    You have SEROUT 14

    Your dwg shows its RX connected to P0 so your commands need to start with SEROUT 0

    '·{$STAMP·BS2}
    '·{$PBASIC·2.5}

    '84·is·argument·for·9600·buad

    SEROUT·0,·84,·[noparse][[/noparse]22,·12,·22]·'·Initialize·LCD
    PAUSE 1000

    END·'·Program·end
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-20 18:54
    Make sure that any time you change baud rate switches on the LCD display that you turn off the power to the LCD display and the basic stamp
    then re power both of them


    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
     
    '84 is argument for 9600 baud
     
    SEROUT 15, 84, [noparse][[/noparse]22, 12, 22] ' Initialize LCD on Pin 15
    
    PAUSE 20    ' you can use 5 but you can only see the second line  not first line 
     
    SEROUT 15, 84, [noparse][[/noparse]"See this ?", 13, ' Text message, carriage return
                    "The LCD works!"] ' more text on Line 1.
     
    END ' Program end 
    


      ' {$STAMP BS2}          ' CON is the # which ever pin you are using on your basic stamp board pin 
     
    Tx_Pin       CON   15     ' Pin 15 =  the Basic Stamp pin then to LCD display
     
    Baud_19200   CON   32
     
    HIGH Tx_Pin               ' Pin 15  Set pin HIGH TO be a serial port
     
    PAUSE 100                 ' Pause for Serial LCD to initialize
     
    SEROUT Tx_Pin, Baud_19200, [noparse][[/noparse]"Hello, this text will wrap."] 
    


    I tryed both of them and they work
    ·
     ' -----[noparse][[/noparse] Constants ]-------------------------------------------------------
     
    #SELECT $STAMP                  ' You need to use  the right CON for which Basic Stamp and for which Baud rate for the LCD
                                    ' that you are using
      #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     T19K2
    



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/20/2010 7:30:04 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-20 19:18
    @wu4m4n -·Are you using a BS2 or another model of BASIC Stamp?

    @Franklin - The BS2 can transmit reliably well past 19.2Kbps...in fact it communicates with the PSC at 38.4Kbps just fine, both send and receive.· What the BASIC Stamp does have a problem with at higher baud rates is large packets of data or formatted data.· Simple sending and receiving of a few bytes at 38.4Kbps should never be a problem.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering


    Post Edited (Chris Savage (Parallax)) : 5/20/2010 7:35:56 PM GMT
  • wu4m4nwu4m4n Posts: 22
    edited 2010-05-21 05:53
    @Chris Savage (Parallax):
    Buy GPS datalogger kit and LCD together.
    Datalloger GPS comes with the Basic Stamp Super Carrier.

    I have installed the LCD as follows.
    rtmgbl.jpg

    Check out step by step the code and still not working.
  • electrosyselectrosys Posts: 212
    edited 2010-05-21 09:15
    Have you test your LCD module? (SW1=off + SW2=off) then trun on the power to LCD module (+5V), you have to see the:
    [noparse][[/noparse]Parallax. Inc - www.Parallax.com]
    If you cann't see the text, try to adjust the cotrast pot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-21 18:32
    By posting that picture you may have saved some time...If you only made the three connections you show highlighted then the serial data is never getting to the LCD. The buss from each I/O pin is intentionally broken at certain points to allow various configurations. In order for P0 to connect you must also make the following connection on your board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    512 x 384 - 55K
  • wu4m4nwu4m4n Posts: 22
    edited 2010-05-21 20:44
    MANY MANY MANY THANKS TO ALL
    it was the problem had no connection with pin 0.
    Thanks for the panciencia too am a novice level -1 and see for the first time I see my text on the LCD is AWESOME.
Sign In or Register to comment.