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

I need help with HDM64GS12.c

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



Joined: 26 Apr 2006
Posts: 3

View user's profile Send private message

I need help with HDM64GS12.c
PostPosted: Thu May 04, 2006 2:25 am     Reply with quote

Hi, Im working on my graphic LCD project.
I have used ex-glcd.c with HDM64GS12.c driver and it works fine.
Now I want to change the I/O pins in pic.
for example, R/W is connected to B4 in HDM64GS12.c code and I want to use other pin such as A4. What change should I make in HDM64GS12.c code?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 04, 2006 10:46 am     Reply with quote

If you want to change the default i/o pins used by the HDM64GS12.c
driver, you need to put in new #define statements in the EX_GLCD.c
file, in the location shown in bold below.

If you use Pin A4, be sure to put a 4.7K pull-up resistor on it, because
on most PICs this pin is an open-drain output. It can pull down to
a logic 0, but it can't drive a logic one. You have to add an external
pull-up resistor to do this.

Quote:
#if defined(__PCM__)
#include <16F877.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)

#elif defined(__PCH__)
#include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#define FAST_GLCD
#endif

// Define new pins for the HDM64GS12 driver here.
#define GLCD_CS1 PIN_A4 // Pin A4 requires 4.7K pull-up
#define GLCD_CS2 PIN_A3


#include <HDM64GS12.c>
#include <graphics.c>
#include <math.h>
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