Thanks for your reply again

I have just been going through the code instruction by instruction. I have found something but using LEDs on the 4 data lines.
I found something really strange. When any of the bits on the PORTA of my PIC are changed, the whole port seems to reset. For example -
I have 5 bits: Enable, then D8 - D4 on my PORTA. I set the bits i need for the nibble i want to send to the LCD but when i try to strobe the enable pin with this code -
PORTAbits.RA4 = 1The D8-D4 turn off and the enable turns on.
The same happens with this code -
PORTA ^= 0b00010000;I don't know why this is...
Any ideas.