PDA

View Full Version : Serout & lcd



KenM
05-31-2005, 12:16 PM
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




' -----[ Initialization ]------------------------------------------------
Reset:

PAUSE 200
' -----[ Program Code ]--------------------------------------------------
Main:


HIGH TxPin
PAUSE 100
SEROUT TxPin, T9600 , [12]

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

END


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

Jon Williams
05-31-2005, 06:35 PM
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

KenM
05-31-2005, 09:54 PM
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.