View previous topic :: View next topic |
Author |
Message |
karthi27
Joined: 18 Nov 2009 Posts: 10
|
Program PIC to interface 2x16 LCD using C code & LCD.c |
Posted: Wed Nov 18, 2009 5:49 am |
|
|
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
|
Writing an LCD prog without drivers |
Posted: Wed Nov 18, 2009 5:58 am |
|
|
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
|
|
Posted: Wed Nov 18, 2009 9:09 am |
|
|
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
|
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
Re: LCD.c file |
Posted: Wed Nov 18, 2009 2:46 pm |
|
|
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. |
|
|
|