View previous topic :: View next topic |
Author |
Message |
zenjhen
Joined: 26 Sep 2003 Posts: 3 Location: Albuquerque
|
looking for help with LCD driver |
Posted: Fri Sep 26, 2003 9:26 pm |
|
|
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
|
|
Posted: Sat Sep 27, 2003 1:05 am |
|
|
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
|
Re: looking for help with LCD driver |
Posted: Sat Sep 27, 2003 1:22 am |
|
|
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
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. |
|
|
|