EXP8
EXP8
8 Date: D D - M M - Y Y
THEORY
Liquid Crystal Display (LCD) is widely used in various electronics’ applications to show different status
and parameters. LCD16x2 has 2 lines with 16 characters in each line. Each character is made up of 5x8
(column x row) pixel matrix. LCD 16x2 is a 16 pin device which has 8 data pins (D0-D7) and 3 control pins
(RS, RW, EN). The remaining 5 pins are for supply and backlight for the LCD. The control pins help us
configure the LCD in command mode or data mode.
C Program
// Code for LCD Interfacing with ATmega32 AVR microcontroller
//------function declaration---------
void lcd_command(char c);
void lcd_data(char d);
void lcd_puts(const char *s);
//------main function----------------
main()
{
DDRC=0XFF; //PORT C as o/p line
DDRD=0XFF; //PORT D as o/p line
_delay_ms(20);
RESULT
Interfacing program for 16x2 LCD is written in embedded C, compiled, downloaded to target board, and
implemented LCD interfacing.