Menu

16F627 with LCD

Help
MBB
2011-03-19
2013-05-30
  • MBB

    MBB - 2011-03-19

    I used the PRINT command to send words to a 16x1 LCD but only the first 8 characters of the word were displayed.  Am I doing something wrong?  Is their a command that will allow the entire word to be shown on the LCD.

     
  • Nobody/Anonymous

    You should be able to display more than 8 characters using PRINT.

    What make and model of LCD are you using? Could you post your code?

     
  • Nobody/Anonymous

    The LCD may be wired up internally as 8 characters by 2 lines even though its physically 16x1. You could try moving the cursor to the second line using LOCATE and print something - it will probably appear on the last 8 characters.

     
  • Nobody/Anonymous

    The LCD is an Epson EA-D16015AR.

    The code is:
    ;Chip Settings
    #chip 16F627,4
    #config OSC=INTRC_OSC_CLKOUT

    ;Defines (Constants)
    #define LCD_IO 8
    #define LCD_DATA_PORT PORTB
    #define LCD_RS PORTA.2
    #define LCD_RW PORTA.1
    #define LCD_Enable PORTA.3

    'LCD connection settings
    'A program to write words to an LCD display.
    'Show opening message
    Wait 1 s
    Repeat 3
    Print "GCBASIC Words"
    Wait 2 s
    CLS
    Print "Msg. Sent"
    Wait 2 s
    CLS
    End Repeat

     
  • Nobody/Anonymous

    Try adding locates to your repeat loop to see if it is wired as an 8x2 line internally -

    Repeat 3 
        Print "GCBASIC "
        Locate 1,0
        Print "Words" 
        Wait 2 s 
        CLS 
        Print "Message "
        Locate 1,0
        Print "Sent" 
        Wait 2 s 
        CLS 
    End Repeat
    

    If you haven't tried that already.

     
  • MBB

    MBB - 2011-03-25

    I finally got a chance to try the suggested LOCATE command.  It worked. Thanks!

     

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.