View previous topic :: View next topic |
Author |
Message |
Erik006 Guest
|
128x64 graphic lcd with KS108 Controller |
Posted: Wed May 16, 2007 4:52 pm |
|
|
Hi folks,
I'm trying to get a GDM12864H lcd working, aquired from sparkfun electronics.
This lcd uses the KS108 controller, so I should be able to use the GLCD.c driver supplied with CSS, afaik. I'm using a PIC16F628A to with the lcd, setup with an internal oscillator (so I have enough pins). I did not have a 20K pot, so I used a 10K instead, which according to the datasheet, should be sufficient. Unfortunately, it does not seem to be working for me.
Any thoughts on this?
Erik006 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 16, 2007 5:21 pm |
|
|
Post your #define statements for the connections to the Graphic LCD.
In GLCD.c, the Reset pin on the LCd is connected to pin C0 on the PIC.
But the 16F628A doesn't have a Port C, so you must have connected it
to another pin. That's why I'm asking for a list of your connections
between the PIC and the LCD. |
|
|
Erik006 Guest
|
|
Posted: Wed May 16, 2007 6:37 pm |
|
|
pin a0 - GLCD_CS1
pin a1 - GLCD_CS2
pin a2 - GLCD_DI
pin a3 - reset (also tried this with pin a6)
pin a4 - GLCD_RW
pin a5 - GLCD_enable
port b -> data bus.
I have the following method calls in my main function:
Code: |
void main(){
glcd_init(ON);
glcd_fillScreen(ON);
} |
I have a momentary pushbutton switch setup as a reset button on the PIC, sometimes when this is pressed, the displays shows black "blocks" (these appear to be corresponding to the pages on both controllers), these are subsequently cleared and then filled in. However, only some of these pages appear to be affected, and which ones are random each time.
Thanks for your help so far.
Erik |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 16, 2007 7:51 pm |
|
|
Quote: | pin a0 - GLCD_CS1
pin a1 - GLCD_CS2
pin a2 - GLCD_DI
pin a3 - reset (also tried this with pin a6)
pin a4 - GLCD_RW
pin a5 - GLCD_enable
port b -> data bus.
|
Pin A4 is open drain. It requires an external pull-up resistor. (use 4.7K)
Pin A5 is input-only. It won't work. Choose a different pin.
This information is in the Architectural Overview section of the 16F628A
data sheet. There is a chart of all the i/o pins and their capabilities
and limitations in that section. |
|
|
Erik006 Guest
|
|
Posted: Wed May 16, 2007 8:45 pm |
|
|
Hi,
Thanks for your reply. I changed my circuit using your suggested changes, and on the upside, the lcd functions consistently. However, when I try to display a line, or a pixel, instead of a single dot appearing per x location, about 5 appear. This is consistent for a line, a pixel, a square and a bar.
Any idea what this could be?
Erik006 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 16, 2007 10:29 pm |
|
|
Post your compiler version. This will be a number such as 3.249, or
4.013, or 4.037, etc. You can find it at the top of the .LST file, which
will be in your project directory. |
|
|
Erik0062 Guest
|
|
Posted: Wed May 16, 2007 10:43 pm |
|
|
Hi,
The compiler version is 4.013.
Erik |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 16, 2007 11:42 pm |
|
|
That version is so early in the vs. 4.xxx series that it could be the
problem. If possible, test your program with vs. 3.249.
If that doesn't help, then Mark recommends some modifications to the
driver, to allow checking the busy flag.
http://www.ccsinfo.com/forum/viewtopic.php?t=29163 |
|
|
Erik006 Guest
|
thanks |
Posted: Thu May 17, 2007 6:16 pm |
|
|
hi,
Although I haven't been able to get it working properly yet, because I don't have access to the older compiler. I will try and implement the changes suggested in the link you gave me. I'm a bit confused as to the actual workings of the changes, but I hope I can get a grip on that soon.
PCM Programmer, you have been very helpful in your quick, courteous and concise responses. Thank you VERY much.
Erik006 |
|
|
|