NEC 78K0/KD1 Series User Manual page 264

8-bit single-chip microcontrollers
Table of Contents

Advertisement

(b) Baud rate
The baud rate can be calculated by the following expression.
f
XCLK
• Baud rate =
2 × k
f
: Frequency of base clock (Clock) selected by the TPS01 and TPS00 bits of the BRGC0 register
XCLK
k:
Value set by the MDL04 to MDL00 bits of the BRGC0 register (k = 8, 9, 10, ..., 31)
(c) Error of baud rate
The baud rate error can be calculated by the following expression.
Actual baud rate (baud rate with error)
• Error (%) =
Desired baud rate (correct baud rate)
Cautions 1. Keep the baud rate error during transmission to within the permissible error range at
the reception destination.
2. Make sure that the baud rate error during reception satisfies the range shown in (4)
Permissible baud rate range during reception.
Example: Frequency of base clock (Clock) = 2.5 MHz = 2,500,000 Hz
Set value of MDL04 to MDL00 bits of BRGC0 register = 10000B (k = 16)
Target baud rate = 76,800 bps
Baud rate = 2.5 M/(2 × 16)
Error = (78,125/76,800 − 1) × 100
264
CHAPTER 13 SERIAL INTERFACE UART0
[bps]
= 2,500,000/(2 × 16) = 78125 [bps]
= 1.725 [%]
Preliminary User's Manual U16315EJ1V0UD
− 1 × 100 [%]

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents