Hi,

I have had a 16x2 LCD display attached to a 16F877 to port A and is works just fine using the default settings for data port etc. The problem is that I have to move it to port C to allow me the use of the A2D converters on the chip. I have tried to assign the port and simply duplicated the wiring to the new pins (left the old ones attached for comparison reasons) but the display will not work.

Is this correct?

Portc.0 to portc.3 = data lines.
PortD.0 = RS
portD.1 = E

DEFINE LCD_DREG PORTC
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTD
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTD
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50

Why would this not work?