View previous topic :: View next topic |
Author |
Message |
Markdem
Joined: 24 Jun 2005 Posts: 206
|
Problem with GLCD |
Posted: Wed Jul 26, 2006 5:09 am |
|
|
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
|
|
Posted: Wed Jul 26, 2006 5:32 am |
|
|
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
|
|
Posted: Wed Jul 26, 2006 5:48 am |
|
|
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
|
|
Posted: Wed Jul 26, 2006 5:56 am |
|
|
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
|
|
Posted: Wed Jul 26, 2006 6:10 am |
|
|
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. Looking the the .lst file is a good thing! |
|
|
|