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

128x64 graphic lcd with KS108 Controller

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







128x64 graphic lcd with KS108 Controller
PostPosted: Wed May 16, 2007 4:52 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed May 16, 2007 5:21 pm     Reply with quote

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







PostPosted: Wed May 16, 2007 6:37 pm     Reply with 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.

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

View user's profile Send private message

PostPosted: Wed May 16, 2007 7:51 pm     Reply with quote

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







PostPosted: Wed May 16, 2007 8:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed May 16, 2007 10:29 pm     Reply with quote

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







PostPosted: Wed May 16, 2007 10:43 pm     Reply with quote

Hi,

The compiler version is 4.013.

Erik
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 16, 2007 11:42 pm     Reply with quote

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
PostPosted: Thu May 17, 2007 6:16 pm     Reply with quote

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
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