LCD Interfacing program
LCD Interfacing program
A 16×2 LCD display is a very basic module and is very commonly used in various devices and circuits.
16×2 Liquid Crystal Display which will display the 32 characters at a time in two rows (16 characters
in one row). Each character in the display is of size 5×7 pixel matrix.
Pin Description :
Sr No Name Function
1 VSS ground
2 VDD power supply ( +5V )
3 VEE contrast
4 RS register select
5 R/W read / write 0=write 1=read
6 E enable
7-14 Data Data lines
15 A Anode ( LCD Backlight )
16 K Cathode ( LCD Backlight )
LCD commands:
C – Program :
void delay(){
short int i;
for(i=0;i<=255;i++);
}
void com(char m){
PORT=m;
RS=0;
RW=0;
EN=1;
delay();
EN=0;
delay();
}