Professional Documents
Culture Documents
Interface Circuits
Interface Circuits
• One side of the interface consists of bus signals for address, data and control
signals. The other side consists of the data path with its associated control (to
transfer the data between the interface and I/O Device).This side is called a port.
• When a key is pressed, the valid control signal changes from 0 to 1, the
data is read from the bus and store it in the DATAIN register of the
interface and make the SIN flag value as 1.
• The slave which is the keyboard responds by sending a Slave Ready signal
whenever data is available and will place relevant data on the data bus.
• SIN value will be cleared to 0 when the CPU reads the data from the
DATAIN register.
• The following figure shows an parallel port for output interface used to
connect a printer to the computer.
• Valid and Idle are handshake signals used between printer and the interface
circuitry. When printer is ready to accept a character it will activate the idle
signal.
• Now the interface circuit places data from the DATAOUT register to the
data bus and activate the valid signal.
• In response printer starts printing the character and deactivate the Idle
signal. When the 1 to 0 transition of idle signal is detected at the interface it
sets the valid signal to zero.
• The SOUT flag is set to 1 if the printer is ready to accept a new character
and it is cleared to 0 when the data is loaded in the DATAOUT register by
the processor.
SERIAL PORT
• The block diagram of a typical serial interface is shown in the next slide.
• It includes DATAIN and DATAOUT registers.
• The input shift register accepts data serially from the I/O device. When all
the 8-bits are received the data is loaded in parallel into the DATAIN
register.
• Similarly in output operation, processor loads the data into DATAOUT
register in parallel. From the DATAOUT register bits are shifted out in
serial manner to the output device.
• SIN flag is set to 1 when new data is loaded in DATAIN, to indicate the
processor that data can be read from the device. It is cleared when the data
is read by the CPU.
• SOUT flag indicates whether the output buffer is available. It will be
cleared to 0 when processor loads data into DATAOUT register. It will be
set to 1 after the contents of DATAOUT register are transferred to output
shift register.