OK. I didnt know what the LCD_LINES define actually did so I took a look in PBPPIC14.LIB and located this section of code.....
The "Function Set" register of the 44780 LCD controller chip has the following bitsCode:if (LCD_BITS == 8) if (LCD_LINES == 1) movlw 30h ; 8-bit mode, 1 line, 5x7 font else movlw 38h ; 8-bit mode, 2+ lines, 5x7 font endif else if (LCD_LINES == 1) movlw 20h ; 4-bit mode, 1 line, 5x7 font else movlw 28h ; 4-bit mode, 2+ lines, 5x7 font endif endif
D7 = 0
D6 = 0
D5 = 1
D4 = DL
D3 = N
D2 = F
D1 = -
D0 = -
where
DL = DataLength
1 = 8 bits
0 = 4 bits
N = Number of lines
1 = 2(+) lines
0 = 1 line
F = Font
1 = 5x10 dots
0 = 5x8 dots
So looking at the code in the library file, the define is acted upon but is only used to correctly configure the display driver chip for the LCD display connected to it during initialisation.
When you consider that there isnt a define for LCD_CHARS to declare how many characters are on a line then it follows that it cant do anything clever such as work out that you have reached the end of line 1 and move to the start of line 2.
PBP does an awful lot of the hard work for you but there are times when you have to take care of some things yourself.




Bookmarks