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

looking for help with LCD driver

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



Joined: 26 Sep 2003
Posts: 3
Location: Albuquerque

View user's profile Send private message Yahoo Messenger

looking for help with LCD driver
PostPosted: Fri Sep 26, 2003 9:26 pm     Reply with quote

I'm using a 877A, and tring to get the LCD to work. I have a feeling that I'm just missing something basic...

I've double checked my hook up (on portB) and it all looks good, but the LCD has the first and third row dark, and that's all I can get.

pin 1-gnd
pin 2-+5v
pin 3-contrast
pin 4-RB1
pin 5-RB2
pin 6-RB0
pin11-RB4
pin12-RB5
pin13-RB6
pin14-RB7

I've uncommented the line
#define use_portb_lcd TRUE
in the LCD.C driver file

and i get the same output on the lcd whether the 877 is pluged into the circuit or not

any clues???
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Sep 27, 2003 1:05 am     Reply with quote

1. Make sure your #fuses statement has NOLVP in it.
(I'm assuming that you're not using Low Voltage Programming --
hardly anyone does). If you don't use the NOLVP setting, the
program will lock up when you turn on the Port B pullups.


2. The fact that some rows are dark makes me think that the
contrast is cranked up all the way. I use a 10K trimpot
for this. One side is connected to +5v and the other end
to GND. To get a decent image, I have to adjust the
trimpot fairly close to the end, on the GND side.
The contrast voltage will be somewhere near 0.425v when
it's adjusted properly.
Pete Smith



Joined: 17 Sep 2003
Posts: 55
Location: Chester, UK

View user's profile Send private message Visit poster's website MSN Messenger ICQ Number

Re: looking for help with LCD driver
PostPosted: Sat Sep 27, 2003 1:22 am     Reply with quote

zenjhen wrote:
I'm using a 877A, and tring to get the LCD to work. I have a feeling that I'm just missing something basic...

I've double checked my hook up (on portB) and it all looks good, but the LCD has the first and third row dark, and that's all I can get.

pin 1-gnd
pin 2-+5v
pin 3-contrast
pin 4-RB1
pin 5-RB2
pin 6-RB0
pin11-RB4
pin12-RB5
pin13-RB6
pin14-RB7

I've uncommented the line
#define use_portb_lcd TRUE
in the LCD.C driver file

and i get the same output on the lcd whether the 877 is pluged into the circuit or not

any clues???


Right, the fact that one line is showing dark, in my experience, means that you're not sending the initialisation commands correctly. This is backed up by the fact that it doesn't make any difference whether or not the PIC is in or not.

Your wiring seems to be OK.

First thing to check is the obvious stuff : Are you sending lcd_init() before you start? This one _always_ gets me Smile

Second obvious thing : Is your PIC powering up?

Thirdly, if they're _very_ black, then the contrast is probably in need of tweaking.

Hope this helps,

Pete.
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