CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Can't initialize 4x20 lcd

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
luismramirez



Joined: 17 Feb 2011
Posts: 8

View user's profile Send private message

Can't initialize 4x20 lcd
PostPosted: Sun Mar 06, 2011 10:46 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 07, 2011 9:03 am     Reply with quote

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: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Mar 07, 2011 1:50 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 07, 2011 2:10 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 07, 2011 2:14 pm     Reply with quote

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!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group