
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Asynchronous/Synchronous Serial Interface (ASC)
User’s Manual
18-30
V2.2, 2004-01
ASC_X, V2.0
In general, the baudrate generator in Asynchronous Mode is build up by two parts (see
also
):
•
The clock prescaler part which derives
f
DIV
from
f
ASC
•
The baudrate timer part which generates the sample clock
f
BRT
and the baudrate
clock
f
BR
Prior to an Autobaud Detection the prescaler part has to be set up by the CPU while the
baudrate timer (register ASCx_BG) is initialized with a 13-bit value (BR_VALUE)
automatically after a successful autobaud detection. For the following calculations, the
fractional divider is used (FDE = 1).
Note: It is also possible to use the fixed divide-by-2 or divide-by-3 prescaler. But the
fractional divider allows the much more precise adaption of
f
DIV
to the required
value.
Standard Baudrates
For standard baudrate detection the baudrates as shown in
can be e.g.
detected. Therefore, the output frequency
f
DIV
of the baudrate generator must be set to
a frequency derived from the module clock
f
ASC
in a way that it is equal to 11.0592 MHz.
The value to be written into register FDV is the nearest integer value which is calculated
according the following formula:
(18.1)
defines the nine standard baudrates (Br0 - Br8) which can be detected for
f
DIV
= 11.0592 MHz.
Table 18-8
Autobaud Detection Using Standard Baudrates (
f
DIV
= 11.0592 MHz)
Baudrate
Numbering
Detectable Standard
Baudrate
Divide Factor d
f
BG is Loaded after
Detection with Value
Br0
230.400 kbit/s
48
2 = 002
H
Br1
115.200 kbit/s
96
5 = 005
H
Br2
57.600 kbit/s
192
11 = 00B
H
Br3
38.400 kbit/s
288
17 = 011
H
Br4
19.200 kbit/s
576
35 = 023
H
Br5
9600 bit/s
1152
71 = 047
H
Br6
4800 bit/s
2304
143 = 08F
H
Br7
2400 bit/s
4608
287 = 11F
H
Br8
1200 bit/s
9216
575 = 23F
H
FDV
512
11.0592 MHz
×
f
ASC
----------------------------------------------------
=