|
|
View previous topic :: View next topic |
Author |
Message |
guest Guest
|
Drivers for GLCD with S6B0108 controller |
Posted: Fri Sep 29, 2006 11:39 pm |
|
|
Hi everyone
I have a XIAMEN OCULAR 128 x 64 GLCD which has a S6B0108 Controller. Has any one ever written a driver for this GLCd controller in PICC.
Any help would be much appreciated
Best Regards |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Sep 30, 2006 11:38 am |
|
|
Quote: | I have a XIAMEN OCULAR 128 x 64 GLCD which has a S6B0108 Controller. |
If you do a search using http://www.google.com for S6B0108, you
will see some results like this:
So it's clear that some people believe the two part numbers are
compatible.
So the most likely CCS driver to use, would be this one:
c:\program files\picc\drivers\hdm64gs12.c
At the start of that file, it says:
Quote: |
This file contains drivers for using a Hantronix HDM64GS12 with
a KS0108 display controller. The HDM64GS12 is 128 by 64 pixels. |
You should carefully look at the driver and the pin assignments
and see if it will work. |
|
|
guest Guest
|
|
Posted: Sun Oct 01, 2006 11:04 pm |
|
|
Dear PCM programmer
Thank you for your reply.
I shall try your suggestion and will let you know how i get on.
I was however curious about one thing. In the 'HDM64GS12.c' there is a connection for pin D/I but instead of that on my GLCD there is an RS pin. I wonder if the two pins are for the same purpose. The rest of the pins are the same
Best Regards |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Oct 02, 2006 12:00 am |
|
|
D/I means Data/Instruction. RS means Register Select.
It's the same signal. It's just a different name.
Most manufacturers call it RS, but some call it D/I. |
|
|
guest Guest
|
|
Posted: Tue Oct 03, 2006 12:24 am |
|
|
Dear PCM programmer
I have tried to interface the GLCd with pic16f877a. However no luck. All the pixels are showing (which i dont think is an indication of GLCD being initialized, it is just being powered up). Here are my connection:
PIC GLCD
b0 cs1
b1 cs2
b2 rs
b4 R/W
b5 E
d0-d7 data bus
c0 Rst
rest of the connections are for backlight and contrast (both work)
here is my code
Code: |
#include <16F877A.h>
#device *=16
#include <stdlib.h>
#include <string.h>
//#include <24512.c> //for the atmel eeprom
#include <HDM64GS12.c>
#include <GRAPHICS>
#include <math.h>
#USE DELAY (CLOCK=20000000)
#fuses HS,NOWDT,NOLVP
#use rs232(baud=19200,xmit=pin_c4,rcv=pin_c5,INVERT,parity=N,stream=pc)
#use rs232(baud=19200,xmit=pin_c2,rcv=pin_c3,parity=N,stream=con1)
void main()
{
fprintf(pc,"\n\rglcd start");
glcd_init(ON);
delay_ms(1000);
fprintf(pc,"\n\rglcd initializd");
glcd_line(5, 5, 20, 20, off);
fprintf(pc,"\n\rline drawn");
}
|
No line is being displayed. Does that mean that SB60108 is not compatible with ks0108.
Please help
Best regards |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Oct 03, 2006 1:28 am |
|
|
Quote: | No line is being displayed. Does that mean that SB60108 is not compatible with ks0108. |
You need to turn on the "color" so that the line is visible.
Make the changes shown in bold below.
Quote: | void main()
{
fprintf(pc,"\n\rglcd start");
glcd_init(ON);
delay_ms(1000);
fprintf(pc,"\n\rglcd initializd");
glcd_line(5, 5, 20, 20, ON); // Change it to ON.
fprintf(pc,"\n\rline drawn");
while(1); // Add this line.
} |
|
|
|
guest Guest
|
|
Posted: Tue Oct 03, 2006 2:55 am |
|
|
Dear PCM Programmer
Thankyou for your reply.
The line is showing but there is another problem The problem is that some of the pixels in the line or rectangle are missing. so line would appear dotted at places. These missing pixels are purely random (if i restart the controller than pixels become missing at other places) I know for a fact that the GLCD is perfectly ok. here is my code:
Code: |
#include <16F877A.h>
#device *=16
#include <stdlib.h>
#include <string.h>
//#include <24512.c> //for the atmel eeprom
#include <HDM64GS12.c>
#include <GRAPHICS>
#include <math.h>
#USE DELAY (CLOCK=20000000)
#fuses HS,NOWDT,NOLVP
#use rs232(baud=19200,xmit=pin_c4,rcv=pin_c5,INVERT,parity=N,stream=pc)
#use rs232(baud=19200,xmit=pin_c2,rcv=pin_c3,parity=N,stream=con1)
void main()
{
fprintf(pc,"\n\rglcd start");
glcd_init(ON);
delay_ms(200);
fprintf(pc,"\n\rglcd initializd");
glcd_line(5, 5, 20, 20, ON); // Change it to ON.
glcd_rect(10, 10, 120, 60, OFF, ON);
fprintf(pc,"\n\rline drawn");
while(1); // Add this line.
}
| [/code] |
|
|
guest Guest
|
|
Posted: Tue Oct 03, 2006 4:08 am |
|
|
Dear PCM Programmer
i know that the glcd is working fine becoz it came with the easypic3 board. i have tried the glcd using mikroc compiler, it works fine. i was wondering if there are any pull-up or pull-downs on certain pins that i might needs to do. let me stress again that the missing of pixels is purely random.
Best Regards |
|
|
Ttelmah Guest
|
|
Posted: Tue Oct 03, 2006 5:11 am |
|
|
You need to pull the data sheets for this controller, and the one the driver is actually for. The 'odds', are that there is some tiny timing difference, perhaps with this version requiring a fraction more 'hold' time before the data is actually transferred on some transactions. This is similar to the problems some people see with the text LCD's, where some of the clone versions, require a little more pause at wake-up, or a slightly different byte timing.
Look particularly at the glcd_writeByte function, and the equivalent read function. Notice the delays. At 20MHz, for the one cycle delay, you are talking 200nSec setup. Is this in spec for the chip?. Try just doubling all the delays. Does it start working OK?. If so, then reduce the delays one by one, till you find the one causing the problem.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Oct 03, 2006 1:06 pm |
|
|
Quote: | i have tried the glcd using mikroc compiler, it works fine. |
This implies that you have a GLCD driver that you're compiling with
the mikroC compiler. If you can post a link to the source code, I can
download it and compare it to the CCS driver. Or you could do that. |
|
|
guest Guest
|
|
Posted: Tue Oct 03, 2006 10:50 pm |
|
|
Hello
Thankyou Ttelmah and PCM programmer. you are amazing. Thanks to you guyz i have been able to fix my problem. The GLCD is working nicely now.
There was a problem with the pulsing of the Enable pin. In the 'HDM64GS12.c' driver file the enable pin is being pulsed for 'delay_cycles(5)', when i changed it to 'delay_cycles(10)', the Glcd started working fine.
Thankyou once again for all your help
Best Regards |
|
|
|
|
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
|