Peripheral and Interfacing Class Notes
Peripheral and Interfacing Class Notes
Why is it important?
=> Peripherals are crucial for extending a computer's capabilities, enhancing user
interaction, and supporting functions like storage and printing. They contribute to
efficient workflows, connectivity, and customization, playing a pivotal role in
creating a versatile and user-friendly computing environment.
Advantages:
1. Enhanced Functionality: Peripherals expand the capabilities of a computer,
adding features like printing, scanning, and storage.
The Intel 8255A is a classic example of a PPI. It typically provides multiple I/O
ports that can be configured as input or output, offering a versatile solution for
connecting and controlling various peripherals in embedded systems. Programmers
can configure the PPI to meet specific interfacing requirements, making it adaptable
for a wide range of applications.
Architecture of Intel 8255A:
Schematic diagram of a computer’s interrupt handling structure.
1. Components:
○ Data Bus Buffer: This component manages data transfer between the
CPU and other parts of the computer.
○ Control Logic: Responsible for coordinating and managing various
operations within the computer.
○ Registers: These are small, fast storage locations within the CPU used
for temporary data storage during processing.
○ Internal Data Bus: The pathway through which data flows between
different components.
2. Purpose:
○ Interrupts are events that temporarily halt the normal execution of a
program. They can be triggered by hardware devices (e.g., keyboard
input, disk drives) or software (e.g., system calls).
○ When an interrupt occurs, the CPU switches its attention to handle the
interrupt request. The interrupt handling structure ensures that the
CPU responds appropriately to different types of interrupts.
3. Significance:
○ Efficient interrupt handling is crucial for multitasking and overall
system performance.
○ By organizing the components involved in interrupt handling,
computers can swiftly switch between tasks without wasting
processing time.
D7-D0: The pins are bidirectional Data lines and are connected to the data bus in the
system. Data, control, or status bytes are transferred on these lines between the
microprocessor and the internal ports or control register.
A0, and A1: The two Address inputs enable one of the three ports/control register
for data transfer. The pins are connected to two address bus lines in the system. The
internal addresses and I/O operations of ports and control register are given in the
table below:
RD’ and WR’: The read and Write control inputs allow data transfer between the
ports/control register and the microprocessor. The pins are connected to the
IOR’(I/O read) and IOW’ (I/O write) control signals in the system.
CS’: The Chip-Select (active-low) input is connected to the address decoder in the
system.
PA0-PA7: The Port-A data lines serve as input, output or bidirectional based on the
configuration selected for port A. The lines are connected to the data lines of
peripherals.
PB0-PB7: The Port-B data lines serve as input or output based on the configuration
selected for port B. The lines are connected to the data lines of the peripherals.
https://www.geeksforgeeks.org/8255-microprocessor-operating-modes/
Bit definition of control word for I/O mode:
Control Word for I/O Mode (8255):
➢ The control word is a crucial part of the control register in the 8255
Programmable Peripheral Interface (PPI).
➢ It specifies an I/O function for each port within the 8255 chip.
➢ The most significant bit (MSB) of the control word (bit D7)
determines the operating mode:
■ If D7 is 1, the 8255 operates in I/O mode.
■ If D7 is 0, it operates in Bit Set/Reset (BSR) mode1.
#Problem solution.
1. Port A : as Input
Port C(Upper) : as Input
Port B : as Output
Port C(Lower) : as Output
2. Port A : as Input
Port C(Upper) : handshake
Port B : as Output
Port C(Lower) : handshake
D7 D6 D5 D4 D3 D2 D1
1 0 1 1 0 1 0
Ans: B4H
3. Construct Control Word to Configure port A & upper port C to input, port B
and lower port C to output port in mode 0.
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Lab Report: 1
Describe the characteristics and functionalities of different types of input and output
devices commonly used in computer systems. Discuss the importance of selecting
appropriate I/O devices based on the requirements of a given application.