|
|
View previous topic :: View next topic |
Author |
Message |
thinkpositivex Guest
|
keypad+lcd |
Posted: Thu Jan 07, 2010 8:09 am |
|
|
Hi.....i have a lot of problem,can you all help me
i already simulate the circuit,as shown figure below,im using ccs compiler 4.084.but my problem is why the port of lcd is active low after execute the program.i think the fault is because the keypad and lcd driver is declare at same port,port B and not matching with my connection.i already found how to alter but i.m not understand can you explained more detail how to alter the
lcd driver and import to the coding.
circuit;
Code: |
#include <16f877a.h>
#fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP
#use delay(clock=4000000)
#include <LCD.C>
#include <KBD.C>
void main()
{
char c;
lcd_init();
kbd_init();
while(TRUE)
{
c=kbd_getc();
if(c!=0)
if(c=='*')
lcd_putc('\f');
else
lcd_putc(c);
}
}
sorry i cnnot post the schematic diagram,i dont know how to upload the figure in this forum |
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Jan 07, 2010 9:13 am |
|
|
You should at least list the pin mapping of LCD and keyboard. |
|
|
thinkpositive Guest
|
|
Posted: Thu Jan 07, 2010 10:19 am |
|
|
FVM..
Actually I refer the pin mapping from the keypad driver that I have found in this program file driver.
keypad: copy from keypad driver in program files
Code: |
#define COL0 (1 << 5)
#define COL1 (1 << 6)
#define COL2 (1 << 7)
#define ROW0 (1 << 1)
#define ROW1 (1 << 2)
#define ROW2 (1 << 3)
#define ROW3 (1 << 4) |
|
|
|
|
|
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
|