Shop OBEX P1 Docs P2 Docs Learn Events
Serout & lcd — Parallax Forums

Serout & lcd

KenMKenM Posts: 657
edited 2005-05-31 14:54 in BASIC Stamp
When I download the following program the desired text is displayed on the LCD.

If I remove power, then re-apply power should the same occur?

Removing power and reapplying power the text is not displayed, cursor is at line 0 position 0.

If I hit reset, the desired text is displayed.

Pause 2000 yeilds the same result.

This is using a Parallax serial LCD.

What am I missing?
'   {$STAMP BS2p}
'   {$PBASIC 2.5}
'
' 

T9600           CON     240
TxPin           CON     0

 
 

' -----[noparse][[/noparse] Initialization ]------------------------------------------------
Reset:

PAUSE 200
' -----[noparse][[/noparse] Program Code ]--------------------------------------------------
Main:
 
 
HIGH TxPin
PAUSE 100
SEROUT TxPin, T9600 , [noparse][[/noparse]12]

HIGH TxPin
PAUSE 100
SEROUT TxPin, T9600 , [noparse][[/noparse]"Testing 123"]

END
 

Post Edited (KenM) : 5/31/2005 2:49:36 PM GMT

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-31 11:35
    You need to give the LCD at least five milliseconds after a clearscreen command.· I've attached an updated (for BS2p) demo program that provides a lot of helpful constants.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • KenMKenM Posts: 657
    edited 2005-05-31 14:54
    Jon,
    Thank you....dang-it!!!!!!!!!!!!!!!!!!!!!!
    Right there in the documentation..."You will need to pause 5mS in your code after sending the Form Feed command..."
    Sorry for wasting your time.
    The demo program is cool.

    Ken
    Jon Williams (Parallax) said...
    You need to give the LCD at least five milliseconds after a clearscreen command.· I've attached an updated (for BS2p) demo program that provides a lot of helpful constants.·

Sign In or Register to comment.