0% found this document useful (0 votes)
4 views

Presentation1

Uploaded by

Vijayaraghavan L
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)
4 views

Presentation1

Uploaded by

Vijayaraghavan L
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/ 18

UNIT III- PROGRAMMABLE PERIPHERAL INTERFACE

Introduction – Architecture of 8255,


Keyboard Interfacing, LED display –
Interfacing, ADC and DAC Interface,
Temperature Control – Stepper Motor
Control – Traffic Control Interface.
Why 8255 PPI is needed?
 The 8085 microprocessor has limited I/O pins; the 8255 PPI adds 24 extra
I/O pins (Port A, B, and C).

 The 8255's ports can be configured for input or output, allowing the
microprocessor to handle more devices at once.

 It offers three modes:


1. Mode 0: Simple input/output.
2. Mode 1: Input/output with synchronization (handshaking).
3. Mode 2: Bidirectional data transfer (e.g., for printers).

 Handshaking (Mode 1) ensures smooth, error-free data transfer with


peripherals like keyboards.
Why 8255 PPI is needed?
 The 8255 can control multiple devices at once, reducing the
need for extra control signals.

 The 8085 can easily manage peripherals by sending


commands to the 8255, which controls the connected devices.

 Without the 8255, interfacing peripherals would require complex


circuits, but the 8255 simplifies this process.
Introduction
• The 8255 PPI is an electronic device, or interface
chip, that allows a microprocessor to
communicate with external devices.

• External devices
1. sensors
2. actuators
3. motors
4. switches

• Think of it as a bridge that connects the brain of


the computer (the microprocessor) to the
machines or devices it needs to control.
• It allows the microprocessor to both send signals
to external devices (like turning on a motor) and
receive signals from them (like reading data from
a temperature sensor).
How It Works
Owner
• Imagine you're a Owner of a factory (the
microprocessor), and you need to communicate
with several different machines (external
devices).
• Each machine has its own controls: some Manager
machines need instructions (like when to start
or stop), and others provide information (like
the temperature of a product).
Two
• You hire a manager (the 8255 PPI-Control Logic) Supervisors
to handle this communication. Group A and
• The manager has two Supervisors Group A and Group B
Group B
• Three assistants, called Ports (Port A, Port B, Three
and Port C), to deal with the machines. Each Assistants
port can either: Ports (Port A,
• Send commands (output) to the machines. Port B, and
Port C)
• Receive information (input) from the machines.
8255 PPI Ports:

1. Port A:
Think of Port A as a "door" where the computer can either send data out or receive
data from the outside world.
2 .Port B:
Port B is just like Port A—another door for sending or receiving information.
3. Port C:
Port C is a little special because it’s like two smaller doors in one:
Cu: The top half of Port C.
Cl: The bottom half of Port C.
These halves can be used separately to control small things or check on
status (like whether a button is pressed or not).
1. Port A:
• Digital Data: Typically used to send or receive digital data (on/off signals)
from devices.
• Examples of Input:
• Keyboards: The port might receive signals from a keyboard, with each keypress
sending a unique digital code.
• Sensors: You could connect sensors (like temperature or light sensors) that send data
to the microcontroller/computer via Port A.
• Examples of Output:
• Displays: The port can send data to a display device (like a 7-segment display or an
LCD), showing numbers or text.
• Motors: It could send signals to control motors in a system (for example, in a robotic
arm).
2. Port B:
• Similar to Port A in functionality, Port B also deals with 8-bit digital
data.
• Examples of Input:
• Switches: You might connect switches or buttons to read whether they are
pressed or not.
• Analog-to-Digital Converters (ADC): You could read digital data from an ADC,
which converts an analog signal (like sound or light) into digital form.
• Examples of Output:
• LEDs: The port could send signals to control LEDs, turning them on or off.
• Printers: It can be used to send data to a printer, transmitting the text or
images to be printed.
3. Port C:
• Simple devices like buttons or LEDs might only need 1 or 2 bits to
function.
• By splitting Port C, you can use the upper half (Cu) and lower half (Cl)
separately for different small tasks.
• Cu (upper half) as input to read signals (e.g., check if a button is
pressed).
• Use Cl (lower half) as output to send signals (e.g., light up an LED).
The Type of Data Depends on the Device:
• Input devices (like sensors, buttons, or keyboards) send data to the
computer through Port A or B.
• Output devices (like displays, motors, or LEDs) receive data from the
computer through Port A or B.
• Imagine you're building a
home automation system:
• Port A could be connected to
temperature sensors that
send temperature readings to
your system (input).
• Port B could be connected to
lights or fans, allowing your
system to control them based
on the temperature (output).
8255 PPI Ports:
• Port A: It can handle high-priority
machines or processes,
communicating with more
complex devices.
• Port B: It takes care of other
machines that may not be as
complex but still require control.
• Port C: This port is flexible. It can
be split into two parts and used
for smaller tasks, like controlling
multiple switches or receiving
feedback from simpler devices.
Modes of Operation
Modes of Operation:
• The 8255 PPI can be set up in different ways, called modes, depending
on the type of machines you're communicating with:
• Mode 0: Simple communication – the port is just sending or receiving
data, like flipping a switch.

• Mode 1: More advanced – it can send or receive data and confirm that
the data was received correctly.

• Mode 2: Even more sophisticated – it can handle more complex


communication, like when multiple machines need to coordinate.
Analogy for Modes:
• Mode 0 is like just pushing a button to start or stop a machine
without worrying if the machine responds.
• Mode 1 is like sending a message to a machine and waiting for
confirmation that the machine received it.
• Mode 2 is like having a two-way conversation with a group of
machines to ensure they’re all working together.
Mode 2 (Bidirectional Communication Mode)

Practical Situation: Data Transfer Between Two Microcontrollers


• Scenario: You have two microcontrollers, say Microcontroller A and
Microcontroller B, that need to exchange data. One microcontroller sends
data to the other, but sometimes they both need to send or receive
information, like in a communication bus system.
• Port A (Group A in Mode 2) is configured for bidirectional communication
between the microprocessor (connected to the 8255) and another
microcontroller.
• The microprocessor connected to the 8255 could send commands to Microcontroller
B (output) or receive responses or data from it (input) using Port A.
• The handshaking signals ensure that when Microcontroller A sends data,
Microcontroller B is ready to receive, and vice versa. Signals like STB (Strobe) and
ACK (Acknowledge) coordinate the transfer process.

You might also like