Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

UNIT V

INTERFACING
Dr. RM. KUPPAN CHETTY., M.Tech., Ph.D

Disclaimer
Pictures and support materials used are open source information from various
references and online sources. The information in this presentation was compiled
from sources believed to be reliable for informational purposes and non
commercial use only.
CONTENTS

✓ INTERFACE
✓ INTERFACE REQUIREMENTS
✓ BUFFERS
✓ HANDSHAKING
✓ POLLING AND INTERRUPTS
✓ PERIPHERAL INTERFACE ADAPTERS
✓ SERIAL COMMUNICATIONS INTERFACE
✓ EXAMPLES

04-04-2020 HITS-II-BMS-RMKP 2
OUTCOMES
Students are able to
❖ Identify interface requirements and how they can be used
❖ Discuss the role of buffers, handshaking and polling in
interfacing peripherals
❖ Explain the function of peripheral interface adapters
❖ Explain the function of serial interfacing techniques

04-04-2020 HITS-II-BMS-RMKP 3
Interfacing - Interface
• Method of connecting or linking together one device,
especially a computer or micro-controller with another
allowing us to design or adapt the output and input
configurations
• A circuit used between peripherals and Microprocessor or
Microcontroller to have compatibility between two devices.
• The lack could be of signal forms and levels.

Input Interfacing Output Interfacing

04-04-2020 HITS-II-BMS-RMKP 4
Interfacing Requirements
➢ Electrical Buffering / Isolation
- Needed when the peripheral operates at different
voltage/current levels
- Different ground levels
- Buffer is used to isolation and voltage / current amplification
➢ Timing Control
- Needed when data transfer rates of the peripherals and
micro controller are different
- Special lines called as handshaking is used to solve this issue.
➢ Code Conversion
- An LED display require a decoder to convert the BCD output
from a Microprocessor to operate.

04-04-2020 HITS-II-BMS-RMKP 5
Interfacing Requirements (contd.)
➢ Changing the number of lines
- Needed when the peripheral operates at different
voltage/current levels
- Different ground levels
- Buffer is used to isolation and voltage / current amplification
➢ Data transfer
- Serial to Parallel and Vice-Versa
- Special lines called as handshaking is used to solve this issue.
➢ Data Conversion
- Analog to Digital conversion and Vice Versa
04-04-2020 HITS-II-BMS-RMKP 6
BUFFERS
❖ Used to connect two parts of a
system to prevent unwanted
interference between the two
parts
❖ Used to isolate the input from the
output, providing either no voltage
or a voltage that is same as the
input voltage.
❖ purpose of most buffers is to act as a
holding area, enabling the CPU to
manipulate data before transferring it Buffers: (a) no logic change, enabled by 1, (b) no
logic change, enabled by 0, (c) logic change,
to a device enabled by 1, (d) logic change, enabled by 0

❖ Tristate buffers are used when


more peripherals shares the same
data lines of the processor
04-04-2020 7
BUFFERS
Tristate buffer used to connect multiple peripheral devices with
same data bus

04-04-2020 8
Handshaking
➢ Timing control is needed when data
transfer rates of the peripheral and
micro processor are different.
➢ Special lines (handshake lines) are used
for controlling the data transfer.
✓ Use case of peripheral sending
data:
✓ DATA READY from peripheral to
CPU
✓ CPU determines DATA READY signal
is active and read input data
✓ CPU sends INPUT ACKNOWLEDGE
signal
04-04-2020 HITS-II-BMS-RMKP 9
Polling and Interrupts
Polling:
Process of repeatedly checking peripheral device to see if it is
ready to send data or accept new data is a called polling
➢ Ask each device sequentially if it needs service.
➢ No devices may need service during polling
➢ It is a continuous act to figure out whether the device is working
properly

04-04-2020 HITS-II-BMS-RMKP 10
Polling and Interrupts
Interrupts:
➢ An event that indicates the CPU to take immediate action.
➢ When an interrupt occurs, the CPU pauses the task it is currently executing
and executes the corresponding interrupt handler, which is known as
Interrupt Service Routine (ISR).

Interrupt control Central heating system

04-04-2020 HITS-II-BMS-RMKP 11
Polling and Interrupts

04-04-2020 HITS-II-BMS-RMKP 12
Peripheral Interfacing

1. Reading Data from an external device


2. Writing Data to an external device

04-04-2020 HITS-II-BMS-RMKP 13
04-04-2020 HITS-II-BMS-RMKP 14
04-04-2020 HITS-II-BMS-RMKP 15
04-04-2020 HITS-II-BMS-RMKP 16
04-04-2020 HITS-II-BMS-RMKP 17
04-04-2020 HITS-II-BMS-RMKP 18
Interfacing a Stepper Motor with PIA

04-04-2020 HITS-II-BMS-RMKP 19
Serial Interface

04-04-2020 HITS-II-BMS-RMKP 20
Serial Interface

4/4/2020 HITS-II-BMS-RMKP 21
04-04-2020 HITS-II-BMS-RMKP 22
04-04-2020 HITS-II-BMS-RMKP 23
04-04-2020 HITS-II-BMS-RMKP 24
Examples of Interfacing
Interfacing a Seven Segment Display with 8051

04-04-2020 HITS-II-BMS-RMKP 25
Interfacing a Seven Segment Display with 8051

04-04-2020 HITS-II-BMS-RMKP 26
References
• Chapter 20 - W.Bolton, Mechatronics, Electronic Control Systems in Mechanical and
Electrical Engineering, 4th edition.

04-04-2020 HITS-II-BMS-RMKP 27
04-04-2020 HITS-II-BMS-RMKP 28

You might also like