Exp 5
Exp 5
Aim:
Interfacing 16x2 LCD in 8-bit Mode.
Objective:
The objective of this lab is to interface a 16x2 LCD with an ATmega2560
microcontroller in 8-bit mode and display the text on the LCD. This
experiment will help you understand how to configure and control an LCD
using Embedded C programming.
Components Required:
1. ATmega2560 Microcontroller (or Arduino Mega board)
3. Breadboard
4. Connecting Wires
Theory:
16x2 LCD Overview
• A 16x2 LCD has two rows, each capable of displaying 16 characters.
Pin Configuration
4. Clear display
5. Print data
Circuit Diagram
1. Connect the data lines (D0-D7) of the LCD to PORTF (PF0-PF7) of the
ATmega2560.
2. Connect the control lines as follows: RS -> PK0 RW -> PK1 EN -> PK2
Code:
Proteus Demonstration: