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 support@ccsinfo.com

how to get display LCD module DEM 16215 to work?

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



Joined: 17 Nov 2011
Posts: 187

View user's profile Send private message Send e-mail

how to get display LCD module DEM 16215 to work?
PostPosted: Tue Nov 19, 2013 1:04 pm     Reply with quote

Hello,
I'm trying to get DEM 16215 2x16 display to work ...

I followed this document to initialize it:

http://www.display-elektronik.de/DEM16215SYH-LY.PDF

but no success...

does anybody know to make things going ?

brgds

arto
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 19, 2013 3:15 pm     Reply with quote

Try the Flex driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661

The data sheet for that LCD says it requires at least a 40 ms delay after
power-up before you can write to it. The flex driver has a 15ms delay
because that's what is normally required for HD44780 compatible LCDs.

I suggest to just add an additional delay before calling the flex driver init
function:
Quote:

void main()
{
delay_ms(40); // Do this delay before calling lcd_init

lcd_init();

.
.
.
.

}

See if that works. Of course, you have to setup your pin definition
statements at the beginning of the Flex driver, so they match your
hardware connections between the LCD and the PIC.
artohautala



Joined: 17 Nov 2011
Posts: 187

View user's profile Send private message Send e-mail

PostPosted: Sun Nov 24, 2013 10:55 am     Reply with quote

PCM programmer wrote:
Try the Flex driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=24661

The data sheet for that LCD says it requires at least a 40 ms delay after
power-up before you can write to it. The flex driver has a 15ms delay
because that's what is normally required for HD44780 compatible LCDs.

I suggest to just add an additional delay before calling the flex driver init
function:
Quote:

void main()
{
delay_ms(40); // Do this delay before calling lcd_init

lcd_init();

.
.
.
.

}

See if that works. Of course, you have to setup your pin definition
statements at the beginning of the Flex driver, so they match your
hardware connections between the LCD and the PIC.


ok,

It was not so simple but very much thanks for your answer ..

If someone is using that display here is way to things going ...

to get it initialzed ...

all the best

-arto-
Code:

void lcd_init(void)
{
      /*INIT FOR 4 BIT INTERFACE
      LCD:n ohjaussignaalit:
      (PIN_D1) = lcd_reg  = RS   //LCD:N reg select, 0 = käsky, 1 = data
      (PIN_D0) = lcd_en      //LCD:n enable
      LCD : n dataportti on D4...D7, 4 bittiä, D2 JA D3 ei käytössä, ne on nyt inputteja
      PIN C0 on LCD write / read, 1 = read 0 = write */

      delay_ms(60);           //min. wait time after powerup 40ms
     
      //reset LCD display:
     
      output_high(RW_LCD);      //read LCD
      enable_lcd();
      delay_ms(100);
      output_low(RW_LCD);      //write LCD
      enable_lcd();
      delay_ms(100);
     
     
      output_low(RW_LCD);      //write LCD
     
      delay_ms(100);

      //lohko 1-3,function set
      PORTD = 0B00110000;         
      enable_lcd();
      PORTD = 0B00110000;         
      enable_lcd();     
      PORTD = 0B00110000;         
      enable_lcd();
         
      //lohko 4,function set DL = BIT D4 = "0"
      PORTD = 0B00100000;         
      enable_lcd();     
     
      //lohko 5,function set DL = BIT D4 = "0"
      PORTD = 0B00100000;         
      enable_lcd();     
      PORTD = 0B10000000;      //D7 = "1" on 2 riviä, D6 = font, muut X       
      enable_lcd();           
     
      //lohko 6, display OFF
      PORTD = 0B00000000;     
      enable_lcd();
      PORTD = 0B10000000;     
      enable_lcd();     
     
      //lohko 7, display ON
      PORTD = 0B00000000;     
      enable_lcd();
      PORTD = 0B00010000;     
      enable_lcd();       
     
      //lohko 8, entry mode set:
      PORTD = 0B00000000;     
      enable_lcd();
      PORTD = 0B01100000;           //D5 on I/D, D4 = shift , normaalisti "0"
      enable_lcd();     
     
      //noi on oltava
      PORTD = 0B00100000;
      enable_lcd();                   
      PORTD = 0B10000000;         
      enable_lcd();                 
     
      PORTD = 0B00000000;
      enable_lcd();             
      PORTD = 0B11000000;      //bit D5 cursor on/off
      enable_lcd();                 
     
      PORTD = 0B00000000;
      enable_lcd();             
      PORTD = 0B01100000;
      enable_lcd();                 


}




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