Hi Henrik
Here's what I'd come up with late last night (I wish I'd posted it now before I went to bed as not the far off I don't think).
I set LCD_LINES 4 as the display is a 4*20.Code:DEFINE LCD_DREG PORT.A ' Set LCD Data port DEFINE LCD_DBIT 0 ' Set starting Data bit (0 or 4) if 4-bit bus DEFINE LCD_RSREG PORT.A ' Set LCD Register Select port DEFINE LCD_RSBIT 4 ' Set LCD Register Select bit DEFINE LCD_EREG PORTC ' Set LCD Enable port DEFINE LCD_EBIT 0 ' Set LCD Enable bit DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits) DEFINE LCD_LINES 4 ' Set number of lines on LCD DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us DEFINE LCD_DATAUS 50
The one I'm missed was LCD_EBIT 0 (it was late).
Also the PIC is a 16F684 PORTA and PORTC
Thank you for taking the time to do go through it all though (really appreciated) I'll load it later today and hopefully have some success (I'm just a little worried I've fried the LCD).
David




Bookmarks