8155 I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer
8155 I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer
Devices
2 Port
8155
I/O +
Timer
8253/54
Timer
8259
Interrupt
controller
6 mode
timer
8237
DMA
controller
(A,B),
No
Bidirection
al
HS mode
2 Port (A,B)
8255(C)
4 mode
A is
I/O timer Bidirectional
HS mode (C)
Extra controls
8251
Serial I/O
USART
controller
Outline
Parallel Vs Serial Communication
Characteristics of serial
communication
Synchronous/A-synchronous,
Simplex/Duplex, Baud rate and Error
Correction
Serial
Transmissio
n
Cheaper
Slower
Parallel
Parallel
Faster
Data skew
Limited to small distances
Synchronou
s
Serial
ASynchronou
s
Serial Communication:
How ?
Two basic modes of data transmission
Parallel to
Serial to
serial
parallel
Conversion
Conversion
1
1
1
1
0
0
0 10010011 0 Receiv
Sender
1
1 er
0
0
0
0
1
1
Serial
Transmission
1
1
0
0
Sender
1
0
0
1
Parallel
Transmission
1
1
0
0 Receiv
1 er
0
0
1
Type of Serial
Communication
Synchronous
Sender and receiver must synchronize
Done in hardware using phase locked loops
(PLLs)
Asynchronous
Each byte is encoded for transmission
Start and stop bits
Sender
Data
Data
Data
Receiver
Asynchronous transmission
CL
K
Sender
Data
Data
Data
Data
Data
Synchronous transmission
Receiver
Framing in
Asynchronous
Character oriented
Each character carried start bit and
stop bits
When No data are being transmitted
Receiver stay at logic 1 called mark, logic
0 is Space
Framing:
Transmission begins with one start bit
(low/0)
Followed by DATA (8bit) and
Source data
1
1
LSB
0
1
0
MSB
Start
Bit
Time
8 bit Data
Start
Bits
Duplex
Data flow in both direction
Half Duplex (Transmission goes on way
at a time)
Full Duplex (Both ways simultaneously)
Rate of transmission
Rate at which bits are transmitted
(BAUD)
Number of signal changes per
second
Bit time: how long the Bit stay On or
Of
Printer, Terminal Baud Adjustable
(50-9600)
1200Baud means: Bit stay for
1/1200=0.83ms
Error Check
Parity Check
Even parity: When odd numbers of 1 make D7=1
Send Even number of 1
Check Sum
Used for block of data
Sum of all Bytes without carry and 2s complements
Total Sum Result should be Zero
Steps to be followed :
Transmitting
Inform RX the start bit, end bits and parity
check
Convert parallel word into stream of bits
Create a transmit word by adding start,
end and proper parity bit .
Transmit one bit at a time with appropriate
time delay using one data line
Time delay is determined by the speed of
transmission
Steps to be followed :
Receiving
Recognize bit of transmission
Receive serial bits, one bit at a time
Dismantle the start bits, end bit,
parity bit, Data bits
Check the error and recognize the
end of transmission
Convert serial data bit in to parallel
word
Serial Transmission in
Software
8
0
8
5
D
D
7
D
6
D
5
D
4
D
3
D
2
D
1
0
Decode
WRb
CS
b
Output
Port
Serial Reception in
Software
8
0
8
5
D
D
7
D
6
D
5
D
4
D
3
D
2
D
1
0
DRb
Decode
Input
Port
CS
b
Is it
bit
Start?
Is bit
Still
low ?
SDE (0/1
Dis/Ena SOD)
For interrupts
UART/USART
Writing a program compatible with all
diferent serial communication protocols is
difficult and it is an inefficient use of
microprocessor.
UART: Universal Asynchronous
Receiver/Transmitter chip.
USART: Universal
Synchronous/Asynchronous
Receiver/Transmitter chip.
The microprocessor sends/receives the
data to the UART in parallel, while with I/O,
the UART transmits/receive data serially.
8251 functions are integrated into
CPU
status
(8 bit)
xmit/
8251
rcv
data
(8 bit)
serial
port
UART/USART
8251 USART
8250/16450 UART is a newer version of 8251.
16550 is the latest version UART.
Thanks