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

put characters on LCD

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



Joined: 24 Jul 2005
Posts: 20

View user's profile Send private message

put characters on LCD
PostPosted: Sun Jul 24, 2005 5:16 am     Reply with quote

This is my first post.I try to put a character on LCD I can't see it on LCD
this is my code
Code:

#include<16f84a.h>
#include<lcd.c>
#fuses NOWDT,PUT,HS,NOPROTECT
#use delay(clock=12000000)// crystal 12MHZ
main()
{
lcd_init();
lcd_putc('b');
}


I connect pic 16f84A the same with guide in lcd.c (driver folder in picc).
I don't know why

Any one help me to display a character on LCD ?
treitmey



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

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

PostPosted: Mon Jul 25, 2005 8:04 am     Reply with quote

1) put a continuous loop at the end of your program.
2) When I compile this, it complains about a tris_d. Your chip doesn't have
a port D. Thus the ports you defined are wrong.
Code:
#include<16f84a.h>
#include<lcd.c>
#fuses NOWDT,PUT,HS,NOPROTECT
#use delay(clock=12000000)// crystal 12MHZ
main()
{
lcd_init();
while(1)
  {
  lcd_putc('b');
  }
}

Fix these two things. See if can figure it out.
Bieli



Joined: 15 Sep 2003
Posts: 9

View user's profile Send private message

PostPosted: Tue Jul 26, 2005 6:24 am     Reply with quote

If I remember the #include <lcd.c> should be after #use delay becouse it ise delay function.


#include<16f84a.h>
#fuses NOWDT,PUT,HS,NOPROTECT
#use delay(clock=12000000)// crystal 12MHZ
#include<lcd.c>
main()
{
lcd_init();
lcd_putc('b');
}
Mustafa
Guest







Then problem with lcd.c
PostPosted: Sat Jan 14, 2006 8:03 pm     Reply with quote

I did this but got an error: Undefined identifier set_tris_d while compiling.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 15, 2006 12:05 am     Reply with quote

Look at the 4th post in the following thread. It has a good example
for using the 16F84A with a LCD. Because the 16F84A doesn't have
a port D, you must connect the LCD to Port B, and then tell the LCD
driver to use that port. Note how he does that, with the #define
statement.
http://www.ccsinfo.com/forum/viewtopic.php?t=21376&highlight=useportblcd
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