2x and 4x rate modes, Figure 8. 2x and 4x baud rates, Max3107 spi/i – Rainbow Electronics MAX3107 User Manual

Page 18: C uart with 128-word fifos and internal oscillator

Advertising
background image

18 _____________________________________________________________________________________

MAX3107

SPI/I

2

C UART with 128-Word FIFOs

and Internal Oscillator

The integer and fractional divisors are calculated through
the divisor, D:

REF

f

D

16 BaudRate

=

×

where f

REF

is the reference frequency input to the baud-

rate generator and D is the ideal divisor. f

REF

must be

less than 96MHz. In 2x and 4x rate modes, replace the
divisor 16 by 8 or 4, respectively.
The integer divisor portion, DIV, of the divisor, D, is
obtained by truncating D:

DIV = TRUNC(D)

DIV can be a maximum of 16 bits wide and is pro-
grammed into the 2-byte-wide registers DIVMSB and
DIVLSB. The minimum allowed for DIVLSB is 1.
The fractional portion of the divisor, FRACT, is a 4-bit
nibble, which is programmed into BRGConfig[3:0]. The
maximum value is 15, allowing the divisor to be pro-
grammed with a resolution of 0.0625. FRACT is calcu-
lated as:

FRACT = ROUND(16 x (D-DIV))

The following is an example of calculating the divisor.
It is based on a required baud rate of 190kbaud and a
reference input frequency of 28.23MHz and 1x (default)
rate mode.
The ideal divisor is calculated as:

D = 28,230,000/(16 x 190,000)

= 9.2861842105263157894736842105263

hence DIV = 9.

FRACT =

ROUND(4.5789473684210526315789473684211) = 5

so that DIVMSB = 0x00, DIVLSB = 0x09, and
BRGConfig[3:0] = 0x05.
The resulting (actual) baud rate can be calculated as:

REF

ACTUAL

ACTUAL

f

BR

16 D

=

×

For this example: D

ACTUAL

= 9 + 5/16 = 9.3125

where

D

ACTUAL = DIV + FRACT/16

and

BR

ACTUAL

= 28,230,000/(16 x 9.3125)

= 189463.0872483221476510067114094 baud

Thus, the baud rate is within 0.000028% of the ideal rate.

2x and 4x Rate Modes

To support higher baud rates than possible with stan-
dard (16x sampling) operation, the MAX3107 offers 2x
and 4x rate modes. In this case, the reference clock rate
only needs to be either 8x or 4x of the baud rate, respec-
tively. The bits are only sampled once at the midbit
instant instead of the usual three samples to determine
the logic value of the bits. This reduces the tolerance to
line noise on the received data. The 2x and 4x modes
are selectable through BRGConfig[5:4]. Note that IrDA
encoding and decoding does not operate in 2x and 4x
modes.
When 2x rate mode is selected, the actual baud rate is
twice the rate programmed into the baud-rate genera-
tor. If 4x rate mode is enabled, the actual baud rate on
the line is quadruple that of programmed baud rate
(Figure 8).

Figure 8. 2x and 4x Baud Rates

FRACTIONAL

RATE

GENERATOR

16x BAUD RATE

f

REF

BAUD RATE

BaudRateConfig[5:4]

DIV[LSB]

DIV[MSB]

NOTE: IrDA DOES NOT WORK IN 2x AND 4x MODES.

FRACT

1x, 2x, 4x RATE

MODES

Advertising