0% found this document useful (0 votes)
178 views14 pages

LCD Micro Krushabh 1

This document provides details about a project to interface an LCD display and 8x8 matrix keyboard with an 8051 microcontroller. It will display alphanumeric characters on the LCD in a calculator-style entry mode based on key presses, using interrupts only. The document includes a block diagram, descriptions of the components used including the microcontroller, LCD display and keyboard. It also includes the circuit diagram showing how the components are connected, and an overview of the methodology and program used.

Uploaded by

Shaheed Arab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views14 pages

LCD Micro Krushabh 1

This document provides details about a project to interface an LCD display and 8x8 matrix keyboard with an 8051 microcontroller. It will display alphanumeric characters on the LCD in a calculator-style entry mode based on key presses, using interrupts only. The document includes a block diagram, descriptions of the components used including the microcontroller, LCD display and keyboard. It also includes the circuit diagram showing how the components are connected, and an overview of the methodology and program used.

Uploaded by

Shaheed Arab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

A PROJECT REPORT ON

Interfacing LCD & 8x8 matrix keyboard with 8051 and


display Alphanumeric character in right entry mode
(i.e.Calculator entry mode) as per key press using
Interrupts only.

Submitted by

Group-D

MISTRY MAITRI VIMALKUMAR (PRN - 2020033800111271)

Faculty of Technology and Engineering


The maharaja Sayajirao University of Baroda
Academic Year 2022-23

1
TABLE OF CONTENTS

.........................................................................................................................................1
1. Introduction.................................................................................................................3
2. Apparatus....................................................................................................................3
3. Block Diagram............................................................................................................4
4. Component Description..............................................................................................4
4.1 Microcontroller......................................................................................................4
4.2 16x2 LCD Display.................................................................................................5
4.3 8x8 Keyboard.........................................................................................................6
5. Circuit Diagram.........................................................................................................7
5.1 Power Supply Circuit.............................................................................................7
5.2 Microcontroller, LCD and RESET Circuit............................................................7
5.3 Keyboard Circuit...................................................................................................8
5.4 Whole Circuit.........................................................................................................8
6. Methodology..............................................................................................................9
7. Program....................................................................................................................10
8. Simulation Results..................................................................................................14

2
1. Introduction
AIM: To interface 16x2 liquid crystal display and 8x8 matrix keyboard with 8051 and program it for
to display alphanumeric character in right entry mode as per the key press using interrupts only.

Keyboard is an input device used to read the key pressed by the user.8x8 matrix keyboard consists of
8 rows and 8 columns. A key press establishes a connection between corresponding row and column
between which the switch is placed.

An LCD is an output device used to display ASCII characters and symbols.16x2 LCD has 16
columns and 2 rows.

2. Apparatus

Sr. No. Components Quantities


1. Microcontroller IC AT89C51 and base 1
2. Ceramic Capacitors 33uF 2
3. Crystal 12MHz 1
4. Berg strip and Female strip 1
5. 10K - 9 Pin prack 1
6. Push Buttons 64
7. 16x2 LCD 1
8. 230V/9V Transformer 1
9. 10K Trimpot 1
10. Heatsink IC 1
11. Capacitor 35V,1000uF 1
12. Capacitor 104 4
13. LCD 1
14. Capacitor 25V,470uF 1
15. Capacitor 63V,10uF 2
16. Resistor 4K7 1
17. Resistor 10K 1
18. Diode 1N4007 5
19. Diode IN4148 1
20. 2 Pin Connector 1
21. General Purpose PCB 1

3
3. Block Diagram

4. Component Description

4.1 Microcontroller 8051

8051 microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller. It is built with 40


pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage, 2 16-bit timers.
It consists of are four parallel 8-bit ports, which are programmable as well as addressable as per the
requirement. An on-chip crystal oscillator is integrated in the microcontroller having crystal
frequency of 12 MHz

4
Pin Description:

 Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It
is internally pulled up, bi-directional I/O port.
 Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.
 Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like
interrupts, timer input, control signals, serial communication signals RxD and TxD, etc.
 Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system
