Uart0 Baudrate Calculation; User Manual - Philips LPC2101 User Manual

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
If the U0FDR register value does not comply to these two requests then the fractional
divider output is undefined. If DIVADDVAL is zero then the fractional divider is disabled
and the clock will not be divided.
The value of the U0FDR should not be modified while transmitting/receiving data or data
may be lost or corrupted.
Usage Note: For practical purposes, UART0 baudrate formula can be written in a way
that identifies the part of a UART baudrate generated without the fractional baudrate
generator, and the correction factor that this module adds:
Based on this representation, fractional baudrate generator contribution can also be
described as a prescaling with a factor of MULVAL / (MULVAL + DIVADDVAL).

9.3.5 UART0 baudrate calculation

Example 1: Using UART0baudrate formula from above, it can be determined that system
with PCLK = 20 MHz, U0DL = 130 (U0DLM = 0x00 and U0DLL = 0x82), DIVADDVAL = 0
and MULVAL = 1 will enable UART0 with UART0baudrate = 9615 bauds.
Example 2: Using UART0baudrate formula from above, it can be determined that system
with PCLK = 20 MHz, U0DL = 93 (U0DLM = 0x00 and U0DLL = 0x5D), DIVADDVAL = 2
and MULVAL = 5 will enable UART0 with UART0baudrate = 9600 bauds.
Table 87:
Desired
baudrate
50
75
110
134.5
150
300
600
1200
1800
2000
2400
3600
4800

User manual

---------------------------------------------------------------------------- -
UART0
=
×
(
baudrate
16
Baudrates available when using 20 MHz peripheral clock (PCLK = 20 MHz)
MULVAL = 0 DIVADDVAL = 0
U0DLM:U0DLL
% error
[2]
[1]
hex
dec
61A8
25000
0.0000
411B
16667
0.0020
2C64
11364
0.0032
244E
9294
0.0034
208D
8333
0.0040
1047
4167
0.0080
0823
2083
0.0160
0412
1042
0.0320
02B6
694
0.0640
0271
625
0.0000
0209
521
0.0320
015B
347
0.0640
0104
260
0.1600
Rev. 01 — 12 January 2006
PCLK
×
)
16
U0DLM
+
U0DLL
Optimal MULVAL & DIVADDVAL
[3]
U0DLM:U0DLL
[1]
dec
25000
12500
6250
3983
6250
3125
1250
625
625
625
250
248
125
UM10161
Chapter 9: UART0
MulVal
×
----------------------------------------------------------- -
(
MulVal
+
DivAddVal
Fractional
% error
pre-scaler value
MULDIV
MULDIV + DIVADDVAL
1/(1+0)
0.0000
3/(3+1)
0.0000
11/(11+9)
0.0000
3/(3+4)
0.0001
3/(3+1)
0.0000
3/(3+1)
0.0000
3/(3+2)
0.0000
3/(3+2)
0.0000
9/(9+1)
0.0000
1/(1+0)
0.0000
12/(12+13)
0.0000
5/(5+2)
0.0064
12/(12+13)
0.0000
© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
(2)
)
[3]
86

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2103Lpc2102

Table of Contents