Wednesday, September 18, 2013

Input / Output (I/O) Interfacing

I/O interfacing
Input and output interfaces provide a method of transferring information between internal storage (M.P.) and external I/O device. Peripherals connected to a computer need special communication links for interfacing them with CPU. The purpose of the communication link is to resolve the difference that exists between the processor and each peripheral.
The major differencing are:
i) Peripherals are electro mechanical and electromagnetic devices and their manner of operation is different from the operation of CPU and memory, which are electronic devices. Therefore the conversion or signal value may be required.
ii) The data transfer rate of peripherals is usually slower than the transfer rate of CPU, and consequently a synchronization mechanism is needed.
iii) Data codes and format in peripherals are difference from the word format in the CPU and memory.
iv) The operating nodes of peripherals are different from each must be controlled. So as not to disturbed the operation of the other peripherals connected to the CPU.
To resolve these differences computer systems include special h/w. Component between CPU and peripherals to supervise and synchronize and supervise all inputs and outputs transfers. These components are called interface unit because they interface between the processor bus and peripheral devices.
a) Serial Interface
b) Parallel Interface
Serial Interface
It exchanges data with the peripheral in serial mode, where data are transmitted one bit at a time along a simple communication link. Serial transmission is slow but inexpensive to implements far as the no of wire is connected.
Parallel Interface
Some I/O devices can handle data at speed that can’t be supported with serial interface, so such a case a parallel interface must be used, where n bits of data are handled simultaneously by the bus and on the links to the device. This achieves of faster interchange of data but becomes expensive due the need of multiple wires. 
Communication can be broadly defined as on unilateral or bipolar transfer of meaningful data between 2 points through a medium. Communication can be in:-
i) Simplex mode
ii) Half duplex
iii) Full mode
Simplex Mode:
In this mode the transmission of data over a single channel in one direction is allowed. The data can be transmitted from transmitter to receiver but not from the receiver to transmitter.



Half duplex mode:
This mode allows the transmission of data over single channel in both direction but not simultaneously. It is also called one lane two way bridges or two way alternative transmissions.

Full duplex mode:
This mode allows the transmission of data in both directions simultaneously but on two separate channels. Disadvantages of this mode are the additional cost of (2nd) another channel but is fast.



Fig:- Trans receiver devices
a) Serial data transfer
b) Parallel data transfer
Serial data transfer:
In serial data transfer each bit of the word is set in succession, one at a time over a single pair of wires. A parallel to serial conversion is used to convert the incoming parallel data to serial form and then the data is set out with the least significant bit  (LSB) first and (MSB) most significant bit coming last of all.
There are two types of serial transfer. They are:
1) Asynchronous serial data transfer.
2) Synchronous serial data transfer.
Asynchronous serial data transfer:
In this type of transmission, the receiving device doesn’t to be synchronized with the transmitting device. The transmitting device can send one or more data units when it is ready to send. Each data unit must contain a start bit and step bit. Indicating the beginning and end of each data unit, in asynchronous transmission the data message is sent one wood at a time. 
Parallel data transfer:
When a word of n bits us to be transmitted in parallel each bit is transmitted on a separated line along with a common ground line with respect to which the status of each line is measured. Thus a channel comprises of n+1 line. 
                                  Fig: parallel data transfer
Here, the time require to transfer one word is equal to the time taken to transmit a bit parallel data transmitter is impractical over long distances because of prohibitive cost of installing a large no of lines.
Bus Interface Standard
The microcomputer is a bus oriented system where by subsystem or peripheral ae interconnected through the bus architecture. Peripherals and computers are designed and manufactured by various manufactures. Therefore, a common understanding must exist among various manufactures and user groups that can ensure compatibility among different component. When this understanding is defined and generally accepted by users and industries it is known as a standard.
In the field of electronics these standards are generally defined by professional organizations such as-IEEE.
Various bus standards are defined till now but we would be dealing RS-232C and GPIB here.
RS-232C
This interface standard is most widely used standard for serial communication between microcomputers and peripheral devices. The interface defined by a two types of equipment. The 1st is known as DTE (Data Terminal Equipment). While the 2nd is referred as DCE (Data communication / carrier equipment), the DTE is capable of sending or receiving data via a serial interface. The DCE on the other hand is used to facilitate serial data communication.
RS 232C works in a –ve logic. The standard specifies that the “logic 1” level is a voltage between -3V to -15V and the “logic 0” level is a voltage between +3V to +15V. The commonly used voltages are +12V and -12V.
RS 232C also specifies that the DTE connector should be male and the DCE connector should be female. Usually spin and 25 pin connectors available. 
The main problem with RS 232C is that it can only transfer data reliably about 50 feet. At its maximum rate of 20KB/sec. If longer lines are used the transmission rate has to be drastically reduced. For higher rate of transfer and long distance we have another standard defined.
Standard Speed Distance
RS232C 20 kb average 50 feet
RS 422A 10Mb average            40 to 400 feet
RS 485A 100kb average 30 feet
The figure above shows the interfacing RS 232C with DTE and DCE. The signaling in RS 232C is not compatibility with the TTL logic level. For TTL 0V to 0.2V is consider a “logic 0” and 3.4V is 5V as “logic 1”, but RS 232C works in a –ve logic -3V to -15V consider as “logic 1” and +3V to +15V as “logic 0”. Because of this incompatibility of data line with the TTL logic, voltage translators called line drivers and line receivers are required to interface TTL logic with RS 232C signal.
The line driver MC 1488 converts “logic 1” into approx. -9V and “logic 0” into +9V. Before it is line receiver MC 14989 into TTL compatibility logic and peripheral device requires 3 lines. Pin 2, 3.7 terminals transmits on pin 2 and receives as pin 3. On the other hand DCE on pin 3 and receives on pin 2. Pin 7 is ground.
GPIB (General Purpose Instrumentation Bus) / IEEE 488 standard HPIB
This is the most widely used industrial bus format. It was developed to facilitate interface of computers with various instruments such as printer tape recorder DVM frequency counter function. Some of the features of these buses are:-
1. Data transfer among the interconnected device in digital format.
2. Allows 8-bit parallel bidirectional communication.
3. 15 devices may be connected to 1 continuous bus.
4. Total transmission path is limited to 20m. 
5. Data transfer rate in any single line is limited to 1 MB/sec
6. The bus has 24 signals as 8 bidirectional data line.
-8 control line -8 ground line

This standard describes 4 types of devices which may be interface to GPIB.
1) Listeners: These devices can receive data from other devices connected to the bus but are used capable of generating data for eg: printer.
2) Talkers: These devices are only capable of placing data on bus and can not receive data. For e.g. scanner, tape-reader. 
3) Talker and listener: can both send and receive data to or from the bus. For e.g: computer
4) Controller: used to supervise the flow of data on the bus.

No comments:

Post a Comment