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, keypad & 18f452

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



Joined: 14 Dec 2004
Posts: 3

View user's profile Send private message

LCD, keypad & 18f452
PostPosted: Fri Dec 17, 2004 12:45 pm     Reply with quote

Hello, I am new in PIC tecnology and I need to implement and LCD controlled by a keypad with a 18F452. I have tried with the libraries included in the CCS and with another ones that I have found on the forum and the web and it don't work.

If some one could put in the forum a complet example (all the code, and the schema) of this I will be very grateful for you.

Thank you very much.
pixie



Joined: 14 Dec 2004
Posts: 3

View user's profile Send private message

PostPosted: Fri Dec 17, 2004 12:47 pm     Reply with quote

The LCD are based in the hd44780.

Thanks.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Dec 17, 2004 1:42 pm     Reply with quote

Here is a complete and working program to test the LCD.
Code:

#include <18F452.h>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#include "lcd.c"

void main()
{
  lcd_init();
  printf(lcd_putc,"First Line");
  printf(lcd_putc,"\nSecond Line");
  while(1);
}
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Dec 17, 2004 7:08 pm     Reply with quote

Quote:
Here is a complete and working program to test the LCD.


To be complete it would have to define the target specific pin mappings somewhere. Ideally you don't want to do this in the generic driver file so instead you would need to include a target specific header file that contains the mapping
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Sat Dec 18, 2004 12:10 am     Reply with quote

Well he didn't list any. I have a demo board that uses the ones spelled out in lcd.c so this is a complete and working test program Razz
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