beautypg.com

1 serial port control 0 register (scon0; 98h), Mode 2, Mode 3 – Maxim Integrated High-Speed Microcontroller User Manual

Page 138: Erial, Nitialization, Table 12-a. serial i/o modes

background image

High-Speed Microcontroller User’s Guide

Rev: 062210

138 of 176

12.2.1

Serial Port Control 0 Register (SCON0; 98h)

This is the standard 80C32 serial port. The new serial port is designated Serial Port 1 and is documented
below.

SCON0

.7: Serial Port 0 Mode Bit 0 or Framing Error Flag (SM0/FE_0).

PCON

.6 (SMOD0)

determines whether this bit functions as SM0 or FE. The operation of SM0 (SMOD0 = 0) is described in
the table below. When SMOD0 = 1, the serial port will set FE to indicate an invalid stop bit. When used
as FE, this bit must be cleared in software.

SCON0

.6: Serial Port 0 Mode Select 1 (SM1_0). The operation of SM1 is described in the table below.

SCON0

.5: Multiple MCU Communication (SM2_0). Setting this bit to 1 enables multiprocessor

communication in Modes 2 or 3. If the ninth bit is 0, the RI_0 will not be set. In Mode 1, setting the
SM2_0 bit to a one causes the RI_0 bit not to be set if a valid stop bit is not received. In the high-speed
microcontroller, SM2_0 also has a new function. In mode 0, the SM2_0 bit controls whether the serial
port clock runs at a divide-by-4 or a divide-by-12 of the oscillator when not in PMM. When set to a logic
0, the serial port runs at a divide-by-12. When set to a logic one, the serial port runs at a divide-by-4. This
results in much faster synchronous serial communication.

SCON0

.4: Receiver Enable (REN_0). When set to a 1, the receive shift register will be enabled.

SCON0

.3: 9th Transmission Bit State (TB8_0). Set/clear to define the state of the ninth transmission

data bit in modes 2 and 3.

SCON0

.2: 9th Received Bit State (RB8_0). Indicates the state of an incoming ninth bit when in modes 2

and 3. In mode 1, when SM2 = 0, RB8_0 is the state of the stop bit received. RB8_0 is not used in mode
0.

SCON0

.1: Transmitter Interrupt Flag (TI_0). Flag that indicates the transmitted word has been

completely shifted out. In mode 0, TI_0 is set at the end of the eighth data bit. In all other modes, this bit
is set at the end of the last data bit. It must be cleared manually by software.

SCON0

.0: Receiver Interrupt Flag (RI_0). Flag that indicates a serial word has been received. In mode

0, RI_0 is set at the end of the 8th bit. In mode 1, it is set after the last sample of the incoming stop bit
subject to the state of SM2_0. In modes 2 and 3, RI_0 is set after the last sample of RB8_0. It must be
cleared manually by software.

SM0/FE_0

SM1_0

MODE

FUNCTION

LENGTH

(BITS)

PERIOD

0 0 0 Sync 8

4/12

t

CLK

(see SM2)

0

1

1

Asynch

10

Timer 1 or 2

1 0 2 Asynch 11 64/32

t

CLK

1

1

3

Asynch

11

Timer 1 or 2

Initialization: SCON is set to 00h on a reset.
Read/Write Access: Unrestricted