pc87591l-n05 National Semiconductor Corporation, pc87591l-n05 Datasheet - Page 159

no-image

pc87591l-n05

Manufacturer Part Number
pc87591l-n05
Description
Lpc Mobile Embedded Controller
Manufacturer
National Semiconductor Corporation
Datasheet
Revision 1.2
4.0 Embedded Controller Modules
4.9.5
Calculating the Baud Rate in Asynchronous Mode
The equation for calculating the baud rate is:
BR = SYS_CLK/(16xNxP)
where:
Assuming a system clock of 5 MHz and a desired baud rate of 9600, the NxP term, according to the equation above, is:
The NxP term is then divided by each pre-scaler factor in Table 20 on page 152 to obtain a value closest to an integer. The
factor for this example is 6.5:
The baud rate register is programed with a baud rate divisor of 4 (N = baud rate divisor +1). This produces a baud clock of:
Note that the percent error is much lower than would be possible without the non-integer pre-scaler factor. Refer to the table
below for more examples.
Calculating the Baud Rate in Synchronous Mode
The equation for calculating the baud rate is:
where:
The same procedure is used for determining the values of N and P, as in Asynchronous mode. However, non-integer pre-
scale values are not allowed.
• BR is the baud rate
• SYS_CLK is the system clock
• N is the value of the baud rate divisor + 1
• P is the pre-scaler divide factor selected by the value in the PSR register
• BR is the baud rate
• SYS_CLK is the system clock
• N is the value of the baud rate divisor + 1
• P is the pre-scaler divide factor selected by the value in the PSR register
NxP = (5x10
N = 32.552/6.5 = 5.008 (N = 5)
BR = (5x10
% error = (9615.385-9600)/9600 = 0.16
BR = SYS_CLK/(2xNxP)
Usage Hints
6
System Clock
)/(16x5x6.5) = 9615.385
6
)/(16x9600) = 32.552
10 MHz
20 MHz
4 MHz
5 MHz
Baud Rate
Desired
19200
19200
9600
9600
(Continued)
N
2
5
5
5
159
6.5
6.5
13
13
P
Actual Baud Rate
19230.769
19230.769
9615.385
9615.385
Percent Error
0.16
0.16
0.16
0.16
www.national.com

Related parts for pc87591l-n05