Shop OBEX P1 Docs P2 Docs Learn Events
Some problem with serial LCD — Parallax Forums

Some problem with serial LCD

ArchiverArchiver Posts: 46,084
edited 2004-02-26 13:10 in General Discussion
Hi , i am using BPI-216 serial lcd , i use the program as stated
below , after setting the baud rate to 9600 on the lcd , the lcd
give me texts thats is not readable. And before this after i apply
power to the LCD it fill the screen with the symbol which is ffound
on the lcd character table 0,0. do any one have any idea
==================================================================
N9600 CON $4054 ' Baudmode-9600 bps inverted. Use $40F0 for BS2-SX.
I CON 254 ' Instruction prefix value.
CLR CON 1 ' LCD clear-screen instruction.
LINE2 CON 192 ' Address of 1st char of 2nd line.
L1_C7 CON 135 ' Address of line 1, character 7.
' Now clear the screen in case there's text left from a previous
' run of the program. Note that there's a 1-second PAUSE prior to
' sending any data to the Backpack. This gives the Backpack plenty
' of time to initialize the LCD after power up.
PAUSE 1000
SEROUT 0,n9600,[noparse][[/noparse]I,CLR] ' Clear the LCD screen.
PAUSE 1
SEROUT 0,n9600,[noparse][[/noparse]"Hello World!"] ' Print message.
' Positioning the cursor requires sending the instruction prefix
(ASCII
' 254, assigned the symbol "I") followed by an address.
SEROUT 0,n9600,[noparse][[/noparse]I,LINE2,"..line 2"] ' Move to line 2 and print.
' Now we'll simulate a common application by printing a label on the
' screen and updating some data by positioning the cursor.
PAUSE 2000 ' Wait 2 secs.
SEROUT 0,n9600,[noparse][[/noparse]I,CLR] ' Clear the LCD screen.
PAUSE 1
SEROUT 0,n9600,[noparse][[/noparse]"Count:"] ' Print the label.
Again:
SEROUT 0,n9600,[noparse][[/noparse]I,L1_C7] ' Move to line 1, character 7.
SEROUT 0,n9600,[noparse][[/noparse]DEC B2," "] ' Print value of b2 followed by 2 spaces.
B2 = B2+1 ' Increment b2.
PAUSE 200 ' Slow the loop down.
GOTO Again ' Repeat endlessly

=====================================================================

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-26 13:10
    What Stamp are you using? The baudmode setting may be wrong for your
    particular Stamp.

    -- Jon Williams
    -- Parallax


    Original Message
    From: SkYbOL [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qbNAnwbES3SY_Q7S-pehkvd35HADqUdDChPN2rCJaYRBzg_SO99Y2No4wdwOzGpJnn6RP4c80CRjNdI]skybol1@y...[/url
    Sent: Wednesday, February 25, 2004 11:36 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Some problem with serial LCD


    Hi , i am using BPI-216 serial lcd , i use the program as stated
    below , after setting the baud rate to 9600 on the lcd , the lcd
    give me texts thats is not readable. And before this after i apply
    power to the LCD it fill the screen with the symbol which is ffound
    on the lcd character table 0,0. do any one have any idea
    ==================================================================
    N9600 CON $4054 ' Baudmode-9600 bps inverted. Use $40F0 for BS2-SX. I
    CON 254 ' Instruction prefix value. CLR CON 1 ' LCD clear-screen
    instruction. LINE2 CON 192 ' Address of 1st char of 2nd line. L1_C7 CON
    135 ' Address of line 1, character 7. ' Now clear the screen in case
    there's text left from a previous ' run of the program. Note that
    there's a 1-second PAUSE prior to ' sending any data to the Backpack.
    This gives the Backpack plenty ' of time to initialize the LCD after
    power up. PAUSE 1000 SEROUT 0,n9600,[noparse][[/noparse]I,CLR] ' Clear the LCD screen.
    PAUSE 1 SEROUT 0,n9600,[noparse][[/noparse]"Hello World!"] ' Print message. ' Positioning
    the cursor requires sending the instruction prefix
    (ASCII
    ' 254, assigned the symbol "I") followed by an address.
    SEROUT 0,n9600,[noparse][[/noparse]I,LINE2,"..line 2"] ' Move to line 2 and print. ' Now
    we'll simulate a common application by printing a label on the ' screen
    and updating some data by positioning the cursor. PAUSE 2000 ' Wait 2
    secs. SEROUT 0,n9600,[noparse][[/noparse]I,CLR] ' Clear the LCD screen. PAUSE 1 SEROUT
    0,n9600,[noparse][[/noparse]"Count:"] ' Print the label.
    Again:
    SEROUT 0,n9600,[noparse][[/noparse]I,L1_C7] ' Move to line 1, character 7.
    SEROUT 0,n9600,[noparse][[/noparse]DEC B2," "] ' Print value of b2 followed by 2 spaces. B2
    = B2+1 ' Increment b2. PAUSE 200 ' Slow the loop down. GOTO Again '
    Repeat endlessly

    =====================================================================




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
Sign In or Register to comment.