I've been trying to get my LCD screen working , and so I've been looking all over the internet for resources. I like the LiquidCrystal library here, but the lack of a second line made me search for something more. I found this really great site: http://home.iae.nl/users/pouweha/lcd/lcd0.shtml#instruction_set That has everything I'll ever need. Unfortunately, it's written for a PIC in... assembly? So I don't understand a whole lot of what's going on. I looked through his code and saw that lcd.commandWrite(0x38) would initialize a 2 line screen, unfortunately, it initializes a 2-line, 40 character screen, while I have a 16 character. What I want to know is, where did this 0x38 come from? I don't understand how to get this number. Also things like:
MOVLW 0x000 ; disp.off, curs.off, no-blink CALL LCDDMODE CALL LCDCLEAR MOVLW 0x004 ; disp.on, curs.off CALL LCDDMODE
LCDEMODE ANDLW 0x003 ; Strip upper bits IORLW 0x004 ; Function set CALL LCDPUTCMD RETURN
How is he getting the numbers used to turn the cursor on/off and blink on/off? I know that chart in the first link lists those, but I don't get how to figure out the numbers. Thanks!