clock.
 Pin 20 − This pin provides the power supply to the circuit.
 Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address
bus signals are also multiplexed using this port.
 Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal
from the external program memory.
 Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable
the external memory interfacing.
 Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex
the address-data signal of port.
 Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address
and data bus signals are multiplexed using this port.
 Pin 40 − This pin is used to provide power supply to the circuit.

4.2 16x2 LCD Display

GND should be connected to the ground.

5
VCC is the power supply for the LCD which we connect the 5 volts pin on the Arduino.

V0 (LCD Contrast) controls the contrast and brightness of the LCD. Using a simple voltage divider
with a potentiometer, we can make fine adjustments to the contrast.

RS (Resister select) pin lets the Arduino tell the LCD whether it is sending commands or the data.
Basically, this pin is used to differentiate commands from the data. For example, when RS pin is set
to LOW, then we are sending commands to the LCD (like set the cursor to a specific location, clear
the display, scroll the display to the right and so on). And when RS pin is set on HIGH, we are
sending data/characters to the LCD.

R/W (Read/Write) pin on the LCD is to control whether or not you’re reading data from the LCD or
writing data to the LCD. Since we’re just using this LCD as an OUTPUT device, we’re going to tie
this pin LOW. This forces it into the WRITE mode.

E (Enable) pin is used to enable the display. Meaning, when this pin is set to LOW, the LCD does
not care what is happening with R/W, RS, and the data bus lines; when this pin is set to HIGH, the
LCD is processing the incoming data.

D0-D7 are the pins that carries the 8-bit data we send to the display. For example, if we want to see
the uppercase ‘A’ character on the display we will set these pins to 0100 0001(according to the
ASCII table) to the LCD.

A-K pins are used to control the backlight of the LCD.

4.3 8x8 Keyboard

It has 8 row and 8 columns arrange in matrix form to reduced the total pins.

6
5. Circuit Diagram
5.1 Power Supply Circuit

5.2 Microcontroller, LCD and RESET Circuit

7
5.3 Keyboard Circuit

5.4 Whole Circuit

8
6. Methodology

According to Circuit diagram rows are connect to P1.0 to P1.7 and Columns are connected to P2.0 to
P2.7, LCD data pins are connected to P0.0 to P0.7 and control pins of lcd i.e., RS, RW and E are
connected to P3.0, P3.1, P3.2 respectively. Columns are connected to P2.0 to P2.7 pins configured as
inputs. The idle state of these pins is high low.

Timer Counter Configuration

The Timer Counter is initialized to be incremented on internal clock cycles. A software trigger is
used to reset the timer counter and start the counter clock.

Keyboard Scan

The Keyboard used is an 8x8 matrixed Keyboard. Columns are connected to pins configured as
inputs. The initial state of these pins is LOW. The state machine is initialized to start with fast scan
which outputs zeroes to all rows and detects all keys at the same time. When a key is pressed, a low
level is applied to the corresponding column. Once any key is detected, debouncing is started. The
attempt to press a key on a physical keypad and have this activity detected can fail as a result of
several noise sources, glitches, spikes, etc., to mention some of the possible causes of debounce
problems. The timer is used to eliminate all noise of less than a few milliseconds. Normally this is
dependent on the mechanical characteristics of the keys. In this application example, a 20ms
programmable debouncing time is used. After debouncing is completed, a detailed scan is executed.
A second fast scan is done to assure that any detection made during the first fast scan stage was not
just noise.

LCD commands

COMMAND FUNCTION
OF LCD ON, Cursor ON, Cursor blinking ON
01 Clear screen
02 Return home
03 Decrement cursor
06 Increment cursor
OE Display ON, Cursor blinking OFF
80 Force cursor to the beginning of 1st line
CO Force cursor to the beginning of 2nd line
38 Use 2 lines and 5x7 matrix
83 Cursor line 1 position 3
3C Activate second line
08 Display OFF, Cursor OFF
C1 Jump to second line, position1
OC Display ON, Cursor OFF
C1 Jump to second line, position1
C2 Jump to second line, position 2

9
7. Program

10
11
12
13
8. Simulation Results

14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy