Documente Academic
Documente Profesional
Documente Cultură
Sensory input
digital input
analog input
Control output
parallel
serial
Notes:
Like memory components, I/O components have addresses and each I/O
address usually consists of 8 or 16 bits of data. Since many sensory input and
control output signals consist of just one bit of information, a single I/O
address may be able to handle multiple input and output signals. For
instance, dome bits of an 8-bit port can be used to receive input signals while
other bits are used to send output signals. Therefore, sometimes one bit of an
I/O address is called an I/O port and sometimes all bits of one I/O address are
called an I/O port. When someone says how many ports are needed, you
need to find out what his or her definition of port is.
Parallel I/O: data are transferred one byte or one word at a time through
multiple lines.
Notes:
Circuits for parallel data transfer are similar to those circuits described for
sensory input and control output. There are not many variations of parallel
data transfer formats.
There are a lot of variations of serial data transfer in terms of protocol and
physical signal specifications. This subject is too broad to be discussed in this
short course so detailed description of various serial data communication will
be deferred to another course. Only a very brief introduction of serial data
transfer is given here.
The clock rates for sender and receiver may be quite different.
The sender needs to know whether the receiver has received the information.
Types of handshaking
simple output
simple strobe
single handshaking
double handshaking
Notes:
For data transfer between two computers, the sending and receiving speeds
on both ends are often different. Therefore, a mechanism is needed to make
sure that the sender does not send a new byte before the previously sent
byte is received by the receiver. Even when the sender and receiver operate
at the same speed, the sender may still want to know whether the receiver
has indeed received the information. Handshaking provides a mechanism for
addressing this issue. Handshaking usually uses two additional hardware
lines, one is called strobe and the other is called acknowledge. The
sender provides the signal to the strobe line and the receiver provides the
signal to the acknowledge line.
Handshaking can be used in both parallel data transfer and serial data
transfer.
We will study four different data transfer conventions: simple output, simple
strobe, single hand shaking and double handshaking.
Simple strobe
Notes:
Simple output is used when the receiving device is dumb (cannot reply to the
sender). It is assumed that the receiving device can always receive the
information on the data bus. A typical application example is turning lights on
and off. The microprocessor does not generally check to see whether the
lights have been turned on or off in response to the command sent.
Simple strobe is used when the receiving device needs to be notified when
the data is sent. It is assumed that the receiving device can always receive
the information on the data bus. A latch receiving data constitutes an
example of simple strobing.
Single handshaking
Notes:
Single handshaking lets the sender tell the receiver that a new frame
(number of bytes) is ready to be sent and lets the receiver notify the sender
that it has received the information. After handshaking, the sender sends the
frame. Single handshaking lets the sender send out data and the strobe
signal without considering whether the receiver is ready to receive the data.
Strobe is the signal controlled by the sender. Acknowledge is a signal
controlled by the receiver. Data is sent by the sender.
Double handshaking
Notes:
Implementation of handshaking
Hardware implementation
Software implementation
Polling
receiver polls the strobe line
sender polls the acknowledge line
Interrupt
interrupt occurs when the signal level changes
Notes: