You are on page 1of 49

CHAPTER -6

I/O INTERFACES
An interface concept that refers to a point of
interaction between components, and is
applicable at the level of
both hardware and software. This allows a
component, whether a piece of hardware such as
a graphics card or a piece of software such as
an Internet browser.

Main two categories :-


a). Parallel interface.
b). Serial interface.
Also known as microprocessor controlled
techniques as are controlled by microprocessor.
The data is transferred from I/O devices to the
microprocessor or to the memory via
microprocessor or vice versa.
Classification :-
1). Parallel data transfer technique.
2). Serial data transfer technique.
3). Synchronous data transfer technique.
4). Asynchronous data transfer technique.
5). Interrupt driven data transfer technique.
In it, the 8-bit of data is transferred at a time.
Eg. Data transfer between computer and printer.

2). Serial data transfer technique


In it one single bit of data is transferred at a time.
Eg. Data transfer between computer and Modem
,mice.

3). Synchronous data transfer technique


In it the speed of the peripheral device and speed of
microprocessor is equal.
In it, the speed of the peripherals is slower than the
speed of the microprocessor.
In it, the microprocessor is I/O bound i.e. 99.99% of
the time is wasted in checking the status of the
peripheral devices.
Eg. PS2 ports on your computer use
asynchronous serial communication with
the keyboardand mouse.

5). Interrupt driven data transfer technique


That uses interrupts to communicate.
Universal Serial Bus (USB) is an industry
standard developed in the mid-1990s that defines
the cables, connectors and communications
protocols used in a bus for connection,
communication and power supply
between computers and electronic devices.
 Prereleases
 The USB standard evolved through several versions
before its official release in 1996:
 USB 0.7: Released in November 1994.
 USB 0.8: Released in December 1994.
 USB 0.9: Released in April 1995.
 USB 0.99: Released in August 1995.
 USB 1.0 Release Candidate: Released in November
1995.
 Released in January 1996.
 Data rates of 1.5 Mbit/s (Low-Bandwidth).
 12 Mbit/s (Full-Bandwidth).

2). USB 2
 Now called "Hi-Speed“.
 Released in April 2000.
 Higher maximum signaling rate
of 480 Mbit/s (effective throughput up to
35 MB/s).
 Released in November 2008.
 Known as super speed.
 maximum transmission speed of up to 5 Gbit/s
(625 MB/s).
 USB 3.0 reduces the time required for data
transmission.
 USB 3.0 reduces power consumption.
 backward compatible with USB 2.0.
 It is a high speed bus.
 It allows interfacing several devices to a single
port in a daisy chain fashion (127 devices).
 USB cable contains 4 wires :- 2 for power supply
and 2 for data sending.
USB 3.0 has 8 wires (4 more for signaling).
 It operates in two modes :-
 Low speed mode
 High speed mode
 It has 4 pins.
USB 3.0 has 9 pins.
The four types of transfers are :-
 Control transfer.
 Bulk transfer.
 Interrupt transfer.
 Isochronous transfer.

1). Control transfer :- It enables the host to read


information about a device ,set a device’s address
and select configurations and other settings.
It can have 3 stages :-
a). Setup stage :- is where the request is sent.
It consists of 3 packets :–
 Token packet – It contains the address of the
device.
 Data packet – contains data.
 Handshake packet – for acknowledging
successful receipt or to indicate error.

b). Data stage :- It consists of one or multiple IN


or OUT transfers. It indicates the amount of data
to be transmitted. If it exceeds the maximum
packet size, data will be sent in multiple
transfers.
I. IN :- When a host is ready to receive data , it
issues an IN token.
II. OUT :- When the host needs to send any data, it
issues an OUT token.

c). Status stage :- It reports the status of the overall


request and this varies according to the direction
of transfer.

2). Interrupt transfer :- Interrupts send between the


host and the device for the data transmission
and retrieval.
3). Isochronous transfer :- It occurs continuously
and periodically. They contain sensitive data like
audio or video stream.
 If there is some delay in an audio/video stream ,
then we’ll receive audio with glitches.
 It guarantees delivery time but no error correcting.
 It doesn’t re-transmit data with errors i.e. errors
can be accepted in some cases.

4). Block transfer :- It can be used for burst data.


 Provides error detection and correction.
 Faster.
 For high speed devices – max. packet size is upto
512 bytes.
USB HOST  USB DEVICE
 Detect devices :- It detects the attachment or
removal of the devices.
 Manage data flow :- It manages the flow of
control information between the host and the
USB device. It also manages the flow of data
between the host and the USB device.
 Error checking :- It adds error checking bits to
