Setting The Baud Rate - Fujitsu MB91460 SERIES FR60 User Manual

32-bit microcontroller
Table of Contents

Advertisement

CLK
SCK04
(external
clock
input)

6.1 Setting the Baud Rate

This section describes how the baud rates are set and the resulting serial clock frequency is calculated.
■ Calculating the baud rate
The both 15-bit Reload Counters are programmed by the Baud Rate Generator Registers 1 and 0 (BGR14,
04). The following calculation formula should be used to set the wanted baud rate:
Reload Value:
v = [F / b] - 1
where F is the resource clock (CLKP), b the baud rate and [ ] gaussian brackets (mathematical rounding
function).
■ Example of Calculation
If the CPU clock is 16 MHz and the desired baud rate is 19200 baud then the reload value v is:
6
v = [16
10
/ 19200] - 1 = 832
*
The exact baud rate can then be recalculated: b
(Note)
Setting the reload value to 0 stops the reload counter.
(Note)
The minimum recommended division ratio is 4 (i.e. reload value is 3) due to RX oversampling filter in
asynchronous communication modes (mode 0,1 and 3).
Figure 6-1 Baud rate selection circuit (reload counter)
Reload Value: v
Reception
16-bit Reload Counter
Reload Value: v
0
Transmission
16-bit Reload Counter
1
Count Value: Txc
SMR04
EXT
register
REST
OTO
,
REST
Rxc = 0?
Reload
Rxc = v/2?
Txc = 0?
Reload
Txc = v/2?
Internal data bus
BGR14
BGR13
BGR14
BGR12
register
BGR11
BGR10
BGR9
BGR8
= F / (v + 1), here it is: 16
exact
Chapter 32 USART (LIN / FIFO)
6.USART Baud Rates
Start bit falling
edge detected
set
Reception
FF
0
Clock
reset
1
EXT
set
OTO
FF
0
reset
1
Transmission
Clock
BGR7
BGR6
BGR5
BGR04
BGR4
register
BGR3
BGR2
BGR1
BGR0
6
10
/ 833 = 19207.6831
*
643

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr60Mb91460 series

Table of Contents