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

Mapping pins to LCD.C

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



Joined: 14 Feb 2008
Posts: 18
Location: Cumbria

View user's profile Send private message

Mapping pins to LCD.C
PostPosted: Thu Feb 14, 2008 1:06 pm     Reply with quote

Hi Real newby question ....

The hardware for my LCD has been wired as follows:

Pin_C0 = Enable
Pin_C1 = R/W
Pin_C2 = RS
Pin_D0 = D7
Pin_D1 = D6
Pin_D2 = D5
Pin_D3 = D4

The question is how do I map these pins in the LCD.C file? As you can see I really am on the start of my learning curve here!

Regards

Kevin – M0KHZ
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 14, 2008 1:10 pm     Reply with quote

Use this driver instead. The pins are assigned with #define statements
at the top of the driver file. It's easy.
http://www.ccsinfo.com/forum/viewtopic.php?t=24661
M0KHZ



Joined: 14 Feb 2008
Posts: 18
Location: Cumbria

View user's profile Send private message

PostPosted: Thu Feb 14, 2008 1:30 pm     Reply with quote

Hi Thanks for the quick reply, I've tried this and still no display, mind you I an using virgin hardware ! Homebrew at that, I'm running out of time tonight, so will have to wait till tomorrow evening before I can continue Smile
Thanks again, I'll keep you posted.

Regards
Kevin - M0KHZ
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 14, 2008 3:12 pm     Reply with quote

Quote:
I've tried this and still no display

Read these threads about fixing LCD problems.
http://www.ccsinfo.com/forum/viewtopic.php?t=32244
http://www.ccsinfo.com/forum/viewtopic.php?t=30026
M0KHZ



Joined: 14 Feb 2008
Posts: 18
Location: Cumbria

View user's profile Send private message

PostPosted: Sat Feb 16, 2008 10:52 am     Reply with quote

Hi Guys

OK, after a few hours going round in circles and failing miserably to get my Osc firing, and after trying 3 different crystals and a whole range of loading capacitors, and changing the PIC (not easy as it was a TQFP pacage!) I’ve (temporarily) given up and have opted to use an external 10Mhz osc I have here in the shack!

The good news is my LCD display is fully functional using the ‘flex_LCD420.c” code.
My hardware pins mapped without any issues, and it just works. Thanks for getting me started on this new venture.

Kevin – M0KHZ
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 16, 2008 11:11 am     Reply with quote

Quote:
my LCD display is fully functional using the ‘flex_LCD420.c” code

The link that I posted was for a 16x2 LCD. You should have told me
that you needed a driver for a 20x4 lcd. I would have posted a link
to that one.
M0KHZ



Joined: 14 Feb 2008
Posts: 18
Location: Cumbria

View user's profile Send private message

PostPosted: Sat Feb 16, 2008 11:38 am     Reply with quote

Hi It was no problem, the link you posted had a link to the 4x20 anyway, the code works a treat, thanks again.

The next stage to to structure the code!

I'm thinking state machine, and have an idea to what it should look like, so onwards and upwards!

Regards

Kevin - M0KHZ
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