0% found this document useful (0 votes)
481 views24 pages

8251 Usart

8251 block diagram, functional block diagram, baud rate calculator, pin diagram, data transfers, programing structure

Uploaded by

Nava Krishnan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
481 views24 pages

8251 Usart

8251 block diagram, functional block diagram, baud rate calculator, pin diagram, data transfers, programing structure

Uploaded by

Nava Krishnan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

24-Oct-11

1
8251
USART
Hardeep Singh
Lecturer/ECE
SBBSIET, Padhiana
24-Oct-11 1 Hardeep Singh/Lecturer/SBBSIET
Introduction
Two types of data transfer
Parallel data transfer
Serial data transfer
Types of communication
Simplex
Duplex
Half duplex
Full duplex
Serial Transmission Formats
Asynchronous data transfer
Synchronous data transfer
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 2
24-Oct-11
2
Baud Rate
In serial communication the rate at which data
bits are transmitted generates a term baud rate.
Baud rate is defined as bits/second or the changes
in voltage levels/second
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 3
Second
itted BitsTransm
Baud
8085 Serial I/O
Serial communication is useful for data
transfer betweentwopoints
SID Serial input data
This is an active high, serial input port pin, used to
accept serial 1bit dataunder softwarecontrol
WhenaRIM instructionis executedthe SIDpin datais
loadedinD7of accumulator
SOD- Serial output data
This is an active high, serial output port pin, used to
transfer serial 1bit dataunder softwarecontrol
When a SIM instruction is executed the SODpin is set
or reset dependingonD7andD6bitsof accumulator
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 4
24-Oct-11
3
8251 USART
USART Universal Synchronous/Asynchronous
Receiver and Transmitter
It will do the job of sending data out,
accepting data bits, generation/removing
other signals check different conditions etc.
8251 will convert this parallel data into serial
stream and transmit on serial output line
And, vice versa
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 5
8251 Functional Block Diagram
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 6
24-Oct-11
4
The 8251 block diagram contains 5 functional
block
Data bus buffer
Read write control logic
Transmitter section
Receiver section
Modem control
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 7
Data Bus Buffer
It is a tri state bi directional, buffer used to
interface data bus of 8251 to the system data
bus
The directional of data transfer through data
bus buffer is decided by RD and WR
This buffer transfers control word, status
word, data from receiver, depending on signal
given by R/W logic
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 8
24-Oct-11
5
Read/Write Control Logic
This block accepts different control signals
such as RD, WR, C/D, CS, CLK and Reset from
control bus and generate control signals for
device operation
The 8251 is selected when CS=0. When CS=0 it
accepts C/D pin and decides which part to
activate
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 9
8251 contains
a. Two data buffer registers
I. Data buffer for transmitter
II. Data buffer for reciever
b. Two control/status registers
a. Control word register
b. Status register
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 10
24-Oct-11
6
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 11
Transmitter Section
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 12
24-Oct-11
7
Receiver Section
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 13
This section consists of receive buffer and receive control
blocks
Thereceiver sectionacceptsserial dataonRxdpin.
The input register converts the serial data into parallel
form
In asynchronous mode it will check for makingstate first,
thenit checksfor start bit
If start bit is detected then the bits are converted to
parallel formandtransfer toreceiver buffer register
For asynchronous mode 8251 contains false start bit
detectioncircuit
When the data byte is transferred frominput register to
receiver buffer register, thecontrol logicgeneratesasignal
RxRDYto signal CPUabout availabilityof databyteto read
byCPU
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 14
24-Oct-11
8
Modem Control
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 15
For sending the data on long distance
telephone lines are used
The telephone lines are analog in nature so
MODEMs are used to convert digital data to
analog data
Handshake signals of MODEM
DTR Data Terminal ready
DSR Data set ready
RTS Request to send
CTS Clear to send
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 16
24-Oct-11
9
Pin Diagram 8251 USART
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 17
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 18
24-Oct-11
10
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 19
D0 D7: Data bus
These are 8 bit bidirectional data lines connected to
system data bus
The microprocessor uses these lines to send or
receive data from 8251
CS: Chip select
This is a chip select input signal used to select 8251
When CS=0, the 8251 is selected. If CS=1, 8251 is
not selected
CLK: Clock input
The clock frequency must be greater than 30 times
receiver and transmitter frequency
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 20
24-Oct-11
11
RESET: Reset input
This pin is generally connected to reset out of
8085
This pin is used to force 8251 in idle mode i.e
reset condition
WR: Write input
This pin is an input signal used to load information
in 8251
RD: Read input
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 21
C/D: Control/Data
This is an input pin, used to differentiate two sections control and
data section.
When C/D=1, the control section is enabled
And, when C/D-0, the data section in enabled
DSR
DTR
RTS
CTS
TxD
TxC
TxRDY
TxE
RxD
RxC
RxRDY
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 22
24-Oct-11
12
SYNDET/BRKDET: Sync Detect/ Break Detect
Synchronous mode: In it the pin is used as sync detect
There are two possible conditions input and output, which
is programmed through mode word
When SYNDET is used as output it indicates that you are
using 8251 sync detect circuit
Asynchronous mode:
This pin is used to detect break
If programmed stop bits are not available for consecutive
stop bit sequences, the output of pin goes high
If RxDremains LOW for stop bits, it represents problem in
line connected between transmitter and reciever
The status of this pin is also available in status word
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 23
8251 Control Word
8251 contains 16 bit control register divided
into two sections of 8 bits each
Mode control word
Command word register
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 24
24-Oct-11
13
8251 Control Word:
Asynchronous Mode
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 25
Mode Word Format (Asynchronous Mode)
D1D0=00 / Synchronous mode,
D1 D0 =/ 00 /Asynchronous mode
D2 and D3 defines the length of character
D5 and D4 defines parity bit
D7 and D6 defines the number of stop bits
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 26
24-Oct-11
14
Mode Word Format
The mode word format of synchronous mode
D1 D0 =00, specifies synchronous mode
The function of bits D2 to D5 are same as
synchronous mode
D7=1 it is single sync character. If D7=0 it is
double sync character
D6 defines whether SYNDET pin is used as
input or output
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 27
8251 Control Word:
Synchronous Mode
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 28
24-Oct-11
15
Command Word Format
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 29
Command Word Format
After mode word, a command word is
programmed to control actual operation
D0 and D1 are used to enable transmitter and
receiver
D1 and D5 are used to set status of MODEM
control signals, DTR and RTS.
D3 is used to send the break character
D3 is low it will force TxDline LOW
D4 is used to reset all error flags
D6 is used to perform internal reset operation
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 30
24-Oct-11
16
D7 is only used for synchronous mode
If D7=1 the receiver will enter the hunt mode
If internal SYNDET circuit is used the receiver
buffer contents are compared, after each bit
received with the programmed sync characters, till
match occurs.
When sync character match occurs, 8251 will
come out of hunt mode and starts to assemble
data bytes
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 31
8251 Status Word
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 32
24-Oct-11
17
The status register bits DSR, SYNDET, TxE,
RxRDYgives status of respective pins on 8251
TxRDYbit in status register is set if transmit
buffer is empty
Parity error
Overrun error
Framing error
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 33
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 34
8251 Data Transfer Operations
24-Oct-11
18
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 35
Asynchronous Mode Transmission
Asynchronous Mode Reciever
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 36
24-Oct-11
19
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 37
Synchronous Mode Transmission
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 38
24-Oct-11
20
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 39
Synchronous Mode Reception
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 40
24-Oct-11
21
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 41
8251 Interfacing in I/O mapped I/O
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 42
24-Oct-11
22
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 43
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 44
24-Oct-11
23
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 45
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 46
24-Oct-11
24
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 47
24-Oct-11 Hardeep Singh/Lecturer/SBBSIET 48

You might also like