Mode 2, Mode 1 or 3 – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual

Page 126

Advertising
background image

High-Speed Microcontroller User’s

Guide: Network Microcontroller

Supplement

126

Mode 2

In this asynchronous mode, baud rates are always derived from the oscillator input. Table 12-4 summarizes baud-rate generation as a

function of the external oscillator frequency. This mode works identically to the original 8051 family.

The default case is divide-by-64. The user can effectively double the serial port clock frequency by setting the SMOD bit to a logic 1

for the associated UART. For serial port 0, the SMOD_0 bit is PCON.7. This is the original location in the 8051 family. For serial port 1,

the SMOD_1 bit is WDCON.7. For serial port 2, the SMOD_2 bit is T3CM.4. When operating in the power-management mode (CD1:0 =

11b), the serial port clock frequency is the oscillator frequency divided by 16384 when the SMOD bit is a logic 0 and twice that fre-

quency (OSC / 8192) when the SMOD doubler bit is a logic 1. SMOD bits default to a logic 0 on all resets.

Table 12-4. Baud-Rate Generation, Mode 2

Mode 1 or 3

These asynchronous modes are commonly used for communication with PCs, modems, and other similar interfaces. The baud rates

and bit timing are generated using timer 1, timer 2, or timer 3. The respective timer is placed in autoreload mode. When the timer reach-

es its rollover condition (timer 2: FFFFh, or timer 1, timer 3: FFh), a clock is sent to the baud-rate circuit. The baud-rate circuit gener-

ates the exact baud rate by further dividing the clock by 16 or 32 (depending upon the UART baud-rate doubler bit).

For serial port 0, either timer 1 or 2 can be used to generate baud rates. For serial port 1, only timer 1 can be used as the baud-rate

generator. For serial port 2, only timer 3 can be used as the baud-rate generator.

MODE 2

SERIAL PORT CLOCK FREQUENCY

OSCILLATOR CYCLES PER

MACHINE CYCLE

PMR REGISTER BITS

4X/2X, CD1, CD0

SMOD = 0

SMOD = 1

1 (4x mode)

100

OSC / 64

OSC / 32

2 (2x mode)

000

OSC / 64

OSC / 32

4 (default)

X01, X10

OSC / 64

OSC / 32

1024 (PMM)

X11

OSC / 16384

OSC / 8192

DS80C400

High-Speed Microcontroller User's Guide

1

This change is due to the addition of the third serial port (serial port 2)

DIVIDE-

BY-2

OSC/2 =

CRYSTAL/2

1

0

DIVIDE-

BY-2

SMOD_0 = PCON.7

or

SMOD_1 = WDCON.7

or

SMOD_2 = T3CM.4

1

OSC/2 =

CRYSTAL/2

1

0

SMOD_0 = PCON.7

or

SMOD_1 = WDCON.7

Figure 12-2. Serial Port Mode 2 Block Diagram Change

Maxim Integrated

Advertising