0% found this document useful (0 votes)
77 views22 pages

82C55 Interface Guide for Engineers

The 82C55 is a programmable peripheral interface chip that can interface TTL-compatible I/O devices to microprocessors. It has 24 programmable I/O pins grouped into three ports that can operate in three modes to provide input, output, and handshaking signals. The 82C55 is commonly used to interface keyboards and parallel printers to PCs and can interface devices like stepper motors by providing drive signals to control the motor's direction and number of steps.

Uploaded by

MD Amin
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)
77 views22 pages

82C55 Interface Guide for Engineers

The 82C55 is a programmable peripheral interface chip that can interface TTL-compatible I/O devices to microprocessors. It has 24 programmable I/O pins grouped into three ports that can operate in three modes to provide input, output, and handshaking signals. The 82C55 is commonly used to interface keyboards and parallel printers to PCs and can interface devices like stepper motors by providing drive signals to control the motor's direction and number of steps.

Uploaded by

MD Amin
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/ 22

82C55

Programmable Peripheral Interface


About 82C55
• The 82C55 is a popular low cost interfacing
component, that can interface any TTL-
compatible I/O device to a microprocessor.

• It is used to interface to the keyboard and


a parallel printer port in PCs (usually as
part of an integrated chipset).
About 82C55

• PPI has 24 pins for I/O that are


programmable in groups of 12 pins
and has three distinct modes of
operation.
82C55 : Pin Layout

Group : A
Port (A0-A7) &
Data Upper part of port C
bus (C4-C7)

Port A
Input
pin
Port B

Reset all
program

Port C

Group : B
Programmi Port (B0-B7) & Lower
ng,reading part of port C (C0-C3)
& writing to
a port
82C55
Control Signals:

RD

WR Read/write
Control
A0 Logic

A1

Reset

CS
Figure 11–19 The 82C55 interfaced to the low bank of the
80386SX microprocessor.
• A RESET input to the 82C55 initializes the
device whenever the microprocessor is
reset.

• A RESET input to the 82C55 causes all


ports to be set up as simple input ports
using mode 0 operation.
82C55 PPI
Addressing the 82C55

A1 A0 = 00 Port A ;
= 01 Port B ;
= 10 Port C ;
= 11 Command Register;
Programming The 82C55
• 82C55 contains only two internal Command
Registers

Notice that bit position 7 selects either Command byte


A or Command byte B.

Command byte A : (command byte A programs the


function of group A and B)

Command byte B : (command byte b sets (1) or reset


(0) bit of port C only if the 82C55 is programmed in
mode 1 & 2)
Programming The 82C55
• Group B Pins:
Are programmed as either input or output
pins.Group B can operate in either mode o
or 1.
Mode 0 is the basic input/output mode that
allows pins of group B to be programmed as
simple input latched output connections.

Mode 1 operation is the strobed operation for


group B connections.
Programming The 82C55
• Group A Pins:
Are also programmed as either input or
output pins.The difference is that Group
A can operate in modes 0,1 and 2.

82C55 has three operation modes:


 mode 0
 mode 1
 mode 2
Programming 82C55
Mode 0 (Basic Input/Output).
• This functional configuration
provides simple input and output
operations for each of the three
ports.
• No “handshaking” is required, data
is simply written to or read from a
specified port.
MODE 1 (Strobed Input/Output)
• This functional configuration
provides a means for transferring
I/O data to or from a specified port
in conjunction with strobes or
“handshaking” signals.
• In mode 1, Port A and Port B use
the lines on Port C to generate or
accept these “handshaking” signals
Mode 1 Basic functional Definitions
• Two Groups (Group A and Group B).
• Each group contains one 8-bit data port
and one 4-bit control/data port.
• The 8-bit data port can be either input
or output Both inputs and outputs are
latched.
• The 4-bit port is used for control and
status of the 8-bit data port.
MODE 2 Basic Functional Definitions:

• Used in Group A only.


• One 8-bit, bi-directional bus port (Port
A) and a 5-bit control port (Port C).
• Both inputs and outputs are latched.
• The 5-bit control port (Port C) is used
for control and status for the 8-bit, bi-
directional bus port (Port A).
A Stepper Motor Interfaced to the
82C55.
• Another device often interfaced to a
computer system is the stepper motor.
– a digital motor because it is moved in
discrete steps as it traverses through 360°
• An inexpensive stepper motor is geared
to move perhaps 15° per step
• A more costly, high-precision stepper
motor can be geared to 1° per step.
A Stepper Motor Interfaced to the
82C55.
• In all cases, these steps are gained through many magnetic
poles and/or gearing.
• Figure 11–23 shows a four-coil stepper motor that uses an
armature with a single pole.
– two coils are energized
• If less power is required, one coil may be energized at a
time, causing the motor to
step at 45°, 135°, 225°, and 315°.
• The motor is shown with the armature rotated to four
discrete places, called full stepping.
– accomplished by energizing the coils, as shown
Figure 11–23 The stepper motor showing full-step operation:
(a) 45° (b) 135° (c) 225° (d) 315°.
A Stepper Motor Interfaced to the
82C55.
• The motor is driven by NPN Darlington amp pairs
to provide a large current to each coil.
• A circuit that can drive this stepper motor is
illustrated in Fig 11–24.
• with the four coils shown in place
• This circuit uses the 82C55 to provide drive
signals used to rotate the motor armature in
either the right- or left-hand direction.
Figure 11–24 A stepper motor interfaced to the 82C55. This
illustration does not show the decoder.
A Stepper Motor Interfaced to the 82C55.
•From subroutine of Ex 10-10, CX contain the direction
and steps of rotation.
– If CX>8000h, motor spins in right hand direction
–If CX<8000h, motor spins in left hand direction
–The 15 bits except MSL(leftmost bit) express the no. of steps.

You might also like