NEC 78K0S/KA1+ User Manual page 209

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

(2) Generation of serial clock
A serial clock can be generated by using clock selection register 6 (CKSR6) and baud rate generator control
register 6 (BRGC6).
Select the clock to be input to the 8-bit counter by using bits 3 to 0 (TPS63 to TPS60) of CKSR6.
Bits 7 to 0 (MDL67 to MDL60) of BRGC6 can be used to select the division value of the 8-bit counter.
(a) Baud rate
The baud rate can be calculated by the following expression.
f
XCLK6
• Baud rate =
2 × k
f
: Frequency of base clock selected by TPS63 to TPS60 bits of CKSR6 register
XCLK6
k:
Value set by MDL67 to MDL60 bits of BRGC6 register (k = 8, 9, 10, ..., 255)
(b) 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 = 10 MHz = 10,000,000 Hz
Set value of MDL67 to MDL60 bits of BRGC6 register = 00100001B (k = 33)
Target baud rate = 153600 bps
Baud rate = 10 M/(2 × 33)
Error = (151515/153600 − 1) × 100
CHAPTER 11 SERIAL INTERFACE UART6
[bps]
= 10000000/(2 × 33) = 151,515 [bps]
= −1.357 [%]
User's Manual U16898EJ3V0UD
− 1 × 100 [%]
209

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents