Anda di halaman 1dari 11

Birzeit University

Department of Electrical and Computer System Engineering

Computer Design Laboratory


Experiment Report
PPI with Dot Matrix on the MDA Kit

Instructor: Dr. Jamal Seyam


Teaching Assistant: Eng. Wafaa Afaneh
Section: Thursday, 8AM.
Prepared by,
Haitham Daana – 1121331

12, March 2018


Table Contents

Section I: Abstract ......................................................................................................................... 3


Section II: Introduction and summary of PPI chip and peripheral devices .................................... 4
Section III: Procedure and Discussion ......................................................................................... 7
Section IV: Conclusion .............................................................................................................. 10
Section V: References ............................................................................................................... 11
Section I: Abstract

This experiment’s aim is to introduce the Programmable Peripheral Interface (PPI), which is an
interface between the I/O devices and 8086 microprocessors. This experiment aims at understanding and
testing the dot matrix structure, and the principle of display using the 82C55 PPI devices.
The MDA 8086 subsystem will be used to control the display of patterns, digits, and characters. The
display element in this experiment is an 8x8 LEDs dot matrix, and also 7-segment display.
Section II: Introduction and summary of PPI chip and peripheral devices

1. Introduction to PPI chip

The 82C55 is a popular interfacing component, that can interface any I/O device to the
microprocessor, such a device is needed to co-ordinate data transfer and communication link between I/O
devices.

Figure 1: PPI Chip

PPI has three ports each of 8 bits size, it can work in three different modes, Simple I/O, Strobed
Input/Output, Bidirectional Mode. In simple I/O it works just an input/output port with no extra features,
in strobed input/output mode it can incorporate ACK (Acknowledgment) signals to play a role in the
communication/data transfer link between I/O devices and processor, lastly in Bidirectional Mode, which
is only for PORTA, it can work as input or output, which makes this port capable of delivering and
receiving data from device to the processor or from processor to device.
2. Dot Matrix and 7-Segment Display

Figure 2: Dot Matrix

The dot matrix terminals are controlled using all three ports on an 82C55 peripheral programmable
interface. Ports A and B are used to drive the cathode of the LEDs, while Port-C would drive the anodes
terminals. Port-A drives the red LEDs while port-B drives the green LEDs. If the two LEDs with the same
coordinates are enabled then the outcome will be an orange dot. [2]
A Seven-Segment Display is combination of 8 LED, which for an 8 shape, which can be turned on/off
accordingly to display a specific number on the display, for example if all LEDS are turned on this will
show number “8”, turn off the “g” LED, this will show a zero, figure below demonstrates the construction
of 7-segment.

Figure 3: 7 Segment
The display consists of seven active low segments (A, B, C, D, E, F, G) and an active low
decimal point (P). The segments and P are driven by the 82C55 Port-A signals as shown in Table
1.

Table 1
Section III: Procedure and Discussion

PART I. Dot Matrix Applications

1. In the first part of experiment, an assembly code was written to display a moving red dot vertical
line (columns) across the display and keeps repeating. First the was written in .asm file, then
transformed to .obj file and from .obj to exe, and from .exe to .bin and from .bin to .hex file, which
can be downloaded onto the kit.

Let us discuss how this was done, as we have aforementioned in introduction PORTC drives the
anodes of the LEDS, and Port A, or Port B are used to drive the cathodes, the idea behind this code
was to do the following, sequentially enable (send logic one) to one bit data line in port c, and make
it rotate, for example, assume P7 is enabled 10000000, when it rotates it eventually becomes,
000000001, we make sure that when a carry flag is set we jump back to set PORTC to send
10000000 and so on.

2. In the first task, we were asked instead of making a vertical sweeping of LED’s as in first part, it
requested a horizontal sweeping, from top to bottom.

Let us discuss how we have done it, in order to achieve this objective, all columns (PORTC) must
be high when we activate any of rows, so FF, was sent to PORTC, PORTB was disabled, by sending
FFH, and PORTA was set to loop, and was initialized by value 01111111(7FH), and was set to
rotate the ones from left to right in each cycle, and by that we activate one row in each cycle, and
once processor detects that there is no carry it jumps to a loop that re-initializes PORTC to 7FH.
Figure 4: Code for TODO1

3. In the second task, we were asked to make the Dot Matrix show a letter, this can be done by saving
the sequence of bits to represents a specific number in each column, and we put them into an array,
the columns with little delays so we can see the letters.

Figure 5: Code for TODO2


PART II: 7-Segment
In this part, as aforementioned, the 7-Segment is connected to PORTA, we were asked to make a
counter from 0 to 9 and repeat. This can be done using the same idea, in the second task in Part 1, we
saved each number’s corresponding bits starting from 0 to 9 in an array, and those bits were sent to
display after some delay, and one count has reached 9, it resets to 0. Code is attached below.

Figure 6: 7-Segment Code (TODO3)


Section IV: Conclusion

At the end of this experiment, we were able to program the 8086 using assembly language to perform
multiple tasks with I/O devices using the Programmable Interface device in mode 0 (simple I/O).
Section V: References

[1]: Lab Manual


[2]: The Intel Microprocessors by Barry B. Brey

Anda mungkin juga menyukai