View previous topic :: View next topic |
Author |
Message |
pixie
Joined: 14 Dec 2004 Posts: 3
|
LCD, keypad & 18f452 |
Posted: Fri Dec 17, 2004 12:45 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
pixie
Joined: 14 Dec 2004 Posts: 3
|
|
Posted: Fri Dec 17, 2004 12:47 pm |
|
|
The LCD are based in the hd44780.
Thanks. |
|
![](templates/subSilver/images/spacer.gif) |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Dec 17, 2004 1:42 pm |
|
|
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);
}
|
|
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Dec 17, 2004 7:08 pm |
|
|
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!! |
|
![](templates/subSilver/images/spacer.gif) |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sat Dec 18, 2004 12:10 am |
|
|
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](images/smiles/icon_razz.gif) |
|
![](templates/subSilver/images/spacer.gif) |
|