Unit 3 8251a Usart
Unit 3 8251a Usart
Data Communications
Data communications refers to the ability of one computer
to exchange data with another computer or a peripheral
Standard data communication interfaces and standards are
needed
Centronic’s parallel printer interface
RS-232 defines a serial communications standard
8251 USART (Universal Synchronous/Asynchronous
Receiver/Transmitter) is the key component for converting
parallel data to serial form and vice versa
Two types of serial data communications are widely used
◦ Asynchronous communications
◦ Synchronous communications
Parallel/Serial Transmissions
Communication Modes
When data is transmitted between two piece of
equipment, 3 modes of communication are used
Simplex
Data is transmitted in one direction only
Half Duplex
This is used when to devices wants information alternatively,
but one after another
Full Duplex
This is used when data is to be exchanged between two
devices in both directions simultaneously
Communication Modes
Transmission Modes
For Receiving device to interpret bit pattern correctly, it
must able to determine the following
Bit Synchronization
Start of each bit cell period
Character Synchronization
Start and end of each character or byte
Frame Synchronization
Start and end of each complete message block(frame)
Types Synchronization
Asynchronous Transmission
Synchronous Transmission
Asynchronous Transmission
In Asynchronous Transmission receiver clock runs(RxC)
in unsynchronized with respect to the incoming
signal(RxD)
Additional start and stop bits are added in
character(byte) data
State of signal on transmission line between characters
is idle
Asynchronous communications
• In asynchronous communications, the data, such as
ASCII characters, are packed between a start bit and a
stop bit, a process called framing.
ASCII character "A", binary 0100 0001, framed between the start bit and 2 stop bits.
Transmitter Buffer
Input Register
RxD
Receive Buffer
RxRDY
Receive control
RxC
When RxD goes low, the control logic assumes it is a start bit, waits
for half bit time, and samples the line again. If the line is still low, the
input register accepts the following data, and loads it into buffer
register at the rate determined by the receiver clock.
RxRDY - Receiver Ready Output: Output signal, goes high when the
USART has a character in the buffer register & is ready to transfer it
to the MPU.
RxD - Receive Data Input : Bits are received serially on this line &
converted into a parallel byte in the receiver input register.
RxC - Receiver Clock Input : Clock signal that controls the rate at
which bits are received by the USART.
Control Register
Data register
Used as an input and output port when the C/D is low
CS C/D WR RD Operation
0 0 1 0 MPU reads data from data buffer
0 0 0 1 MPU writes data from data buffer
0 1 0 1 MPU writes a word to control register
0 1 1 0 MPU reads a word from status register
1 Chip is not selected for any operation
Interfacing 8251 to 8088
8251 Communication Interface
Initializing 8251
Initializing 8251
Read Write
start start
No No
Is it logic 1? Is it logic 1?
Yes Yes
Read data register* Write data register*
end end
* This clears RxRDY * This clears TxRDY
8251 A Serial Communication Interface
CHKRX:IN AL,81h
ROR AL,1 Receive Ready?
ROR AL,1
JNC CHKRX
IN AL,80h
If Ready get data
NOT AL
MOV BL,AL
CHKTX:IN AL,81h
ROR AL,1
JNC CHKTX Send data if the T buffer register is available
OUT 80h,AL
JMP CHKRX
Thank You