0% found this document useful (0 votes)
115 views19 pages

Interfacing LEDs and LCDs with 8085

This document discusses interfacing LEDs, seven segment displays, and LCD displays with the 8085 microprocessor. It explains that LEDs can be interfaced with the 8085 using the 8255 PPI chip. The 8255 connects via address, data and control lines and LEDs are connected to ports configured as outputs. Turning ports on or off controls whether LEDs are lit. Seven segment displays also use the 8255 PPI, with each segment connected to a port pin. A truth table shows which port values turn on each segment to display numbers. LCD displays have a built-in controller that receives data and commands via 8 data lines and 3 control signals from the 8085. Instructions
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views19 pages

Interfacing LEDs and LCDs with 8085

This document discusses interfacing LEDs, seven segment displays, and LCD displays with the 8085 microprocessor. It explains that LEDs can be interfaced with the 8085 using the 8255 PPI chip. The 8255 connects via address, data and control lines and LEDs are connected to ports configured as outputs. Turning ports on or off controls whether LEDs are lit. Seven segment displays also use the 8255 PPI, with each segment connected to a port pin. A truth table shows which port values turn on each segment to display numbers. LCD displays have a built-in controller that receives data and commands via 8 data lines and 3 control signals from the 8085. Instructions
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

LED/ SSD/ LCD

INTERFACING WITH 8085


MPMC
LED Interfacing
• LEDs are interfaced with 8085 using 8255 PPI.
• 8255 PPI is interfaced using address lines, data lines and
control line RD and WR.
• LEDs are connected to any one of the port by configuring
the port in simple IO mode.
• LEDs are connected to the ground through current limiting
resistors.
• When logic 1 is send to any pin of Port A, the LED will
conduct the current and it will glow.
• When logic 0 is send to any pin of Port A, then the LEDs
will be off.
Interfacing
Example program:
Program to blink LEDs continuously
In order to configure the 8255 with Port A as output port,
the control word to be written in Control Word Register
should be 10000000 ie, 80H. The 8255 control word is
written as follows:

D7 D6 D5 D4 D3 D2 D1 D0

1 0 0 0 0 0 0 0
Program
Main Program:
MVI A, 80 ;initialize 8255 as discussed above.
OUT CWR// CWR is the 8 bit addr – say 43h
BACK: MVI A, FF // To send 1 to all LEDs at port A.
OUT Port A // Port A corresponds to address of port A
CALL DELAY // delay subroutine
MVI A, 00 //To send 0 to all LEDs at port A.
OUT Port A
CALL DELAY
JMP BACK

Delay Subroutine:
DELAY: MVI C, FF
REP: DCR C
JNZ REP
RET
INTERFACING OF SEVEN SEGMENT
LED DISPLAY WITH 8085
• Seven segments LED display is interfaced with 8085
using 8255 PPI.
• 8255 PPI is interfaced using address lines, data lines and
control line RD and WR.
• Seven segment LED display is connected to any one of
the port by configuring the port in simple IO mode.
• Seven segment LED display is connected to the ground
through 74LS244 driver and current limiting resistors.
• Seven segment LED display used here is a common
anode type, hence when logic 0 is send to any pin of Port
A, the LED will conduct the current and it will glow.
• When logic 1 is send to any pin of Port A, then the LEDs
will be off.
DIAGRAM
Truth Table
PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 SS HEX
D
DP g f e d c b a
1 1 0 0 0 0 0 0 0 C0
1 1 1 1 1 0 0 1 1 F9
1 0 1 0 0 1 0 0 2 A4
1 0 1 1 0 0 0 0 3 B0
1 0 0 1 1 0 0 1 4 99
1 0 0 1 0 0 1 0 5 92
1 0 0 0 0 0 1 0 6 82
1 1 1 1 1 0 0 0 7 F8
1 0 0 0 0 0 0 0 8 80
1 0 1 1 0 0 0 0 9 B0
1 0 0 0 1 0 0 0 A 88
1 0 0 0 0 0 1 1 B 83
1 1 0 0 0 1 1 0 C 86
1 0 1 0 0 0 0 1 D A1
1 0 0 0 0 1 1 0 E 86
1 0 0 0 1 1 1 0 F 8E
Program
MVI A, 80
OUT 43
MVI A, 88
OUT 40// DISPLAY A
MVI A, DATA
OUT 40
INTERFACING OF LCD DISPLAY WITH 8085
• Used for low power consumption applications-watch, calculator
• LCD modules allow display of characters as well as numbers.
They are available, in 16 x 2, 20 x 1, 20 x 2, 20 x 4 and 40 x 2
sizes.
• The LCD Module has a built-in controller driver (Hitachi
HD4478) having 14 pin.
• It has 8-data lines and three control signals (RS, R/W’,E) and
three for power supply.
• The controller has two 8-bit registers - an Instruction Register
(IR) for commands and a Data Register (DR) for data.
• RS=0 indicates write operation and RS=1 indicates a read
operation. During write DB7 is set high as a busy flag that can
be read by the MPU.
• On completion of internal operation, BF is reset. During internal
operation E is asserted (LHL) until BF is reset.
• When DB7 is reset uP writes next command or data.
Pin Diagram
Pin Description
Register Select

Register Selector
RS R/W
0 0 Sends a command to LCD
Read busy flag (DB7) and address counter
0 1
(DB0 to DB6)
1 0 Sends information to LCD
1 1 Reads information from LCD
LCD Functions (Instructions)
LCD Functions
Diagram
Program
CHKDB7: MVI A, 92H // PORT B AS INPUT 10010010
OUT 43H
IN A

MVI A, 00// PC1=RS=0 00000000


OUT 43h// write to lcd
Cont..
MVI A, 80// ABCMODE 0 OP MODE
OUT 43
MVI A, 04
OUT 42// PORT C 00000100
MVI A, 01// CLEAR DISPLAY
OUT 40// PORT A
END OF LECTURE

You might also like