View previous topic :: View next topic |
Author |
Message |
SBS
Joined: 15 Aug 2005 Posts: 18
|
Problems with samsung LCD |
Posted: Tue Nov 15, 2005 7:52 pm |
|
|
Hi,
I am using a Lumex LCD with the samsung driver. I have modified the CCS provided driver as follows:
Code: |
void lcd_send_nibble( BYTE n ) {
lcd.data = n;
delay_cycles(1);
lcd.enable = 1;
delay_us(2);
lcd.enable = 0;
}
void lcd_init() {
set_tris_lcd(LCD_WRITE);
lcd.rs = 0;
lcd.rw = 0;
lcd.enable = 0;
delay_ms(30);
lcd_send_nibble(0x02);
delay_us(1);
lcd_send_nibble(0x02);
delay_us(1);
lcd_send_nibble(0x0C);
delay_us(45);
lcd_send_nibble(0x00);
delay_us(1);
lcd_send_nibble(0x0F);
delay_us(45);
lcd_send_nibble(0x00);
delay_us(1);
lcd_send_nibble(0x01);
delay_ms(2);
lcd_send_nibble(0x00);
delay_us(1);
lcd_send_nibble(0x06);
delay_ms(2);
}
|
From what I can tell... the only differences between the h47880 and the samsing S6A0069 driver is in the initialization.
I have a few questions:
1) Does anybody have a S6A0069 driver for the PIC18 processor?
2) A general LCD question... I have my LCD hooked up to Vdd, Vs and Vo. Vo is the contrast voltage. With the LCD turned on, I can move Vo from .2 to 4.5v and see no change in the LCD. It never appears to show anything. Should the LCD get darker/lighter as I change Vo even if nothing is displayed?
3) I am monitoring the output signal from my PIC to the LCD with a DAQ board. I can get digital waveforms of the signals. It looks like I'm seeing random glitches. Does anybody have a suggestion? I'm using a breadboard and am wiring to the LCD. I don't have any pullup/down resistors on the lines. This is strange because I've got an ADC running on SPI and I have no problems with glitching. Same for RS232.
Thanks,
Sal |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Nov 15, 2005 8:59 pm |
|
|
That LCD is nearly compatible with the industry standard HD44780.
The data sheet says it should have a 30 ms initial delay instead of 15 ms,
and you have done that.
You should be able to use the CCS driver, with just the one change
to the initial delay. You shouldn't have to do all those other changes
that you have made.
I suggest that you try it that way. |
|
|
SBS
Joined: 15 Aug 2005 Posts: 18
|
|
Posted: Tue Nov 15, 2005 9:17 pm |
|
|
Hi,
Thanks for the help.
I tried like you said and used the regular LCD.C code with only changing the initial delay to 30ms. Same result... nothing.
About the Vo of the LCD. With nothing displayed, should adjusting the Vo (LCD drive voltage) change how dark/light the screen is? I am wondering if my LCD is just completely dead.
I accidentally fried my first LCD by swapping the +5 and GND pins when I first connected it. It got hot... real hot. It never worked... But when I ran my initialization code on it, parts of the screen flickered dark then light so I knew my code was at least doing something.
With this new LCD, it does nothing nomatter what .
Thanks,
Sal |
|
|
SBS
Joined: 15 Aug 2005 Posts: 18
|
|
Posted: Tue Nov 15, 2005 9:27 pm |
|
|
AH HAH!!
I got it... I had read the datasheet for my LCD wrong. I was applying 4.6 volts to the Vo pin. I was supposed to be applying .4 volts. The datasheet says Vdd - Vo = 4.6... I basically had the contrast turned all the way down and couldn't see anything.
Thanks for your help. The LCD.C (with the one modification) file is working perfectly!
Thanks,
Sal |
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Mon Feb 06, 2006 5:03 am |
|
|
can u post modified lcd.c here??? |
|
|
|