Projects › Projects › About LCD 2×16 › trying to display with 2 line
trying to display with 2 line kk first time i told you i tryed to display using second line and it doesnt work. but now this code is so easy to display and first code is used 11pins of controller, but this guy using 7 pins ..by the way the code i sent today is works if i delete half of them like that :
char keypadPort at P0;
sbit input4 at P1_4_bit;
sbit input3 at P2_7_bit;
sbit input2 at P2_6_bit;
sbit input1 at P1_3_bit;
sbit LCD_RS at P2_0_bit;
sbit LCD_EN at P2_1_bit;
sbit LCD_D4 at P2_2_bit;
sbit LCD_D5 at P2_3_bit;
sbit LCD_D6 at P2_4_bit;
sbit LCD_D7 at P2_5_bit;
// End Lcd module connections
void main() {
P1=0;
input2=0;
input3=0;
// Initialize Keypad
Lcd_Init(); // Initialize Lcd
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1, 1, ” bvx yum “); // Write message text on Lcd
Lcd_Out(2, 1, ” ok bna “);
while (1){
if((input1==1)&&(input2==0) &&(input3==0)&&(input4==0))
{Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1, 1, “gal”); }
else if ((input1==0)&&(input2==1) &&(input3==0)&&(input4==0))
{Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1, 1, “xaalga “);}
}
} }
but i need all codes of them to display nicely kk