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 support@ccsinfo.com

Problem with GLCD

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



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

Problem with GLCD
PostPosted: Wed Jul 26, 2006 5:09 am     Reply with quote

Hello all, i have a bit of a issue withthe GLCD driver. i have moved my project to a PIC18F4550 from a PIC16F677A. If i try using the standed pins to connect my LCD, as per HDM64GS12.c, everything is happy. But if i try to move the CS pins from B0 and B1 to B6 and B7, the display will show a corrupted display. I cant use B0 and B1 as i need to use hardware I2C.
I have made sure that the connections are good, eg no dry joins and the pins are the right way around.

Can anyone think of why this would?

Thanks, Mark
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Jul 26, 2006 5:32 am     Reply with quote

In PIC processors the I/O pins are shared amongst several internal modules, have you made sure the pins are configured for plain I/O? A common problem is that on some processors the CCS compiler doesn't disable the A/D converter pins. For your processor there are no A/D pins on B6 and B7, so that's not the issue here. Pin b6 and B7 are however used for the In Circuit Debugger (ICD), make sure to set the NODEBUG fuse or your program will fail to control these pins.
Markdem



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

PostPosted: Wed Jul 26, 2006 5:48 am     Reply with quote

Thanks for the suggestion ckielstra, but i do have the NODEBUD fuse set. I have also now tried to use other pins, like C0 and C1, and i get the smae problem.

I have looked at HDM64GS12.c, again, and cant see why it would matter what pins are set. I dont know how to read the .lst files, but whould they show the problem, or at least point me to where the problem is??

Thanks again

Mark
Markdem



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

PostPosted: Wed Jul 26, 2006 5:56 am     Reply with quote

Ok, time for me to learn somthing. When i complie the code using B0 and B1 as the cs pins, i get this in the .lst file

Code:

....................    output_low(GLCD_CS1);
02D8:  BCF    F93.0
02DA:  BCF    F8A.0
....................    output_low(GLCD_CS2);
02DC:  BCF    F93.1
02DE:  BCF    F8A.1


and when i compile using B6 and B7, i get the following

Code:

....................    output_low(GLCD_CS1);
02D8:  BCF    F93.0
02DA:  BCF    F8A.0
....................    output_low(GLCD_CS2);
02DC:  BCF    F93.1
02DE:  BCF    F8A.1


They are both the same!! Sould this be like that, or have i found the problem??

Thanks again

Mark
Markdem



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

PostPosted: Wed Jul 26, 2006 6:10 am     Reply with quote

Hello again, sorry to waste all your time, but i found the problem. I have found that i was using the wrong HDM64GS12.c file. I have a backup copy of a old compiler, and the project was still looking at that directory, so i was changing a file that i was not even using. Embarassed Looking the the .lst file is a good thing! Rolling Eyes
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