4

Click here to load reader

16x2 Lcd Interfacing in 4-Bit Mehod

Embed Size (px)

DESCRIPTION

16x2 Lcd Interfacing in 4-Bit Mehod

Citation preview

Page 1: 16x2 Lcd Interfacing in 4-Bit Mehod

16X2 LCD INTERFACING IN 4-BIT MEHOD

Abstract:

Several electronic devices and projects require a message to be displayed in order to

indicate their functioning. This topic explains how to display a message (string) on 16x2 LCD by

interfacing it to 8051 microcontroller (AT89C51).

The 4-bit mode LCD interface requires four data lines and two or three control lines. In

this tutorial, 16x2 LCD interfaced with 8051 microcontroller in 4-bit mode without using busy

status flag. In 4-bit mode LCD interface, MCU sends the data or command byte in two 4-bit bus

transfers to LCD as nibbles. A nibble is 4bit data, which is half a byte.

In the above figure, the port0 upper four lines of the 8051 microcontroller is connected to

data lines (D4-D7) of the LCD. In 8051 microcontroller, the port0 doesn’t have the internal pull-

up resistors and all these port0 pins are open drain configuration. So we need to connect an

external pull-up resistor to each port pin to improve the driving capability of the port0. The pull-

up resistor values should be between 4.7kohms to 10kohms as recommended in the data sheet of

the microcontroller.

The control pins (Enable, R/W, RS) of the LCD are connected to port2 of the 8051MCU

(P2.2, P2.1, P2.0) respectively.

A 10k preset is connected at 3rd pin of the LCD to vary the contrast of the LCD. The 10k

value is better chosen that not to vary the contrast drastically (If we use 1k or below preset value,

the variation of the contrast is very drastic which make the operation of preset more sensitive).

The 1k resistor is connected in series with 10k preset, which will limit the maximum current

flow when the preset wiper is at its minimum position. A reset circuit made up of resistor and

capacitor which is connected at 9th pin of the microcontroller and it is named as power on reset.

This reset circuit is used to apply a proper reset pulse after the power supply is settled down,

hardly it takes 100 milliseconds (TC = 10uf*10K). A clock circuit of 11.0592Mhz with two 33pF

capacitors are connected at the XTAL1 and XTAL2 pins.

Page 2: 16x2 Lcd Interfacing in 4-Bit Mehod

BLOCKDIAGRAM:

Power supply

Controller

Crystal

oscillator

LCD

Step down

transformer

RegulatorFilterRectifier

Reset switch

Page 3: 16x2 Lcd Interfacing in 4-Bit Mehod

HARDWARE REQUIREMENTS:

1. Microcontroller

2. Power supply

3. LCD DISPLAY

SOFTWARE REQUIREMENTS:

1. KEIL software

2. RIDE Software

Advantages: Easily operated It is highly reliable

It consume less power

It reduce the man power

It occupies low space

Low cost

Applications:

It is used in prototype projects

Real time applications

Railway stations

TV’s, computer display’s, mobile phones .etc

Page 4: 16x2 Lcd Interfacing in 4-Bit Mehod