the data it sends. When a device receives the
data ,it performs the calculations on the data
and compares the results with the received
error-checking bits.
If it doesn’t match than the device doesn’t
acknowledge receiving the data and host knows
that it should be retransmitted.
 Provide Power :- In addition to its 2 signal wires,
USB has one +5V and a ground wire , too.
The host provides the power to all devices and
works with the devices to conserve power.
 Exchange data with peripherals

Peripheral’s Duties

 Respond to requests
 Error check
 Manage power
 Exchange data with the host
TYPE A TYPE B
 Ease of use
 Versatility
 Automatic configuration
 Hot pluggable /swappable
 Lesser IRQs for different hardwares
 High speed
 Reliability :- lesser noise and errors
 Low cost
 Low power consumption
It is a serial bus interface standard for high-speed
communications.

Features :-

 IEEE-1394 connects a number of serial device in


daisy chain fashion (upto 63 devices).
 It has 4 wires :- 2 for power supply and 2 for
sending data.
 Other name :- Firewire by Apple
i.LINK by Sony.
 It provides speeds of 800, 1600 and 3200 Mbps.
 Number of pins :- 4, 6, 9.
 Versions of IEEE 1394 :-

a). IEEE 1394a (Firewire 400)


 100,200 and 400Mbps.
 6 pin connector (2 for power and 2 pairs of data
sending).

b). IEEE 1394b (Firewire 800)


 800Mbps.
 9 pin connector.
9-pin Firewire 800 4-pin and 6-pin
Firewire 400
a). A 10-bit Bus ID that is used to determine which
Firewire bus the data came from.
b). A 6-bit physical ID that identifies to which device
on the bus sent the data.
c). A 48-bit storage area that is capable of adding
256 terabytes of information for each node.
A serial port if not working properly will might have
some problem due to:-
 Fault in its cable.
 Port has been disabled in CMOS.

For overcoming these faults ,we should:-


 Start checking for the number of serial ports.
It is to check that whether we are not adding too
many serial ports that they will start conflicting.
 It is recommended to disable or remove any
unused or conflicting COM serial port.

TESTING SERIAL PORTS

Testing of serial ports can be done in two ways :-

a). Software testing


b). Hardware and Software testing.
In it , various softwares are been used to test or
diagnose the faults in serial ports.

1). Microsoft Diagnostics (MSD) :- It is a software


provided by MS-DOS . MSD runs in a DOS-only
environment. If in MSD environment, we choose
option for serial port, then it will provide
information of the serial ports in use.
2). Windows 9x Diagnostics :- This is the testing
software for Windows.

Go to Control panel ,
Device Manager – Ports(COM & LPT).

It tells you that the serial port is working properly


or not.
3). Third party software :- Some popular software
such as CheckIt, AMIDIAC can help to test serial
ports.
It tells :- If the serial are being recognized or not,
Base address and IRQ values assigned to these
ports.
4). Finding a port address with DOS.DEBUG :-
MS-DOS provides us with a utility known as DEBUG.
It determines the I/O address of the serial ports.It
resides in the DOS directory.

C:/DOS/>debug<Enter>
D 40:00:09

A single line will appear such as

0040:0000 F8 03 F8 02 00 00 00 00 78 03
F8 03 is COM1
F8 02 is COM2
If there are 4 serial ports available ,then the output
will be :-
0040:0000 F8 03 F8 02 E8 03 E8 02 78 03

F8 03 – COM1 F8 02 – COM2
E8 03 – COM3 E8 02 – COM4

If there is no serial port available ,then the output


will be :-

0040:0000 00 00 00 00 00 00 00 00 78 03
1). Breakout Test :- It is to recognize whether the
cable for connecting serial devices is right or not.
It is a box that is to attached between the devices
we want to test. It has sockets for cable
connections, switches ,jumpers to link input and
output pins and LEDs to show the serial signals.
2). Loopback Test :- It is to tell the correct
functioning of serial port and cable as well. It can
be internal or external. Internal testing can be
done by running diagnostic program/The
external testing is more efficient.
In it, a loopback or wrap plug is being used.
Through this plug, the data is sent through the
transmitting pin of the plug and then received by
the receiving pin so that the port is transmitting
and receiving at the same time.
If this plug is used at the end of the cable ,then
with port we can also test the working of the
cable.
 Standard Parallel Port
 PS/2 Parallel port
 Enhanced Parallel port (EPP)
 Extended Capabilities port (ECP)
 Multimode port.

1). Standard Parallel Port :-


 It is a unidirectional port . This mode is also
