You are on page 1of 2

EXPERIMENT-10

4-DIGIT MULTIPLEXED SEVEN SEGMENT DISPLAY


OBJECTIVE:
 To learn to control seven segment display decoder, and to understand the function of
multiplexed array of four digit seven-segment decoder
 To understand and implement refresh rate in case of a display
 To learn a method of displaying a 4-digit number on an output device using the 89C52
micro-controller

EQUIPMENT/ TOOLS:
 ATMEL 89C52 Microcontroller
 Microprocessor Trainer Board
 Four-digit array of Seven-Segment display decoders

THEORY:
The seven-segment display decoder is a combination of 7 LEDs capable of displaying all the
digits of the hexadecimal system. A single Seven Segment decoder unit can have either common
anode or common cathode configuration. The diagram below shows a four digit multiplexed
array of seven-segment decoders in common anode configuration. Providing logic 1 to any of a1,
a2, a3, or a4 selects that particular digit. Writing 0 to any of a, b, c, d, e, f or g lights up that
segment.

The assignment of pin-outs and the formation of digits are shown below:
A 4-digit hexadecimal number is displayed on the four-digit unit by continuously refreshing the
four seven segment display units. The rate at which the display is refreshed should be fast
enough to prevent flickering. In general, the whole four digit display should be refreshed at least
25 to 30 times a second (much above the minimum criteria of 16 times per second). However, in
this experiment we will be refreshing it at a much faster rate of 250 times per second or with a
period of 4 msec, thus making ON each digit for 1ms in one iteration.

PROBLEM STATEMENT:

Write a program that takes two 4-bit numbers (A and B) as input and performs the required
arithmetic operation according to the selection value in register R0. If R0 = 1, then perform A+B.
If R0 = 2, then perform A*B. The result along with the two numbers must be displayed on
multiplexed 4-digit common anode 7-segement display. The result is shown in decimal base until
it is 2-digit; if the result is 3-digit in decimal then the result must be shown in hexadecimal base.

Example#1:
If R0 = 1, A = 5 and B = 8 then “5 8 1 3” must be displayed.
If R0 = 2, A = 5 and B = 8 then “5 8 4 0” must be displayed.

Example#2:
If R0 = 1, A = 15 and B = 10 then “F A 2 5” must be displayed.
If R0 = 2, A = 15 and B = 10 then “F A 9 6” must be displayed.

In example#2 the result of 15*10 = 150 in decimal (3-digit) that’s why the result is shown in
hexadecimal base i.e., 96H

POST LAB:
We have a list of ten 4-digits numbers stored in the ROM in the form of comma-separated
strings. Like "list db: “1234”, “6789”, ... ,”3458”.
Write a program to display first complete number on 7-segment display for one second, then
display the next number for one second, and so on.

You might also like