Your version is at best, a Beta version of the vs. 4 compiler.
If your version has the bug that you describe, then it should display '00'
at the end of the output, with the test program shown below.
I don't have 4.013 to test, but vs. 4.014 and later, do not put a '00' at
the end. This is the output from a good version of the compiler:

Hello PCM. I just want to say thanks for this custom LCD.C driver. I been having a tough time figuring out the CCS LCD driver since I am a beginner with PIC programming. I made some modifications to your original code to fit the I/O pins that were available on my PIC but when I compile the code I get an error

Error 128 "flex_lcd.c" Line 28(1,42): A #DEVICE required before this line

and the line with the error is in flex_lcd.c:
int8 const LCD_INIT_STRING[4] =

Do you know why I am getting this error?

I am using a PIC16F877A and a 2x16 HD44780 LCD display. Here are the only modifications I made to flex_lcd.c:

my question dissapeared.
can portA be used with this driver for a pic16f648A ? i port B is occupied with USART and 32khz.
Thank you.

PCM programmer

Joined: 06 Sep 2003Posts: 20137

Posted: Sat Jun 06, 2009 11:56 am

Read the instructions in the first post. Any pin can be used, provided
that it has full i/o capabilities. Don't use input-only pins. If the pin
is open-drain, then an external pull-up resistor must be used on that pin.

BotBoy

Joined: 06 Nov 2009Posts: 6

Posted: Tue Nov 10, 2009 1:15 pm

Code:

lcd_putc("\fHello World\n");
lcd_putc("Line Number 2");

Is possible after put these two lines on LCD...
write some word only on line 2 without clean line 1?

PCM programmer

Joined: 06 Sep 2003Posts: 20137

Posted: Tue Nov 10, 2009 1:46 pm

Quote:

Is possible after put these two lines on LCD...
write some word only on line 2 without clean line 1?

Call the following function in the LCD driver to set the cursor position.
The Origin is (1, 1) and it's in the upper left corner of the LCD.

It can be compiled and write to the pic but
nothing come up to the lcd. I checked the wiring and it all good.
I'm using pcw compiler and pic2kit.

yoda

Joined: 22 Dec 2009Posts: 3

Posted: Thu Dec 31, 2009 1:23 am

Ok the problem can be solved by connecting my Vee pin to ground.
At first I connect it to the trimpot to vary the lcd contrast. Why is this happening?_________________help me to help you to help me

PCM programmer

Joined: 06 Sep 2003Posts: 20137

Posted: Thu Dec 31, 2009 1:59 am

The normal setting for the LCD contrast is about 0.4 to 0.5 volts.

gonzalza

Joined: 23 Feb 2010Posts: 12

Re: Flexible LCD driver

Posted: Tue Feb 23, 2010 5:43 pm

Hi PCM Programmer how are you? I noticed the forum is quite old but, I'm interested on it, well, I'm good at c language and assembly however I have never programmed pic with c language. That's why if I'm doing so simple questions excuse me about it.

In the first code I saw this " / These pins are for the Microchip PicDem2-Plus board, " and I don't understand this. In fact I just bought a lcd 16x2 and already install the CCS plugin to MPLAB.

But now what kind of board are you talking about? Without knowing this I can't continue. Thanks.