View previous topic :: View next topic |
Author |
Message |
akh Guest
|
GLCD Problem - Need jhd12864 driver |
Posted: Thu Feb 11, 2010 11:34 am |
|
|
Is there any driver is available for 'jhd12864 E' lcd (128x64) lcd ?
Thanks |
|
|
Guest
|
|
Posted: Fri Feb 12, 2010 2:27 pm |
|
|
Why no one is responding...
Where is PCM Programmer..... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Feb 12, 2010 2:36 pm |
|
|
Search with Google. Try to find a driver. |
|
|
mutthunaveen
Joined: 08 Apr 2009 Posts: 100 Location: Chennai, India
|
|
Posted: Fri Feb 12, 2010 2:49 pm |
|
|
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 |
Posted: Sun Feb 14, 2010 8:00 pm |
|
|
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
|
|
Posted: Wed Feb 17, 2010 10:24 am |
|
|
PCM programmer wrote: | Search with Google. Try to find a driver. |
I searched a lot but nothing found. |
|
|
Guest
|
Re: Driver |
Posted: Sat Mar 06, 2010 12:56 pm |
|
|
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 |
|
|
|