Shop OBEX P1 Docs P2 Docs Learn Events
27977 Backlight problems — Parallax Forums

27977 Backlight problems

ocean billocean bill Posts: 15
edited 2012-06-14 14:26 in General Discussion
My code is in a loop with other subroutines. When I turn the backlight on (SEROUT TxPin, Baud19200, [$11], the light and displayed text work as expected. However, when the LCD routine is entered again (see attachment), the LCD does not light again and sometimes the text is not displayed. Other problems and erratic behavior or observed. Hopefully you can help.
Ocean Bill

HIGH TxPin ' Set pin high to be a serial port
PAUSE 100 ' Pause for Serial LCD to initialize
SEROUT TxPin, Baud19200, [$0C,$16] ' display cleared, cursor off
SEROUT TxPin, Baud19200, [$11] ' Turns backlight on (causes problems)
SEROUT TxPin, Baud19200, [DEC TempC/100,".", DEC TempC//100," C Sample ", DEC AvgCtr +1]
PAUSE 500

Comments

  • GadgetmanGadgetman Posts: 2,436
    edited 2012-06-14 14:26
    Please use the (CODE) tags when entering program code
      HIGH TxPin                                              ' Set pin high to be a serial port
      PAUSE 100                                              ' Pause for Serial LCD to initialize
      SEROUT TxPin, Baud19200, [$0C,$16]       ' display cleared, cursor off
      SEROUT TxPin, Baud19200, [$11]              ' Turns backlight on  (causes problems)
      SEROUT TxPin, Baud19200, [DEC TempC/100,".", DEC TempC//100," C Sample ", DEC AvgCtr +1]
      PAUSE 500
    

    Makes it much more readable...

    What are you using to power this setup?
Sign In or Register to comment.