USER'S GUIDE

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

12tCLK

 

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 + 2SMOD X 1

64 tCLK

Note that 2SMOD means two to the power of SMOD. 20=1, 21=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 + 2SMOD X 1

32 tT1

where, tT1 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.

050396 111/173

112

Page 112
Image 112
Mitsubishi DS907x SIP, DS5000TK manual SCON.2 RB8, SCON.1, SCON.0, Baud Rate Generation