Shop OBEX P1 Docs P2 Docs Learn Events
#27976 #27977 Serial_LCD_Demo.sxb slimming causes failure — Parallax Forums

#27976 #27977 Serial_LCD_Demo.sxb slimming causes failure

John KauffmanJohn Kauffman Posts: 653
edited 2007-08-06 11:23 in General Discussion
#27976 #27977 Serial_LCD_Demo.sxb slimming causes failure

The sample code provided for part #27976 #27977 Serial LCD (Serial_LCD_Demo.sxb) works like a charm. Line one displays a message, line two displays a message with animation and then it all flashes.

Now·I'd like to get a leaner version, similar to the "template" offered for other proudcts (viz. DS1302). In this case, just the line one display.

Deleting the block of code for flashing works fine (Serial_LCD_Demo-NoFlash.sxb).

But when I delete the animation code & run, I get nothing on the screen, not even the first line (Serial_LCD_Demo-NoFlash-NoANimation.sxb).

Any suggestions? All three files attached below.

Thanks.

Comments

  • BeanBean Posts: 8,129
    edited 2007-08-06 11:23
    John,
    · It is because you are clearing the LCD as soon as you display the string.

    Main:
      LCD_OUT LcdBLoff    ' backlight off
      LCD_OUT LcdOn1    ' no cursor or blink
      LCD_OUT LcdCls    ' clear the LCD
      WAIT_MS 250
      LCD_STR " PARALLAX SX/B 2"
     
    ' Scroll "chomper" animation across LCD line 2
    ' Flash LCD backlight (works only with backlit model)
     
      GOTO Main
    

    · Right after you do the LCD_STR command, you loop back and clear the screen.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
Sign In or Register to comment.