NEC V850E/RS1 User Manual page 426

32-/16-bit single-chip microcontroller with can interface
Table of Contents

Advertisement

(2)
UARTAn control register 1 (UAnCTL1)
The UAnCTL1 register is used to select the clock for UARTAn.
For details, refer to 12.3 (2) UARTAn control register 1 (UAnCTL1).
(3)
UARTAn control register 2 (UAnCTL2)
The UAnCTL2 register is used to select the baud rate (serial transfer rate) clock for UARTAn.
For details, refer to 12.3 (3) UARTAn control register 2 (UAnCTL2).
(4)
Baud rate
The baud rate can be calculated by the following expression.
f
XCLK
k = Value set by UAnBRS7 to UAnBRS0 bits of UAnCTL2 register (k = 4, 5, 6, ..., 255)
(5)
Error of baud rate
The baud rate error is calculated by the following expression.
Cautions: 1. Keep the baud rate error on the transmission side to within the permissible error
Example:
Frequency of base clock = 32 MHz
Selection of f
Set value of UAnBRS7 to UAnBRS0 bits of UAnCTL2 register = 01101000B (k = 52)
Target baud rate = 153600 bps
Baud rate
Error
426
Downloaded from
Elcodis.com
electronic components distributor
Chapter 12 Asynchronous Serial Interface A (UARTA)
= Frequency of base clock selected by UAnCKS3 to UAnCKS0 bits of UAnCTL1 register
Actual baud rate (baud rate with error)
(
Error (%) =
Desired baud rate (normal baud rate)
on the reception side.
2. Keep the baud rate error on the reception side to within the range described in (7)
Permissible baud rate range for reception.
/2 as base clock
XX
= (32000000 / 2) / (2 ¥ 52)
= 153846 [bps]
= (153846/153600 – 1) ¥ 100
= 0.160 [%]
User's Manual U16702EE3V2UD00
f
XCLK
Baud rate =
[bps]
2 × k
)
- 1 × 100

Advertisement

Table of Contents
loading

Table of Contents