Interfacing Bus
Interfacing Bus
Module 13
3 Interfacing bus, Protocols,
Embedded Systems I/O ISA bus etc.
Version 2 EE IIT, Kharagpur 1 Version 2 EE IIT, Kharagpur 2
Instructional Objectives
USB Power
7.5V/12V/15V LCD/CCD Supply
Supply
Inverter
Wall
Bus, Wires and Ports
Basic Protocols of data transfer
TFT Panel
Controller
1.6in/1.8in
Bus arbitration
Monitor
TFT
TV
Charge
Pump
ISA bus signals and handshaking
Memory mapped I/O and simple I/O
Battery Charger
Parallel I/O and Port Based I/O
Removable Storage
Op Amps
Example of interfacing memory to the ports of 8051
Video
RS232c
Converter
1394
USB
Boost
Alkaline
Pre-Requisite
Remote
Ir Rx
Digital Electronics, Microprocessors
Measurement
Battery Management
Zoom Lens
Position
Li+NiMH
TI Digital Media Processor
13.1 Introduction
Buck Boost
½-MB Flash
Converter
Memory
Fig. 13.1
Buttons
The traditional definition of input-output is the devices those create a medium of interaction with
MCU
the human users. They fall into the following categories such as:
1. Printers
USB Voltage
Battery and
Monitoring
2. Visual Display Units
3. Keyboard
4. Cameras
Converter
1.5-V/1.8-/2.5V Core Supply
32164-MB
SDRAM
Buck
5. Plotters
Status
LCD
6. Scanners
LI-Ion Protector
Battery Monitor
However in Real-Time embedded systems the definition of I/O devices is very different. An
embedded controller needs to communicate with a wide range of devices namely
Generator
1. Analog to Digital (A-D) and Digital to Analog (D-A) Converters
TI AFE
Timing
Drivers
Motors
2. CODECs
Codec Module
Power Amplifier
Low Dropout
3. Small Screen Displays such as TFT, LCD etc
Regulator
Audio
4. Antennas
Audio
5. Cameras
Module
CCD
6. Microphones
V/H
7. Touch Screens
Speed light
Etc.
Motors
Power Management
A typical Embedded system is a Digital Camera as shown in Fig. 13.1. As it can be seen it
Supervisor
possesses broad range of input-output devices such as Lens, Microphone, speakers, Serial
Voltage
Supply
Reset
interface standards, TFT screens etc.
Lens
Version 2 EE IIT, Kharagpur 3
The functionality of an Embedded System can be broadly classified as
Processing rd'/wr
• Transformation of data
enable
• Implemented using processors
Storage addr
• Retention of data
• Implemented using memory
And Communication (also called Interfacing) data
• Transfer of data between processors and memories
tsetup tread
• Implemented using buses
read protocol
Interfacing Fig. 13.2(b)
For write (Fig. 13.2(c))
Interfacing is a way to communicate and transfer information in either way without ending into The CPU must send the memory address
deadlocks. In our context it is a way of effective communication in real time. The write line must be enabled
This involves The processor sends the data over the data lines
– Addressing The processor must wait till the memory is ready
– Arbitration
– Protocols
rd'/wr
Master Slave enable
addr
Control Lines
Address Lines
Data Lines data
tsetup twrite
Fig. 13.2(a) The Bus structure
write protocol
Addressing: The data sent by the master over a specified set of lines which enables just the
device for which it is meant Fig. 13.2(c)
Protocols: The literal meaning of protocol is a set of rules. Here it is a set of formal rules Arbitration: When the same set of address/data/control lines are shared by different units then
describing how to transfer data, especially between two devices. the bus arbitration logic comes into play. Access to a bus is arbitrated by a bus master. Each
A simple example is memory read and write protocol. The set of rules or the protocol is node on a bus has a bus master which requests access to the bus, called a bus request, when then
For read (Fig. 13.2 (b)) node requires to use the bus. This is a global request sent to all nodes on the bus. The node that
The CPU must send the memory address currently has access to the bus responds with either a bus grant or a bus busy signal, which is
The read line must be enabled also globally known to all bus masters. (Fig. 13.3)
The processor must wait till the memory is ready
Then accept the bits in the data lines
Fig. 13.3 The bus arbitration of the DMA, known as direct memory access Data serializing Address/data muxing
controller which is responsible for transferring data between an I/O device and
memory without involving the CPU. It starts with a bus request to the CPU and Fig. 13.4 The Time multiplexing data transfer. The left hand side transmits 16-bits
after it is granted it takes over the address/data and control bus to initiate the data of data in an 8-bit line MSB after the LSB. The transfer is synchronized with the
transfer. After the data transfer is complete it passes the control over to the CPU. req signal. In the example shown on the right hand side the same set of wires carry
address followed by data in synchronism with the req signal. mux: stands for
Before learning more details about each of these concepts a concrete definition of the following multiplexer
terms is necessary.
Wire: It is just a passive physical connection with least resistance The Handshaking Protocol
Bus: A group of signals (such as data, address etc). It may be augmented with buffers latches etc.
A bus has standard specification such as number of bits, the clock speed etc. Strobe Protocol
Port: It is the set of physical wires available so that any device which meets the specified
standard can be directly plugged in. Example is the serial, parallel and USB port of the PC. Master Servant
req
Time multiplexing: This is to Share a single set of wires for multiple pieces of data. It saves wires
at expense of time
data
req 1 3
data 2 4
ack
req 1 3 req 1 4
wait wait 2 3
data
data 2 4 data 5
taccess taccess
1 3 1. Master asserts req to receive data 1. Master asserts req to receive data
req 2. Servant puts data on bus within time taccess 2. Servant can’t put data within taccess, asserts wait ack
4 (wait line is unused) 3. Servant puts data on bus and deasserts wait
2
ack 3. Master receives data and deasserts req 4. Master receives data and deasserts req
4. Servant ready for next request 5. Servant ready for next request
data
Fast-response case Slow-response case
BALE
Buffered Address Latch Enable is used to latch the LA23 to LA17 signals or decodes of these
signals. Addresses are latched on the falling edge of BALE. It is forced high during DMA cycles.
When used with AEN, it indicates a valid microprocessor or DMA address.
CLK
System Clock is a free running clock typically in the 8MHz to 10MHz range, although its exact
frequency is not guaranteed. It is used in some ISA board applications to allow synchronization
with the system microprocessor.
SD15 to SD0
System Data serves as the data bus bits for devices on the ISA bus. SD15 is the most significant
bit. SD0 is the least significant bits. SD7 to SD0 are used for transfer of data with 8-bit devices.
SD15 to SD0 are used for transfer of data with 16-bit devices. 16-bit devices transferring data
Fig. 13.6 The ISA bus with 8-bit devices shall convert the transfer into two 8-bit cycles using SD7 to SD0.
CHRDY
Port A Port B Port C Port A Port B Port C
Fig. 13.7(a) The Handshaking Mode of Data Transfer in ISA bus
Adding parallel I/O to a bus- Extended parallel I/O
The Memory Write bus cycle in ISA bus based I/O processor
13.4 Questions
1. List at least 4 differences between the I/O devices for a Real Time Embedded System
(RTES) and a Desktop PC?
Clock
PA7-PA0 8
PC6 ACKA
/RD
PC4 STBA
PC5 IBFA
/Ready
Fig. Q4 The master
Ans:
ISA Bus
Fig. Q2 The Timing Diagram of memory read from a slower The Industry Standard Architecture (ISA) bus is an open, 8-bit (PC and XT) or 16-bit (AT)
asymmetrical I/O channel with numerous compatible hardware implementations.
3. Enlist the handshaking signals in the ISA bus for dealing with slower I/O devices.
Version 2 EE IIT, Kharagpur 19 Version 2 EE IIT, Kharagpur 20
EISA Bus address each other. All data is entered into system memory before being transferred to another
I/O option. The design facilitates a concise and compact protocol with very high performance.
The Extended Industry Standard Architecture (EISA) bus is an open, 32-bit, asymmetrical I/O
channel with numerous compatible hardware implementations. The system bus and allows data XMI Bus
transfer rates at a bandwidth of up to 33 MB per second, supports a 4 GB address space, 8 DMA
channels, and is backward compatible with the Industry Standard Architecture (ISA) bus. The XMI bus is a 64-bit wide parallel bus that can sustain a 100 MB per second bandwidth in a
single processor configuration. The bandwidth is exclusive of addressing overhead; the XMI bus
PCI Bus can transmit 100 MB per second of data.
The XMI bus implements a "pended protocol" design so that the bus does not stall between
The Peripheral Component Interconnect Local Bus (PCI) is an open, high-performance 32-bit or requests and transmissions of data. Several transactions can be in progress at a given time. Bus
64-bit synchronous bus with multiplexed address and data lines, and numerous compatible cycles not used by the requesting device are available to other devices on the bus. Arbitration
hardware implementations. PCI bus support a PCI frequency of 33 MHz and a transfer rate of and data transfers occur simultaneously, with multiplexed data and address lines. These design
132 MB per second. features are particularly significant when a combination of multiple devices has a wider
bandwidth than the bus itself.
Futurebus+
VME Bus
Futurebus+ is an open bus, designed by the IEEE 896 committee, whose architecture and
interfaces are publicly documented, and that is independent of any underlying architecture. It has Digital UNIX includes a generic VME interface layer that provides customers with a consistent
broad-base, cross-industry support; very high throughput (the maximum rate for 64-bit interface to VME devices across Alpha AXP workstation and server platforms. Currently, VME
bandwidth is 160 MB per second; for the 128-bit bandwidth, 180 MB per second). Futurebus+ adapters are only supported on the TURBOchannel bus. To use the VME interface layer to write
supports a 64-bit address space and a set of control and status registers (CSRs) that provides all VMEbus device drivers, you must have the Digital UNIX TURBOchannel/VME Adapter Driver
the necessary ability to enable or disable features; thus supporting multivendor interoperablity. Version 2.0 software (Software Product Description 48.50.00) and its required processor and/or
hardware configurations (Software Support Addendum 48.50.00-A).
SCSI Bus
The Small Computer Systems Interface (SCSI) bus is an ANSI standard for the interconnection
of computers with each other and with disks, floppies, tapes, printers, optical disks, and scanners.
The SCSI standard includes all the mechanical, electrical, and
Data transfer rates are individually negotiated with each device attached to a given SCSI bus. For
example, a 4 MB per second device and a 10 MB per second device may share a fast narrow bus.
When the 4 MB per second device is using the bus, the transfer rate is 4 MB per second. When
the 10 MB per second device is using the bus, the transfer rate is 10 MB per second. However,
when faster devices are placed on a slower bus, their transfer rate is reduced to allow for proper
operation in that slower environment.
Note that the speed of the SCSI bus is a function of cable length, with slow, single-ended SCSI
buses supporting a maximum cable length of 6 meters, and fast, single-ended SCSI buses
supporting a maximum cable length of 3 meters.
TURBOchannel Bus
The TURBOchannel bus is a synchronous, 32-bit, asymmetrical I/O channel that can be operated
at any fixed frequency in the range 12.5 MHz to 25 MHz. It is also an open bus, developed by
Digital, whose architecture and interfaces are publicly documented.
At 12.5 MHz, the peak data rate is 50 MB per second. At 25 MHz, the peak data rate is 100 MB
per second.
The TURBOchannel is asymmetrical in that the base system processor and system memory are
defined separately from the TURBOchannel architecture. The I/O operations do not directly