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

Help with EX_GLCD.C

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



Joined: 16 Oct 2006
Posts: 110
Location: HOVE, EAST SUSSEX

View user's profile Send private message

Help with EX_GLCD.C
PostPosted: Thu Dec 14, 2006 10:53 am     Reply with quote

Hi Guys

This is the first time i am attempting to run the example programme
EX_GLCD.C for a 64x128 samsung KS0108 chipset put the glcd just displays garbage.
my connections the to GLCD are as follows

PIC GLCD(PINS)
E2 CS1 >1
E1 CS2 >2
XXX GND >3
XXX +5V >4
XXX Vo >5
C1 RS > 6
C0 R/W
E0 EN
D7 - D0 connects to DB7 - DB0
RST > +5V
And i changed GLCD.C as follows


Code:



#ifndef GLCD_CS1
#define GLCD_CS1 PIN_E2   // Chip Selection 1
#endif

#ifndef GLCD_CS2
#define GLCD_CS2 PIN_E1   // Chip Selection 2
#endif

#ifndef GLCD_DI
#define GLCD_DI  PIN_B2   // Data or Instruction input
#endif

#ifndef GLCD_RW
#define GLCD_RW  PIN_C0   // Read/Write
#endif

#ifndef GLCD_E
#define GLCD_E   PIN_E0   // Enable
#endif

#ifndef GLCD_RST
#define GLCD_RST PIN_C1   // Reset
#endif




where does Data or Instruction input connect to?

Question
_________________
BOB_Santana Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 14, 2006 12:29 pm     Reply with quote

Quote:
where does Data or Instruction input connect to?

See this thread for an explanation:
http://www.ccsinfo.com/forum/viewtopic.php?t=28349&start=2


Quote:
#define GLCD_RST PIN_C1 // Reset

RST > +5V

Those two lines contradict each other. The driver wants the RST pin
on the GLCD to go to a PIC pin. You have it connected to +5v.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Dec 14, 2006 12:50 pm     Reply with quote

I think your command data pin is what you call RS.

You've got it connected, so try it and find out. Shouldn't hurt anything.
BOB_SANTANA



Joined: 16 Oct 2006
Posts: 110
Location: HOVE, EAST SUSSEX

View user's profile Send private message

PostPosted: Thu Dec 14, 2006 1:40 pm     Reply with quote

Thanks Guys for the help
I have just followed your advice and it is now working fine
i had to use the following defines as you suggested
Wow this is fun Smile
C is the king i should have started using it years ago
learnt alot from you all.
i am going to try and write a few messages to the display and see


Best Regards


Code:


#ifndef GLCD_CS1
#define GLCD_CS1 PIN_E2   // Chip Selection 1
#endif

#ifndef GLCD_CS2
#define GLCD_CS2 PIN_E1   // Chip Selection 2
#endif

#ifndef GLCD_DI
#define GLCD_DI  PIN_C1   // Data or Instruction input
#endif

#ifndef GLCD_RW
#define GLCD_RW  PIN_C0   // Read/Write
#endif

#ifndef GLCD_E
#define GLCD_E   PIN_E0   // Enable
#endif

#ifndef GLCD_RST
#define GLCD_RST PIN_C0   // Reset
#endif


i am a bit confuse though as my rst line is connected to 5v 0n my proton
development board
i tried i put an attachment with this post but i couldn't to show you what i mean
_________________
BOB_Santana Smile
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