Professional Documents
Culture Documents
TASK
1). Draw the timing diagram for a bus protocol that is handshaked,
nonaddressed, and transfers 8 bits of data over a 4-bit data bus.
2). List the three main transmission mediums described in the module. Give
two common applications for each.
3). Show how to extend the number of ports on a 4-port 8051 to 8 by using
extended parallel I/O. (a) Using block diagrams for the 8051 and the
extended parallel I/O device, draw and label all interconnections and I/O
ports. Clearly indicate the names and widths of all connections. (b) Give C
code for a function that could be used to write to the extended ports.
SOLUTIONS
1).
2).
Serial communication uses a single wire capable of sending only one bit of
data at a time. I2C actually has two wires with one wire used for control
purposes. Another common serial protocol is the Universal Serial Bus, or
USB.
3).
(a) Using block diagrams for the 8051 and the extended parallel I/O device, draw
and label all interconnections and I/O ports. Clearly indicate the names and
widths of all connections
(b) Give C code for a function that could be used to write to the extended ports.
P3 = data;
else
P2 = mask | 0x01;
break;
case 1:
P2 = mask | 0x02;
break;
case 2:
P2 = mask | 0x04;
break;
case 3:
P2 = mask | 0x08;
break;
case 4:
P2 = mask | 0x10;
break;
case 5:
P2 = mask | 0x20;
break;
case 6:
P2 = mask | 0x40;
break;
default:
break;