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

LCD example driver

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



Joined: 01 Feb 2011
Posts: 32
Location: 53

View user's profile Send private message AIM Address

LCD example driver
PostPosted: Tue Jan 15, 2013 11:24 am     Reply with quote

Hi,

I'm trying to get LCD.C example driver up and running.

The hardware is working. I know this because I can program it using another development language/compiler and it works.

The LCD interface is all portB so I want to use the port access.

The only issue I see is that the order of the pins is not the same as the example so I need to reconfigure pin access.

My port B is configured with the data lines on B0,1,2,3.
B4 is unused.
B5 is enable
B6 is rw
B7 is rs

So I have edited the LCD_PIN_MAP:
Code:

unsigned int data:4 ;
int1 unused;
int1 enable;
int1 rw;
int1 rs;

Wasn't sure if I needed to but I also reversed LCD_INPUT_MAP

16f873a
fuses HS,NOLVP,NOWDT,PUT


Result = not working.

Is there something wrong with my editing of the pin map?

Any help would be appreciated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 15, 2013 11:53 am     Reply with quote

It defaults to using PortD. You have to tell it to use PortB:
http://www.ccsinfo.com/forum/viewtopic.php?t=43170
jmaudley



Joined: 01 Feb 2011
Posts: 32
Location: 53

View user's profile Send private message AIM Address

Got it working
PostPosted: Wed Jan 16, 2013 5:57 am     Reply with quote

Thanks that was one of the problems.

I am also sharing the portB signals with the programmer interface.

It's taken me 4 hours of head scratching to realise that the programmer , which was connected, is affecting the state of the R/W signal.

When I unplugged the programmer it burst into life.
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