PDA

View Full Version : Clear LCD



rshaver
- 7th October 2011, 20:36
This is driving me nuts. I am trying to print to the LCD and then clear it and write something else. As an example I used the following: lcdout $fe, 1
lcdout "Hello"
pause 1000
lcdout $fe, 1
lcdout "World"
and then loop back to the beginning just as a test.

and it prints HelloWorldHelloWorldHelloWorld
but there is a funny character in front of the H and the W.
It is driving me crazy. I have used a million examples and get the same results. This happens with both 2.6 and 3. It does the same thing on 4x20 and 2x16 LCD's and also on a VFD 2x16.
I am using a 18F4520 with internal osc set to 4mhz.

Any help or new hair for what I have pulled out will be appreciated.

Ron

rshaver
- 7th October 2011, 21:14
I finally found it... these two lines.
DEFINE LCD_RWREG 0 'defines the port where R/W line is connected to (set to 0 if not used)
DEFINE LCD_RWBIT 0 'defines the pin where R/W line is connected to (set to 0 if not used)

Take them out and it works perfectly.
For some reason I put them in this time and I never have before. I just noticed it.
New hair would still be appreciated.