View previous topic :: View next topic |
Author |
Message |
luismramirez
Joined: 17 Feb 2011 Posts: 8
|
Can't initialize 4x20 lcd |
Posted: Sun Mar 06, 2011 10:46 pm |
|
|
Hi,
I can't make my lcd to init with any driver (ccs LCD420 neither this FLEX 4x20 driver)
It is 4x20, white on blue, with backlight.
When turned on, i got line 1 and 3 with squares.
The VEE is grounded.
It is connected right. And my code is only to initialize the LCD, assuming the squares will go away, but nothing happens.
I know the PIC works (16F877A) because when the code starts, it turns on a LED, then when finish it is turned off.
Help!
Code: |
#include "16F877A.h"
#fuses HS, NOWDT, PUT, NOPROTECT, BROWNOUT, NOLVP, NOCPD
#use delay (clock=8MHZ)
#include <LCD420_TEST.C>
void main(){
output_high(PIN_A0);
delay_ms(1000);
lcd_init();
delay_ms(1000);
output_low(PIN_A0);
while(1){
delay_ms(1000);
}
}
|
LCD Datasheet: http://www.fcb-electronics.com/pdf/FCB204-LCD.pdf
When I bought it, the seller told me it is HD44780 but on the datasheet at looks like KS0066, on 8. Block Diagram.
Help please i can't continue my project without the lcd!
Thanks! |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon Mar 07, 2011 9:03 am |
|
|
Hi,
I haven't tried one myself to be sure, but I've read that the KS0066 is the functional equivalent of the HD44780. If we assume that to be so, it should work with the CCS driver or the Flex_LCD driver.
The only way to help you to diagnose your problem is to ask you to use the Flex_LCD driver because it is known to work, and to ask you to tell us how you have the LCD connected to the PIC.
John |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Mon Mar 07, 2011 1:50 pm |
|
|
Vee should normally be something OTHER than ground. Typically it is .5-.7
V but, for your display it could be different. Read the datasheet for your
display.
It looks like the bias voltage on this one is Vlcd and should be min 3.0 volts. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon Mar 07, 2011 2:10 pm |
|
|
Hi,
If squares are visible on the display I think that suggests that the contrast is not the problem?
John |
|
|
luismramirez
Joined: 17 Feb 2011 Posts: 8
|
|
Posted: Mon Mar 07, 2011 2:14 pm |
|
|
First, thanks for all the help.
Actually, everything was right.
The actual problem was that a cable (DB6) wasn't connected.
It was inserted on the protoboard, but there was no connection at all.
Thanks for all the help! |
|
|
|