|
C8051F52X_12 Datasheet, PDF (168/221 Pages) Silicon Laboratories – 8/4/2 kB ISP Flash MCU Family | |||
|
◁ |
C8051F52x/F53x
17.2.4. Baud Rate CalculationsâAutomatic Mode
If the LIN peripheral is configured for slave mode, only the prescaler and divider need to be calculated:
prescaler
=
ln
S----Y----S---C----L----K--
4000000
ï´
---1----
ln2
â
1
divider
=
----------------S----Y---S----C----L----K------------------
2ï¨prescaler + 1ï© ï´ 20000
The following example calculates the values of these variables for a 24 MHz system clock:
prescaler = ln
2----4---5---0--0---0---0----0-
4000000
ï´
---1----
ln2
â
1
=
1.615
ï
1
divider
=
-------2---4---5---0---0---0---0---0--------
2ï¨1 + 1ï© ï´ 20000
=
306.25 ï 306
Table 17.3 presents some typical values of system clock and baud rate along with their factors.
Table 17.3. Autobaud Parameters Examples
System Clock (MHz)
25
24.5
24
22.1184
16
12.25
12
11.0592
8
Prescaler
1
1
1
1
1
0
0
0
0
Divider
312
306
300
276
200
306
300
276
200
168
Rev. 1.4
|
▷ |