fbpx

Interface LCD With ARM7

Description

Liquid crystal display is a very essential part in all embedded devices from the calculator to printing machines, LCD works with voltage pulses, with two are more kind of IC drivers in LCD display form LCD module.

LCD Pin Configuration

LCD command

Hardware Required

  • LCD.
  • PotentioMeter.
  • LPC21XX MicroController.

Circuit

Code

 #include <LPC21xx.H>
 void delay()
 {
 int i,j;
 for(i=0;i<10000;i++)
 {
 for(j=0;j<100;j++);
 }
 }
 void cmd(unsigned char X)
 {
 IO1PIN=0X00020000;
 IO0PIN=X;
 delay();
 IO1PIN=0X00000000;
 }
 void dat(unsigned char Y)
 {
 IO1PIN=0X00030000;
 IO0PIN=Y;
 delay();
 IO1PIN=0X00010000;
 }
 int main()
 {
 IO1DIR|=(1<<16);
 IO1DIR|=(1<<17);
 IO0DIR=0XFFFFFFFF;
 while(1)
 {
 cmd(0x38);
 cmd(0x0c);
 cmd(0x01);
 dat('M');
 delay();
 dat('A');
 delay();
 dat('K');
 delay();
 dat('E');
 delay();
 dat('R');
 delay();
 dat('T');
 delay();
 dat('E');
 delay();
 dat('C');
 delay();
 dat('H');
 delay();
 }
 } 

Leave a Reply

Your email address will not be published. Required fields are marked *