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

Problems with samsung LCD

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



Joined: 15 Aug 2005
Posts: 18

View user's profile Send private message

Problems with samsung LCD
PostPosted: Tue Nov 15, 2005 7:52 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 15, 2005 8:59 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 15, 2005 9:17 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 15, 2005 9:27 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 06, 2006 5:03 am     Reply with quote

can u post modified lcd.c here???
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