***********************************************************************************
**********************
* (c) Copyright 03/09/2017, Ankush P. Chavhan, Pune, India
* All Rights Reserved
* File : APCLCD.H
* Descripton : This is header file for 16x2 LCD interfacing with ARM7.
* D0-D7: P1.19-P1.25, RS=P1.16, EN=P1.17 RW=Connected to ground
* Cotains Lcd_Ini, Lcd_Cmd, Lcd_Data and Lcd_Msg functions give
following functionality
* Lcd_Ini : Initialize the LCD
* Lcd_Cmd : To send command to LCD
* Lcd_Data: To send 8 bit data to be displayed to the LCD
* Lcd_Msg : To send msg string to be displayed on lcd with row and
column location
* By : Ankush P. Chavhan
* E&TC Engineer,Pune
* Date : 03/09/2017
* Tested on Proteus 8.1 with lpc2138.
* Have Fun!!!
***********************************************************************************
**********************
*/
#include <LPC22xx.h>
#define rs 0x00010000
#define en 0x00020000
void Lcd_Ini(void)
{
IODIR1 |= 0X03FF0000;
Lcd_Cmd(0x38);
Lcd_Cmd(0x0C);
Lcd_Cmd(0x01);
Lcd_Cmd(0x06);
}