Line 13: Line 13:
 
=Code=
 
=Code=
 
<syntaxhighlight>
 
<syntaxhighlight>
/*
+
/* note: Refer lcd.h file for Pin connections */
* Lcd_Display.c : Program to demonstrate displaying of message on LCD
+
*  Author: exploreembedded
+
* note: Refer lcd.h file for Pin connections
+
*/  
+
  
 
#include "lpc17xx.h"  //Device Specific header file
 
#include "lpc17xx.h"  //Device Specific header file
 
#include "lcd.h" //User defined LCD library which conatins the lcd routines
 
#include "lcd.h" //User defined LCD library which conatins the lcd routines
 
  
 
/* start the main program */
 
/* start the main program */
Line 37: Line 32:
 
   LCD_GoToLine(2);
 
   LCD_GoToLine(2);
 
   LCD_DisplayString("Good Morning");
 
   LCD_DisplayString("Good Morning");
 
  
 
   while(1);
 
   while(1);
  
 
}
 
}
/* end of file */
+
</syntaxhighlight>
  
  
 
{{DISQUS}}
 
{{DISQUS}}

Revision as of 13:37, 17 March 2015

Amruta (talk) 12:21, 17 March 2015 (IST)


Basics

In this tutorial we will interface LCD to LPC1768.

Here we will not go in details of LCD.

Still if you want to know it, click here.

Schematic

Code

/* note: Refer lcd.h file for Pin connections */
 
#include "lpc17xx.h"   //Device Specific header file
#include "lcd.h"	//User defined LCD library which conatins the lcd routines
 
/* start the main program */
int main() 
{
	SystemInit();
 
  /* Initialize the lcd before displaying any thing on the lcd */
    LCD_Init(8,2,16);
 
  /* Display "hello, world" on first line*/
  LCD_DisplayString("Hello World");
 
  /*Go to second line and display "good morning" */
  LCD_GoToLine(2);
  LCD_DisplayString("Good Morning");
 
  while(1);
 
}