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

GLCD Problem - Need jhd12864 driver

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







GLCD Problem - Need jhd12864 driver
PostPosted: Thu Feb 11, 2010 11:34 am     Reply with quote

Is there any driver is available for 'jhd12864 E' lcd (128x64) lcd ?



Thanks
Guest








PostPosted: Fri Feb 12, 2010 2:27 pm     Reply with quote

Why no one is responding...
Where is PCM Programmer.....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Feb 12, 2010 2:36 pm     Reply with quote

Search with Google. Try to find a driver.
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

PostPosted: Fri Feb 12, 2010 2:49 pm     Reply with quote

Hi even I have the same glcd with me. I tried with the 128x64 driver posted in the code column. This works fine for me. Get the correct pin details and connect to the graphic lcd. This will display your image. If still not working I will reply you on Monday. Now I am on vacation.
jack1984
Guest







Driver
PostPosted: Sun Feb 14, 2010 8:00 pm     Reply with quote

akh, I'm using a jhd 128x64, I had to modified glcd.c (it comes with CCS libraries) in order to work with this graphic lcd. Just two things have to be modified:

1) Pin of control and DATA bus, you have to define them according the
uC you want to use

2)Add some delay in read and write functions of glcd, his functions have to look like this:
Code:

void glcd_writeByte(char chip, BYTE data)
{
   if(chip == GLCD_CS1)       // Choose which chip to write to
      output_high(GLCD_CS1);
   else
      output_high(GLCD_CS2);

   output_low(GLCD_RW);       // Set for writing
   output_b(data);            // Put the data on the port
delay_us(2);   //4 for jhd521-12864(Added to original GLCD.C  library)
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//4 for jhd521-12864
   output_low(GLCD_E);

   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
}


// Purpose:       Reads a byte of data from the specified chip
// Ouputs:        A byte of data read from the chip
BYTE glcd_readByte(BYTE chip)
{
   BYTE data;                 // Stores the data read from the LCD
   if(chip == GLCD_CS1)       // Choose which chip to read from
      output_high(GLCD_CS1);
   else
      output_high(GLCD_CS2);

   input_b();                 // Set port d to input
   output_high(GLCD_RW);      // Set for reading
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//4 for jhd521-12864
   output_low(GLCD_E);
   delay_us(4);//2);//4 for jhd521-12864
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//For jhd521-12864
   data = input_b();          // Get the data from the display's output register
   output_low(GLCD_E);

   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
   return data;               // Return the read data
}

I hope this be helpful.
Guest








PostPosted: Wed Feb 17, 2010 10:24 am     Reply with quote

PCM programmer wrote:
Search with Google. Try to find a driver.


I searched a lot but nothing found.
Guest








Re: Driver
PostPosted: Sat Mar 06, 2010 12:56 pm     Reply with quote

jack1984 wrote:
akh, I'm using a jhd 128x64, I had to modified glcd.c (it comes with CCS libraries) in order to work with this graphic lcd. Just two things have to be modified:

1) Pin of control and DATA bus, you have to define them according the
uC you want to use

2)Add some delay in read and write functions of glcd, his functions have to look like this:
Code:

void glcd_writeByte(char chip, BYTE data)
{
   if(chip == GLCD_CS1)       // Choose which chip to write to
      output_high(GLCD_CS1);
   else
      output_high(GLCD_CS2);

   output_low(GLCD_RW);       // Set for writing
   output_b(data);            // Put the data on the port
delay_us(2);   //4 for jhd521-12864(Added to original GLCD.C  library)
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//4 for jhd521-12864
   output_low(GLCD_E);

   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
}


// Purpose:       Reads a byte of data from the specified chip
// Ouputs:        A byte of data read from the chip
BYTE glcd_readByte(BYTE chip)
{
   BYTE data;                 // Stores the data read from the LCD
   if(chip == GLCD_CS1)       // Choose which chip to read from
      output_high(GLCD_CS1);
   else
      output_high(GLCD_CS2);

   input_b();                 // Set port d to input
   output_high(GLCD_RW);      // Set for reading
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//4 for jhd521-12864
   output_low(GLCD_E);
   delay_us(4);//2);//4 for jhd521-12864
   output_high(GLCD_E);       // Pulse the enable pin
   delay_us(4);//2);//For jhd521-12864
   data = input_b();          // Get the data from the display's output register
   output_low(GLCD_E);

   output_low(GLCD_CS1);      // Reset the chip select lines
   output_low(GLCD_CS2);
   return data;               // Return the read data
}

I hope this be helpful.



No sir, I am using JHD12864E not JHD521.
Please help me ........
Thank you
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