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

ELEC & ELTEK 20x2 LCD module PDF

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



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

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

ELEC & ELTEK 20x2 LCD module PDF
PostPosted: Sat Jun 11, 2011 6:00 am     Reply with quote

I bought some 20x2 alphanumeric LCD modules.
The problem is that we did not burn in any way.
I can not find documentation for them and tried the drivers from the forum at the 2x16 and 4x20.
None of them go.
PDF, which I thought would be the equivalent is the lower.
I attached a picture of the LCD's can you know what type it is.
Connections are good guess is, with the delay in this PDF.
Display color is yellow.
I worked with several types of these but never from this company and I see that I have problems with them.
I searched the company ELEC & ELTEK and I found this code after the LCD.
Please help if you know something because I bought nothing else.
http://www.hexhoby.ro/download/PIC/LCD/TM202JBCWVBYA_%20LCD%20koko.pdf
http://www.hexhoby.ro/download/PIC/LCD/S3700233%201.JPG

Thank you very much, Bogdan
wangine



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

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

PostPosted: Sat Jun 11, 2011 6:54 am     Reply with quote

http://www.hexhoby.ro/download/PIC/LCD/S3700241%201.JPG
After some research I think I found something similar to my LCD.
They say this is the model with all of my writing as something as shown in photo
http://www.adelaida.ro/adelaida/catalog/pub/TME/lcd/pqc2002e-syl-1.pdf
http://www.adelaida.ro/product_info.php?cPath=87_118_275&products_id=6038

I tried all the bookstores and nothing.
Any suggestions from those who know would be effective
Thanks again
wangine



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

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

PostPosted: Sun Jun 12, 2011 7:48 am     Reply with quote

After a day of searching
I finally managed to connect your display but now there's another issue.
characters are displayed incorrectly and the time of initialization of the display is too large, about 3 seconds.
I did other tests with 2x16 as a reference one another on port B. Port D
Driver is used for 20x4 but I saw that works with flex_lcd for 2x16.
These pins are used:
Code:
#define LCD_DB4   PIN_B4
#define LCD_DB5   PIN_B5
#define LCD_DB6   PIN_B6
#define LCD_DB7   PIN_B7

#define LCD_RS    PIN_B1
#define LCD_RW    PIN_B2
#define LCD_E     PIN_B3

The program test from this, after lcd_init () of course;:
Code:
    lcd_gotoxy(1,1); 
    printf(lcd_putc,"*********** 1");

if I try to change line 2 of the LCD display for example no longer displays anything.
Foto with LCD and test code
http://www.hexhoby.ro/download/PIC/LCD/S3700244%201.JPG
I have a chance to set up these sites LCD?
The processor is dsPIC33FJ64GS406 with 16xPLL enabled
Sad
wangine



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

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

PostPosted: Sun Jun 12, 2011 1:20 pm     Reply with quote

After several trials and tests, I realized that my CPU is working too fast.
We made some changes in place delay_cycles (x) I put delay_us (x) s delay and put in some functions.

Code:
//---------------------------------------
// Read a byte from the LCD and return it.

#ifdef USE_RW_PIN
int8 lcd_read_byte(void)
{
int8 low;
int8 high;

output_high(LCD_RW);
delay_cycles(1);

high = lcd_read_nibble();
delay_us(26);                //increase delay here !!!!
low = lcd_read_nibble();

return( (high<<4) | low);
}
#endif

//----------------------------------------


Code:
//----------------------------------------
// Send a byte to the LCD.
void lcd_send_byte(int8 address, int8 n)
{
output_low(LCD_RS);

#ifdef USE_RW_PIN
while(bit_test(lcd_read_byte(),7)) ;
#else
delay_us(60); 
#endif

if(address)
   output_high(LCD_RS);
else
   output_low(LCD_RS);
     
delay_us(3);                 //replace delay_cycles(1);

#ifdef USE_RW_PIN
output_low(LCD_RW);
delay_cycles(1);
#endif

output_low(LCD_E);

lcd_send_nibble(n >> 4);
///delay_us(60);  //*****
lcd_send_nibble(n & 0xf);
}
//----------------------------


Code:
//----------------------------

void lcd_init(void)
{
int8 i;

lcd_line = 1;

output_low(LCD_RS);

#ifdef USE_RW_PIN
output_low(LCD_RW);
#endif

output_low(LCD_E);

// Some LCDs require 15 ms minimum delay after
// power-up.  Others require 30 ms.  I'm going
// to set it to 35 ms, so it should work with
// all of them.
delay_ms(50);         

for(i=0 ;i < 3; i++)
   {
    lcd_send_nibble(0x03);
    delay_ms(50);                         //   replace delay_ms(5);
   }

lcd_send_nibble(0x02);

for(i=0; i < sizeof(LCD_INIT_STRING); i++)
   {
    lcd_send_byte(0, LCD_INIT_STRING[i]);
   
    #ifndef USE_RW_PIN
    delay_ms(50);                     //  replace  delay_ms(5);
    #endif
   }

}

//----------------------------


It works now, but the connections were correct access times had to be greater between sending characters.
To run both lines to be initialized twice something like
Code:
    lcd_init();
   delay_ms(50);   // Minimum 1 ms required after power-up.
    lcd_init();
   delay_ms(100);   // Minimum 1 ms required after power-up.

Do not know the explanation
Well, the problem was solved Rolling Eyes
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