7-10
UART
7.2.1.6 Scratchpad Register
A scratchpad register intended for use by the programmer as a temporary data location is provided in this
UART. It does not control the UART operation in any way.
7.2.1.7 Divisor Latch LSB and MSB Registers
The divisor latches are used to program the divisor used in generating the baud clock. A 16-bit divisor may
be programmed through these registers. Access to these registers is provided by setting the Divisor Latch
Access bit (DLAB) in the Line Control Register (LCR Bit 0). These registers have a power-on reset value of
0.
The divisor can be calculated using the following formula:
Baud rate (bits/s) = (CPC700 SYS_CLOCK / 4) / (16 x Decimal Divisor)
For example, if the CPC700 SYS_CLOCK = 33.33 MHz and a baud rate of 9600 bits/sec is required:
Decimal Divisor = (CPC700 SYS_CLOCK / 4) / (16 x Baud rate)
= (33,333,333 / 4) / (16 x 9600)
= 54 (rounded) = 0x36
For this example, the Divisor Latch MSB register should be programmed to 0 and Divisor Latch LSB regis-
ter should be programmed to 0x36. Due to the error introduced by rounding, some baud rates may not be
attainable at certain SYS_CLOCK frequencies. Table 77 lists the more common baud rates and their corre-
sponding Divisor Latch register values with the CPC700 SYS_CLOCK equal to 33.33Mhz.
Table 77. UART Divisor Latch Settings for Certain Baud Rates
5
0
Receiver line status interrupt disabled.
1
Receiver line status interrupt enabled.
6
0
Transmitter holding register empty interrupt disabled.
1
Transmitter holding register empty interrupt enabled.
7
0
Received data available interrupt (and timeout interrupts in FIFO mode) disabled.
1
Received data available interrupt (and timeout interrupts in FIFO mode) enabled.
Baud Rate (bits/sec)
Div Latch MSB
Div Latch LSB
9600
0x00
0x36
19200
0x00
0x1B
28800
0x00
0x12
38400
0x00
0x0D
57600
0x00
0x09
Table 76. Interrupt Enable Register Description
IER Bits
Bit #
Value
Description
Summary of Contents for CPC700
Page 10: ...Table of Contents x Table of Contents...
Page 16: ...Tables xvi List of Tables...
Page 28: ...1 12 CPC700 User s Manual Preliminary...
Page 72: ...3 36 Processor Interface...
Page 132: ...4 60 Memory Controller...
Page 184: ...5 52 PCI Interface...
Page 194: ...6 10 Clock Power Management and Reset...
Page 224: ...8 18 IIC...
Page 244: ...10 10 Interrupt Controller...
Page 246: ...I 11 2 JTAG...
Page 250: ...12 4 Processor Local Bus PLB...
Page 262: ...14 10 Register Summary...
Page 267: ...CPC700 User s Manual Preliminary...