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

Peripheral and Interfacing Class Notes

The document discusses a class that will continue on April 28th. Students are asked to complete a report by May 5th. It also defines computer peripherals and describes their importance for expanding capabilities and facilitating user interaction. Interfacing ensures effective communication between computers and external devices. The Intel 8255A is used as an example of a programmable peripheral interface (PPI) chip.

Uploaded by

Ummeed
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)
103 views

Peripheral and Interfacing Class Notes

The document discusses a class that will continue on April 28th. Students are asked to complete a report by May 5th. It also defines computer peripherals and describes their importance for expanding capabilities and facilitating user interaction. Interfacing ensures effective communication between computers and external devices. The Intel 8255A is used as an example of a programmable peripheral interface (PPI) chip.

Uploaded by

Ummeed
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/ 11

[Note: This pdf is important for the 1st TT exam.

I will continue your class on


April 28th. I was busy with some other work; that’s why I was unable to take
any online classes. I will cover all the necessary topics before the main exam.
And as for the lab, I am giving you guys a report-writing work. Try to complete
the reports before May 5. ]

#Definition: Peripheral device, also known as peripheral, computer peripheral, I/O


device, any of various devices used to enter information & instructions. In short, to
communicate with the outside world.
Example: Keyboard, Printer, Joystick, Mouse, Speaker, Scanner, monitor,
Webcams.

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.

2. Improved User Interaction: Devices such as keyboards, mice, and displays


facilitate user-friendly interactions with computers.

3. Increased Connectivity: Peripherals like networking devices enable internet


connectivity and communication with other devices.

4. Customization and Expansion: Users can customize and expand their


computing setups by adding peripherals tailored to specific needs.

5. Efficient Workflow: Peripheral devices contribute to efficient workflows,


enhancing productivity and providing specialized functionalities.
#Definition: Interfacing in computer peripherals refers to the communication and
interaction between a computer and external devices, ensuring seamless data
exchange and functionality. It involves establishing connections and protocols for
effective interaction.

Functions of Input-Output Interface:


1. It is used to synchronize the operating speed of CPU with respect to
input-output devices.
2. It selects the input-output device which is appropriate for the
interpretation of the input-output signal.
3. It is capable of providing signals like control and timing signals.
4. In this data buffering can be possible through a data bus.
5. There are various error detectors.
6. It converts serial data into parallel data and vice-versa.
7. It also converts digital data into analog signals and vice-versa.

Programmable Peripheral Interface (PPI): A Programmable Peripheral Interface


(PPI) refers to an integrated circuit (IC) that allows for the flexible and
programmable interfacing of a microprocessor or microcontroller with external
devices.
PPI types:
1. Intel 8255A
2. Intel 825A-5

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.

PC0-PC7:The Port-C data/control lines serve as input or output based on


configurations selected for Port-A, Port-B, and Port-C. The lines also assist I/O
functions of Port-A and Port-B.
RESET: The Reset input to the 8255A is usually activated by the microprocessor in
the system. When activated, the control register is cleared, the ports are configured
to simple input mode and all the 24 I/O lines float.

The Intel 8255A chip operates in three modes:

1. Mode 0 (Basic Input/Output):


➢ In this mode, the chip functions as a simple I/O port expander.
➢ It provides three 8-bit bidirectional I/O ports (Port A, Port B, and Port
C).
➢ Each port can be individually configured for input or output operation.
2. Mode 1 (Strobed Input/Output):
➢ In Mode 1, the chip operates in a strobed I/O mode.
➢ It offers similar functionality to Mode 0 but includes handshaking
signals.
➢ The strobe signals are used to synchronize data transfers between the
microprocessor and the peripheral devices.
3. Mode 2 (Strobed Bidirectional I/O):
➢ Mode 2 is an extension of Mode 1 with additional features for
bidirectional data transfer.
➢ It supports bidirectional data flow on each port, enabling both input and
output operations simultaneously.
➢ Like Mode 1, it utilizes strobe signals for synchronization, enhancing
data integrity and reliability.

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

Then what is the value of the control word?

Solve: It’s working in I/O mode so working in Mode 0


D7 D6 D5 D4 D3 D2
1 0 0 1 1 0
Ans: 98H

2. Port A : as Input
Port C(Upper) : handshake
Port B : as Output
Port C(Lower) : handshake

Handshake means, working in mode 1

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.

1. Introduction: Define input and output devices in the context of computer


systems. Briefly explain the importance of input and output devices in the
functionality of computer systems.

2. Types of Input Devices: Describe various types of input devices commonly


used in computer systems, such as: Keyboards, Mice and pointing devices,
Scanners, Digital cameras, Microphones, Touchscreens, Joysticks and
gamepads.

Discuss the characteristics and functionalities of each type of input device.


Provide examples of applications or scenarios where each input device is
commonly used. Try to include the images.

3. Types of Output Devices: Explain different types of output devices found in


computer systems, including: Monitors and displays, Printers, Projectors,
Speakers and headphones, Plotters.

Detail the characteristics and functionalities of each type of output device.


Provide examples of situations where each output device is typically utilized.
Try to include the images.

4. Importance of Selecting Appropriate I/O Devices: Discuss the significance


of selecting suitable input and output devices based on the requirements of a
given application or task. Explain how the choice of I/O devices can impact
user experience, productivity, and overall system performance. Provide
examples illustrating the consequences of using inappropriate I/O devices for
specific applications.

5. Conclusion: Summarize the main points discussed in the report. Emphasize


the importance of understanding the characteristics and functionalities of
different input and output devices in optimizing computer system
performance and user experience.

6. References: Include a list of sources consulted during research, such as


textbooks, journal articles, or online resources.

You might also like