My suspicion is that when you have the oscillator type set to 'XT' and you have such a high frequency crystal, you are actually running at a sub-multiple of the actual frequency. Since the PIC is running so slow, the LCD has no trouble responding.
When you set the oscillator type to 'HS' it then runs at the true crystal frequency (14.7xMhz), and the LCD can't keep up.
Add the lines
DEFINE LCD_COMMANDUS 2500
DEFINE LCD_DATAUS 200
To the top of the program, the LCD will work and your program will run fast.




Bookmarks