English
Language : 

C8051F52X Datasheet, PDF (162/220 Pages) Silicon Laboratories – 8/4/2 kB ISP Flash MCU Family
C8051F52x-53x
17.4.2. Bit Rate Options: Manual or Autobaud (Slave only)
The peripheral can be selected to have its bit rate calculated manually or automatically. A master node
must always have its bit rate set manually but for slave nodes the designer can choose between a manual
or automatic setup. The following C-code fragment shows how to select the peripheral to use manual baud
rate:
LINCF &= ~0x20;
// Manual Baud Rate
Both manual and automatic baud rate require the setup of some registers. The following chapters explain
the different options available and their relation with the baud rate along with the steps necessary to
achieve the required baud rate.
17.4.3. Baud Rate Calculations - Manual Mode
The baud rate used by the peripheral is a function of the System Clock (SYSCLK) and the bit-timing Reg-
isters according to the following equation:
bit_rate = 2----(--p--r-e--s--c--a--l-e--r---+----1--)---×-----d---i-S-v--Y-i--d-S---eC---r--L--×-K---(---m-----u---l--t--i--p---l--i--e---r----+-----1----)
The prescaler, divider and multiplier factors are part of the LINDIV and LINMUL registers and can assume
values in the following range:
Table 17.2. Table Needs Title
Factor
prescaler
divider
multiplier
Range
0…3
0…31
200…511
Important: The minimum system clock (SYSCLK) to operate the LIN peripheral is 8 MHz.
To calculate the value of the several factors used to create a required bit-rate the following equations are
defined:
multiplier
=
----2---0---0---0---0----
bit_rate
–
1
prescaler = ln -(--m-----u---l--t--i--p---l--i--e---r----+S----Y-1--S--)--C-×---L--b--K-i--t--_----r--a----t--e----×-----2---0---0-
× ---1---- – 1
ln2
divider = (---2---(--p--r--e--s--c--a--l-e--r--+----1---)---×--S--m--Y---uS---l-C-t--i-L--p--K-l--i--e---r----×-----b---i--t--_---r---a---t--e---)-
162
Rev. 0.3