known as centronics mode.
 Data transfer rates varies b/w 80-300 KBps.
 MS-DOS supports 3 parallel ports (LPT1, LPT2,
LPT3).
 It has 8-bit data register, 4-bit control register
and 5-bit status register.

2). PS/2 Parallel port :-


 With introduction to PS/2 PCs ,IBM introduced
bi-directional parallel ports.
 It provides data transfer rate of 150 KBps in both
the directions.

3). Multimode parallel port :-


 They include configuration options.
4). Enhanced Parallel port (EPP) :-
 Sometimes referred as Fast Mode Parallel port.
 It is usually built in Super I/O chip or South bridge
chip on the motherboard.
Super I/O chip :- It is an IC on motherboard that
interfaces various low-bandwidth devices like
floppy disk, PS/2 ports, parallel/serial ports.
 EPP operates at almost ISA bus speed.
 Data transfer rate can be provided upto 2 MBps.
 Versions of EPP :-
I. EPP 1.7
II. EPP 1.9
 Drawback :- Procedure for enabling EPP differs
from vendor to vendor.
5). Extended Capabilities port (ECP)
 In 1992, Microsoft and Hewlett-Packard
introduced high-speed parallel port i.e. ECP.
 ECP mode requires the use of DMA channel, which
was not there in EPP. This causes conflicts with
other devices that uses DMA.
 ECP ports can be turned into EPP or standard
parallel port through the BIOS setup program.
 A number of diagnostic programs are there to test
parallel ports such as MSD, QAPlus, Norton utility,
etc.

 Loopback connectors
 DOS debug utility
 Parallel ports can also be used to connect SCSI
devices to PC. With a Parallel to SCSI converter ,
we can connect any SCSI device such as hard
disks, CD-ROM drives ,scanners, etc to our PC via
parallel ports.

WORKING
At one end of the converter there is a connection to
the parallel port and at the other end ,there is a
parallel port and a SCSI port.
We can plug in a single SCSI device and still connect
out printer as well.
 ADAPTEC is the major supplier of these
converters.
 It will support only one SCSI, if you want it
more than one than SCSI host adapter card
would be used.

Features :-
 Upto 7 SCSI devices can be used without
affecting parallel device (printer) working.
 Plug n play design.
 No need of external power supply.
 Supports all standard SCSI host adapters.
PS/2 port is one of two styles of connectors :-
 5-pin DIN
 6-pin mini-DIN
These connectors are provided by German
standardization organization (Deutsches Institut
fuer Norm).
Pin1 : Clock
Pin2 : Data
Pin3 : Not used(for general purpose)
Pin4 : Ground
Pin5 : Vcc (+5V)
 6-pin mini-DIN(PS/2)
Pin1 : Data
Pin2 : Not used
Pin3 : Ground
Pin4 : Vcc (+5V)
Pin5 : Clock
Pin6 : Not used
The most popular keyboards are:
 USB keyboard
 IBM keyboard : Also known as AT or PS/2
keyboard.
 ADB keyboard : Apple Desktop Bus.

IBM PC/XT keyboard (1981) :


 83 keys
 5-pin DIN connector
 Uni-directional serial transfer
 84-101 keys
 5-pin DIN connector
 Bi-directional serial transfer
 Not backward compatibility

IBM PS/2 keyboard (1987) :


 84-101 keys
 6-pin mini-DIN connector
 Bi-directional serial transfer
 Compatible with AT systems , but not with XT.
A keyboard spends most of the time in scanning or
monitoring the matrix of keys.
If it finds that any key is being pressed or released
,the keyboard will send a packet of information
known as scan codes.
Two kinds of scan codes :-
1). Make codes : A code sent when a key is pressed.
2). Break codes : A code sent when a key is
released.
Every code is provided with unique make and break
codes.
Combination of make and break codes is known as
scan code set.
There are three standard scan code sets :
1). Scan code set 1: For XT systems.
2). Scan code set 2: Default scan code set for all
modern keyboards.
3). Scan code set 3: Optional PS/2 scan code set.

Note : For most of the keys the scan code is of one


byte and for extended keys (arrows , ctrl,etc) can
have scan codes of 2 or 4 bytes.
KEY MAKE CODE BREAK CODE

A 1C F0, 1C

5 2E F0, 2E

Ctrl E0,14 E0,F0,14


 Typematic : When a key is pressed it is said to be
typematic , which means the keyboard will keep
sending the make code for the key until the key is
released.
 Typematic delay : Consider you have pressed the
key ‘a’ and had hold it for a while, then Typematic
delay is the short delay between the first and
second ‘a’. It can range from 0.25 sec to 1 sec.
 Typematic rate : It tells the number of characters
per second that will be displayed on the screen.

You might also like