Mitsubishi Motors DS5000TK User Manual

Page 112

Advertising
background image

USER’S GUIDE

050396 111/173

112

SCON.2:

RB8

“Rcv. Bit 8”:

Indicates the state of the 9th data bit received while in Mode 2 or 3 operation.
If Mode 1 is selected with SM2=0, RB8 is the state of the stop bit which was
received. RB8 is not used in Mode 0.

Initialization:

Cleared to a 0 on any type of reset.

SCON.1: TI

“Xmit Interrupt”:

Status bit used to signal that a word has been completely shifted out in Mode
0; it is set at the end of the 8th data bit. Set when the stop bit is transmitted.

Initialization:

Cleared to a 0 on any type of reset.

SCON.0: RI

“Receive Interrupt”:

Status bit used to signal that a serial data word has been received and
loaded into the receive buffer register. In Mode 0, it is set at the end of the 8th
bit time. It is set at the mid–bit time of the incoming stop bit in all other modes
of a valid received word according to the state of SM2.

Initialization:

Cleared to a 0 on any type of reset.

BAUD RATE GENERATION

As shown in Table 14–1, the baud rate clock source for
the serial I/O is determined by the selection of the oper-
ating mode.

In Modes 0 and 2, the baud rate is divided down from the
clock oscillator frequency by a fixed value. In Mode 0,
the baud rate is 1/12 of the clock oscillator frequency, or:

Mode 0 Baud Rate

+

1

12t

CLK

In Mode 2, the baud rate is either 1/32 or 1/64 of the
clock oscillator frequency. This selection is dependent
on the state of the SMOD bit (PCON.7). If SMOD=0, the
baud rate will be 1/64 the clock oscillator frequency. If
SMOD=1, the baud rate is 1/32 the clock oscillator fre-
quency. This can also be given as:

Mode 2 Baud Rate

+

2

SMOD

64

X

1

t

CLK

Note that 2

SMOD

means two to the power of SMOD.

2

0

=1, 2

1

=2

The baud rates in Modes 1 and 3 are variable because
they are a function of the Timer 1 overflow signal and the
value of the SMOD bit. A general equation which de-
scribes the baud rate frequency can be given as:

Mode 1, 3 Baud Rate

+

2

SMOD

32

X

1

t

T1

where, t

T1

is the overflow period of Timer 1. In this ap-

plication Timer 1 can be configured in either the timer or
the counter configuration. If the counter configuration is
selected, then the baud rate frequency will be divided
down from an external clock source applied to the P3.3
(INT1) pin. As a general guideline, the GATE bit for Tim-
er 1 should be 0 if the counter function is selected in this
situation so that a continuous clock source will be avail-
able for the baud generator.

Advertising
This manual is related to the following products: