100% found this document useful (9 votes)
15K views14 pages

8255 Interface

The document describes the 8255 Programmable Peripheral Interface chip, which provides 8-bit parallel input/output ports that can be programmed to operate in different modes. It connects to the 8088 microprocessor and uses its address and data lines. The 8255 is addressed using the A1 and A0 pins to select one of its ports, while the other address lines are used to decode its location in I/O address space.

Uploaded by

sudhakarpms123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (9 votes)
15K views14 pages

8255 Interface

The document describes the 8255 Programmable Peripheral Interface chip, which provides 8-bit parallel input/output ports that can be programmed to operate in different modes. It connects to the 8088 microprocessor and uses its address and data lines. The 8255 is addressed using the A1 and A0 pins to select one of its ports, while the other address lines are used to decode its location in I/O address space.

Uploaded by

sudhakarpms123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

8255 PPI

(Programmable Peripheral Interface)


(Parallel Port Interface)

8 8
Data Port A
RD 8
Port B
WR
RESET 4

{
CH
Port
CS 4
C CL
A1
A0
Addressing the 8255

A1 A0 = 00 Port A ; IN, OUT 8 bits at a time


= 01 Port B ; IN, OUT 8 bits at a time
= 10 Port C ; IN, OUT 8 bits at a time
= 11 Control Register; Write ONLY!

From IO.EQU
PORT2A = 0224h ;Port A externally available
PORT2B = 0225h ;Port B externally available
PORT2C = 0226h ;Port C externally available
STAT2 = 0227h ;8255-5 # 2A / Status Register
Interfacing the 8255

20
8088
Address Only
A19
A18 Address/Data
A17 AD7
A16 AD6
A15 AD5
Address and Data lines
A14 + AD4
are multiplexed in the
A13 AD3
8088
A11 AD1
A10 AD0
A9
A8
Address and Data Buses

20
8088 Address 20-bit address bus
Latch
ALE
8

Data Transceiver 8-bit data bus

ALE is Address Latch Enable


Addressing the 8255
IO/M

8-bit data bus 8


Data Port A
20-bit address bus RD 8
Port B
WR
RESET 4

{
A15 CH
Logic Port
-A2 CS 4
Circuit C
A1 CL
A1
A0
A0
Logic Circuit
• Inputs to the Logic Circuit
– address lines A15 - A2
(the I/0 address space is 216 addresses, and A1 and A0 are
used for the chip’s address lines)
– the 8088’s IO/M line
HIGH denotes an IO instruction (IN, OUT)
LOW denotes a memory access instruction (i.e., MOV)

• Output of the logic circuit


– a single low value from the 15 inputs (a NAND or OR gate)
to activate the Chip Select
• The connections for A15-A2 fix the chip’s address in I/O
space
8088 pins

The 8088 is a 16-bit


microprocessor:

Internal registers and


buses are 16 bits wide
8 address/data lines
12 addresslines

IO/M

RD and WR
Minimum mode
• In minimum mode, the 8088 is the only microprocessor in
the circuit. It can assume that it has control of memory,
address, and data buses
• In maximum mode, the 8088 is configured for multiple
microprocessors. The function of pins is changed to
provide processor-to-processor communication
8255 PPI
(Programmable Peripheral Interface)
(Parallel Port Interface)

8 8
Data Port A
RD 8
Port B
WR
RESET 4

{
CH
Port
CS 4
C CL
A1
A0
Reset
• A single reset line is connected to all chips in the system
(8088, 8255, 8253, etc.)
• Reset puts the chip in a known state
• Pushing the reset button on your computer generally
activates a 555 timer circuit that outputs a high pulse for a
short period of time
• On Reset, the 8088 goes to fixed addresses (ROM chips)
where boot sequence instructions are stored.
A/D
• Step 1: Call SetupAD
• Step 2: Mov al, channel#
Mov dx, WRTCH1
Out dx, al
• Step 3: Mov dx, STBAD1
Out dx, al ; or IN dx, al
• Step 4: Mov CX, delaycount
L1: Loop L1
• Step 5: Mov dx, RDCH1
IN al, dx
A/D #2
• After an A/D value is read, many algorithms will need to
compare the analog voltage to some target analog voltage
• For the computers in Anderson 307, the conversion is 18
mv per 1-bit change.
• If Vtarget is the target voltage in volts, it must be
converted to a target count
Multiply Vtarget * 1000 ; target in millivolts
Divide target by 18 ; equivalent count
• Careful use of word-wide vs. byte-wide multiply and
divide is essential
• For critical applications may need to investigate remainder
to round count to nearest integer.
D/A
• A voltage proportional to the count appears on the D/A
output
Mov dx, DAC#
Mov al, dacount
Out dx,al

• At times the program must make a voltage-to-count


conversion (previous slide).
Homework for Thursday, October 28
• Write a commented 8088 assembly language procedure that
will output a “clipped” signal that follows an input signal.
• The procedure should operate continuously until a key is
pressed
• Assume that
the input signal is in the range 0 - 5 volts
the A/D has been calibrated at 20 mv per 1-bit change
the D/A has been calibrated at 25 mv per 1-bit change
the level to clip the output at is stored in variable,
CLIPLEVEL, and is given in units of tenths of volts (0.1 v)
• That is, if CLIPLEVEL = 10, then the output signal should
be in the range 0 - 1 volt.

You might also like