Professional Documents
Culture Documents
16X2 LCD Display
16X2 LCD Display
16X2 LCD Display
2 to 4 line Display.
void pulse()
{
IOSET0=EN; //Enable the EN Pin
delay(10000); //Delay for Data Fetch to LCD
IOCLR0=EN; //Disable the EN Pin
delay(10000);
}
Say Display Type:
void type()
{
IOCLR0=(0X0000000FF<<16);//Clear the Pins
IOCLR0=RS; //Disable the RS Pin
IOSET0=(0x38<<16); //Send Display Type
pulse(); //Pulse for Data fetching
}
Make Display ON:
void on()
{
IOCLR0=(0X0000000FF<<16);//Clear the Pins
IOCLR0=RS; //Disable the RS Pin
IOSET0=(0x0E<<16); //Send Display ON
pulse(); //Pulse for Data fetching
}
Say Address to Display:
void address()
{
IOCLR0=(0X0000000FF<<16);//Clear the Pins
IOCLR0=RS; //Disable the RS Pin
IOSET0=(0x80<<16); //Send Display Address
pulse(); //Pulse for Data fetching
}
Place Data to Display:
void display_data()
{
IOCLR0=(0X0000000FF<<16);//Clear the Pins
IOSET0=RS; //Enable the RS Pin
IOSET0=(‘A’<<16); //Send Display Data
pulse(); //Pulse for Data fetching
}
DISPLAY OUTPUT: