Code 5: Interfacing LCD and All Commands
Code 5: Interfacing LCD and All Commands
LCD_D4
LCD_D5
LCD_D6
LCD_D7
at P2_2_bit;
at P2_3_bit;
at P2_4_bit;
at P2_5_bit;
while(1) {
for(i=0; i<8; i++) {
Lcd_Cmd(_LCD_SHIFT_LEFT);
Move_Delay();
}
for(i=0; i<8; i++) {
Lcd_Cmd(_LCD_SHIFT_RIGHT);
Move_Delay();
}
// Loop variable
// Function used for text moving
// You can change the moving
//
//
//
//
//
//
//
//
//
Initialize LCD
Clear display
Cursor off
Write text in first row
Write text in second row
delay of 2 sec
Clear display
Write text in first row
Write text in second row
// Endless loop
// Move text to the
times //moving speed
left
}
}
7