Keypad programming for 8051
Fri Feb 23 2018, 07:25 pm
change your defines to
sbit E = P0^7; //E pin for LCD
sbit RS = P0^5; //RS pin for LCDExperimenterUK
If I define E and RS then compiler show errors
compiling keypad.c...
keypad.c(39): error C141: syntax error near '='
keypad.c(41): error C141: syntax error near '='
keypad.c(43): error C141: syntax error near '='
keypad.c(50): error C141: syntax error near '='
keypad.c(52): error C141: syntax error near '='
keypad.c(54): error C141: syntax error near '='
keypad.c - 6 Error(s), 0 Warning(s).
Fri Feb 23 2018, 08:13 pm
sbit NOT #define
sbit E = P0^7; //E pin for LCD //use port 0
sbit RS = P0^5; //RS pin for LCD
NOT
#define E P3^6; //E pin for LCD
#define RS P3^7; //RS pin for LCD
sbit E = P0^7; //E pin for LCD //use port 0
sbit RS = P0^5; //RS pin for LCD
NOT
#define E P3^6; //E pin for LCD
#define RS P3^7; //RS pin for LCD
Sat Feb 24 2018, 12:40 am
sbit E = P0^7; //E pin for LCD //use port 0
sbit RS = P0^5; //RS pin for LCDExperimenterUK
Thank's a lot for your help. now I am getting character on the screen.
Please look at post #7. there is keypad for calculator. so when I press key it doesn't show the same latter on screen ie. if I press "1" it show "o" if I press 2 it show "K"
How to get exact latter ?
Powered by e107 Forum System