Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views5 pages

LED INTERFACING and Seven Segment Display

interfacing of microprocessor with LED kit

Uploaded by

swethaprincy65
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)
11 views5 pages

LED INTERFACING and Seven Segment Display

interfacing of microprocessor with LED kit

Uploaded by

swethaprincy65
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/ 5

LED INTERFACING

It is very easy to interface eight Light Emitting Diodes to 8085 through an output port.
Each LED requires a current of 10 to 20mA of current to light and each LED drops
about 1.5 volts. The remaining 3.5 volts (when '1' state voltage is +5 Volts) is to be
dropped across a resistor (r).

At 10mA, the value of the resistance, using Ohm's law, is given by

r= 3.5/( 10 x 10-3) = 350 ohms.

At 20mA, the value of the resistance.

г= 3.5/ (20 x 10-3)= 175 ohms.

It is safe to use a resistor having a value between 175 ohms and 350 ohms. We can use a
resistor of value 220 ohms.

Since, 10 to 20 mA current is required for each LED, to sink or source current; the I/O
port (8255) is not directly used. Between the ports and the LED's, octal buffer or octal
inverting buffer can be placed so that the I/O ports are not affected by excess current.

Let us connect the anode of an LED to +5 Volts. The cathode of the LED is connected to
the output of an inverting buffer through a safety resistance of 220 ohms as shown in
Fig (12.1).

When the input A of the inverter is given a '1' state, the output of the inverter goes to 'O'
state. A current flows through the LED and the LED goes to 'ON' state or the LED glows.

When the input of the inverter A is given a '0' state, the output of the inverter goes to '1'
state. Now no current flows through the LED and the LED goes to 'OFF' state or the LED
does not glow.

This simple logic is extended to connect eight LED's to the output port of 8255. An octal
inverting buffer is connected between the output port (say, port A) and the LEDs. The
anodes of the LED's are connected together and connected to +5 Volts. The circuit
diagram for the LED interface is shown in Fig (12.2).
For the circuit shown, each LED will glow when a '1' is sent out through the output port
and will not glow, when a '0' is sent out.

For the LED interface, first let us initialize 8255 so that port A and port B act as output
ports and port C as input port. (But, our requirement is only port A which should act as
output port, port B and port C can be input or output ports). The control word for 8255
is.

To make all the LEDS ON, the data FF is sent out through port A. Similarly, to make all the
LEDs OFF, the data 00 is sent out through port A. If we switch ON the LEDs and Switch
off the LEDs alternately with a time delay in between, we get 'flashing LEDs.
In a similar way we can write programs to make the LED display any sequence like ring
counter or shift or BCD or binary counter and so on.

[any other LED program]

Seven segment display interfacing to 8085

★ An output device which is very common is the Light Emitting Diode consisting of
seven segments.

★ We have eight segments in a LED display consisting of 7 segments which includes


‘.’, consisting of character 8 and having a decimal point just next to it.

★ We denote the segments as ‘a, b, c, d, e, f, g, and dp’ where dp signifies ‘.’ which is
the decimal point.

★ Moreover, these are LEDs or together a series of Light Emitting Diodes.

★ Seven segment displays are of two types,


common cathode and common anode.

★ In common cathode type , the cathode of all


LEDs are tied together to a single terminal and the
anode of all LEDs are left alone as individual pins
labeled as a, b, c, d, e, f, g & h (for dot) .

★ In common anode type, the anodes of all LEDs


are tied together as a single terminal and cathodes
are left alone as individual pins.
★ It will take a high (1) to turn a LED ON in common cathode and will take a low (0)
to turn a LED ON in a common anode seven segment display.

Common Anode Method :

Here we are using a common anode display therefore 0 logic is needed to activate the
segment. Suppose to display number 9 at the seven-segment display, therefore the
segments F, G, B, A, C, and D have to be activated.

The instructions to execute it is given as,

MVI A,99

OUT AE

● First, we are storing the 99H in the accumulator i.e. 10010000 by using MVI
instruction.

● By OUT instruction we are sending the data stored in the accumulator to the port
AFH

Common Cathode Method :

Here we are using common cathode 1 logic is needed to activate the signal. Suppose to
display number 9 at the seven-segment display, therefore the segments F, G, B, A, C, and
D have to be activated.

The instructions to execute it is given as,

MVI A,6F

OUT AE

● First, we are storing the 6FH in the accumulator i.e.01101111 by using MVI
instruction.

● By OUT instruction we are sending the data stored in the accumulator to the port
AFH

You might also like