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

Program PIC to interface 2x16 LCD using C code & LCD.c

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



Joined: 18 Nov 2009
Posts: 10

View user's profile Send private message Send e-mail

Program PIC to interface 2x16 LCD using C code & LCD.c
PostPosted: Wed Nov 18, 2009 5:49 am     Reply with quote

Am using PIC 16f72 and PIC 16f877. Working on it for my project. Using C language for programming.
Now I need to program my chip to interface a 2x16 LCD.
Wrote a simple code to display a "Hello" message.
Oops... it didn't work. Included the program below.
Nothing is wrong with my LCD module, chip and programmmer (ICD2) and pin connections are correct.
Using MPLAB IDE and CCS C.
Before burning, I included the LCD.c file under other files.
Please guide me in this concern to rectify the error.
_________________
Regards
Karthi


Last edited by karthi27 on Thu Dec 17, 2009 11:22 pm; edited 1 time in total
karthi27



Joined: 18 Nov 2009
Posts: 10

View user's profile Send private message Send e-mail

Writing an LCD prog without drivers
PostPosted: Wed Nov 18, 2009 5:58 am     Reply with quote

Plz help me writing a simple LCD prog to display a "Hello" message without using driver files.
_________________
Regards
Karthi


Last edited by karthi27 on Wed Nov 18, 2009 9:10 pm; edited 1 time in total
mskala



Joined: 06 Mar 2007
Posts: 100
Location: Massachusetts, USA

View user's profile Send private message

PostPosted: Wed Nov 18, 2009 9:09 am     Reply with quote

Not all LCD modules are the same. Some things to check are:
Do you need to wait a certain amount of time after power-up before
doing anything? Are the delays in the code enough? Does your LCD
require any different or extra initialization commands? Are you sure you
have your contrast/backlight correct?

Mark S.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 18, 2009 2:13 pm     Reply with quote

This post has several links to threads about LCD problems.
Read them all and you will probably find the problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=32244&start=6
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

Re: LCD.c file
PostPosted: Wed Nov 18, 2009 2:46 pm     Reply with quote

karthi27 wrote:
//// (C) Copyright 1996,2007 Custom Computer Services ////
//// This source code may only be used by licensed users of the CCS C ////
//// compiler. This source code may only be distributed to other ////
//// licensed users of the CCS C compiler. No other use, reproduction ////
//// or distribution is permitted without written permission. ////
You are not supposed to publish this code! What is the part you didn't understand?

There is no need to post the code. Everybody using the CCS compiler already has it.
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