View previous topic :: View next topic |
Author |
Message |
carrie_
Joined: 17 May 2008 Posts: 6
|
flexible LCD driver |
Posted: Wed May 28, 2008 7:53 am |
|
|
Hi all,
I've been troubleshooting but i cannot seem to find out why the LCD won't show what i've programmed it to.
I've tried using the LCD.C, doesn't work. i've tried the flexible LCD Driver from this forum, doesn't work either :(
this's my pin configuration on flexLCD.C and i'm using PIC18F4550
Code: |
#define LCD_DB4 PIN_D4
#define LCD_DB5 PIN_D5
#define LCD_DB6 PIN_D6
#define LCD_DB7 PIN_D7
#define LCD_E PIN_D3
#define LCD_RS PIN_D2
#define LCD_RW PIN_D1
|
this's the code on my main form
Code: |
#include <18F4550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV2,VREGEN
#use delay(clock=48000000)
#include <flexLCD.c>
void main()
{
lcd_init();
lcd_putc("Hello World");
while(1);
}
|
what can possibly be wrong? please help :(
thanks so much! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
RArtz
Joined: 28 May 2008 Posts: 7
|
|
Posted: Wed May 28, 2008 2:18 pm |
|
|
what type of LCD?
16x2? 16x1?
Also, what happens when you apply power?
Does one line of the LCD turn on while the other off?
Be more specific if you can.
I am using a similar PIC, and am not having any problems using the flexLCD.c (the LCD.c did not work for me).
Do make sure you have everything wired correctly. Sometimes you miss the obvious. |
|
|
Onemusha Guest
|
|
Posted: Tue Apr 21, 2009 6:15 am |
|
|
I'm using 16x1 lcd and the lines are set like:
Data lines: D1,D2;D3,D4
RS PIN_E2
RW PIN_B2
E PIN_D6
----------------------------------------
The code is almost the same as from the original post.
I can't make the LCD to work.
There is no display, no black squares...
Where could be the problem?
The hardware connections are OK. |
|
|
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Tue Apr 21, 2009 8:08 am |
|
|
Check your contrast voltage. It should probably be quite low < 1V ? Hopefully you've got that on a pot, so twiddle the pot a bit. _________________ Andrew |
|
|
|