I normally drive LCDs in 4-bit mode, since I can always use the extra pins. I'm also in a noisy environment. I generally use a ribbon cable of 28" or so between the PIC and the LCD. Every once in a great while, I have the
sync problem that Darrel mentions. Most of my code runs on a 1 (sometimes 2) second main loop that is timed by an interrupt-driven counter. Every minute (30 program loops), I set the variable
flags = 1. This is an internal PBP register that forces complete re-initialization of the LCD on the next LCDOUT. This re-syncronizes things, but remember that this reinitialization takes a long time (150mSec if I remember corectly - but I'm sure someone will correct me if I'm wrong).