Baud rate selection (mode 0), Asynchronous modes (modes 1, 2 and 3), Mode 1 – Rainbow Electronics AT89C5122 User Manual

Page 131: Ee section “baud rate selection (mode 0)”)

Advertising
background image

131

AT8xC5122/23

4202E–SCR–06/06

Baud Rate Selection (Mode 0)

In mode 0, baud rate can be either fixed or variable.

As shown in Figure 73, the selection is done using M0SRC bit in BDRCON register.

Figure 74 gives the baud rate calculation formulas for each baud rate source.

Figure 73. Baud Rate Source Selection (Mode 0)

Figure 74. Baud Rate Formulas (Mode 0)

Asynchronous Modes
(Modes 1, 2 and 3)

The Serial Port has one 8-bit and two 9-bit asynchronous modes of operation. Figure 75
shows the Serial Port block diagram in such asynchronous modes.

Figure 75. Serial I/O Port Block Diagram (Modes 1, 2 and 3)

Mode 1

Mode 1 is a full-duplex, asynchronous mode. The data frame (see Figure 76) consists of
10 bits: one start, eight data bits and one stop bit. Serial data is transmitted on the TXD
pin and received on the RXD pin. When a data is received, the stop bit is read in the
RB8 bit in SCON register.

0

1

M0SRC

BDRCON.0

CK_

SI

/ 6

To Serial Port

IBRG

CLOCK

Baud_Rate

=

6

(1-SPD)

32

(256 -BRL)

2

SMOD1

F

CK_SI

BRL = 256

-

6

(1-SPD)

32

Baud_Rate

2

SMOD1

F

CK_SI

a. Fixed Formula

b. Variable Formula

Baud_Rate =

6

F

CK_SI

TB8

SCON.3

IBRG

CLOCK

RXD

TXD

SBUF Tx SR

Rx SR

SM1

SCON.6

SM0

SCON.7

Mode Decoder

M3 M2 M1 M0

RI

SCON.0

TI

SCON.1

Mode & Clock

Controller

SBUF Rx

RB8

SCON.2

SM2

SCON.4

T1

CLOCK

CK_

SI

Advertising