Discussion in "8051 Discussion Forum" started by    Ansh12    Nov 17, 2017.
Fri Feb 23 2018, 07:25 pm
#11


change your defines to

sbit E = P0^7; //E pin for LCD
sbit RS = P0^5; //RS pin for LCD

ExperimenterUK


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
#12
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
Sat Feb 24 2018, 12:40 am
#13


sbit E = P0^7; //E pin for LCD //use port 0
sbit RS = P0^5; //RS pin for LCD

ExperimenterUK



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 ?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Oariorrca
Wed Oct 16 2024, 01:14 am
Oariorvln
Wed Oct 16 2024, 12:59 am
Jamesrat
Wed Oct 16 2024, 12:56 am
Cazrwam
Tue Oct 15 2024, 04:50 pm
Cazrlby
Tue Oct 15 2024, 04:34 pm
Ameliaror
Tue Oct 15 2024, 03:02 pm
GlendaInvaf
Tue Oct 15 2024, 02:30 pm
Georgepucky
Tue Oct 15 2024, 12:11 am