ADCON, CMCON etc have no effect on PORTB which is what you're connected to.
1. Assuming your connections are as per your Defines, increase the Pause at the start of your program. Different LCD's from different manufacturers require different lengths of time to wake up and initialise. I generally use Pause 1000, but I do know of one LCD that requires Pause 2000.
2. If changing Defines, I also usually put the full set in...it's a memory jogger just in case something else has changed... try this set...
Define LCD_DREG PORTB ' Port for LCD Data
Define LCD_DBIT 0 ' Use LOWER 4 bits of Port
Define LCD_RSREG PORTB ' Port for RegisterSelect (RS) bit
Define LCD_RSBIT 5 ' Port Pin for RS bit
Define LCD_EREG PORTB ' Port for Enable (E) bit
Define LCD_EBIT 6 ' Port Pin for E bit
Define LCB_BITS 4 ' Using 4-bit bus
Define LCD_LINES 2 ' Using 2 line Display
Define LCD_COMMANDUS 2000 ' Command Delay (uS)
Define LCD_DATAUS 50 ' Data Delay (uS)
And in doing so I've just discovered your problem... you CANT use the UPPER 4 bits of the PORT for DATA...
Define LCD_DREG PORTB
Define LCD_DBIT 4
and then connect your RS and E Bits to the upper bits as well!!!!
Define LCD_RSREG PORTB
Define LCD_RSBIT 5
Define LCD_EREG PORTB
Define LCD_EBIT 6
Melanie
Bookmarks