Menu

LCD Challenge

Help
2008-03-16
2013-05-30
  • Nobody/Anonymous

    I'm using the following code. I know the LCD is working because I can use examples that just print text and the text is displayed.

    If I use the following with the LCDInt line, it works and displays an increasing number.

    If I replace the LCDInt with LCDHex, the display doesn't work properly. It displays random things all over the display and doesn't display hex characters.

    Any ideas why LCDHex won't work?

    Thanks,

    ...Dave

    'Hardware settings
    #chip 16F716, 4
    #config WDT_OFF
    #config OSC = XT
    #config CP = OFF

    'LCD connection settings
    '#define LCD_IO 4
    '#define LCD_DATA_PORT PORTC
    #define LCD_IO 4
    #define LCD_DB4 PORTB.4
    #define LCD_DB5 PORTB.5
    #define LCD_DB6 PORTB.6
    #define LCD_DB7 PORTB.7
    #define LCD_RS PORTB.0
    #define LCD_RW PORTB.1
    #define LCD_Enable PORTB.2

    For Counter = 1 to 255
         cls
         LCDInt Counter
         wait 25 10ms
        next

     
    • Hugh Considine

      Hugh Considine - 2008-03-19

      This is due to a minor bug in the LCDHex routine. I'll fix it when I can, but until then adding this line at the very start of the LCDHex routine should make it work:

      Set LCD_RS On

       
    • Nobody/Anonymous

      Thank you, that fixed the problem.

      ...Dave

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.