NEC 78K0 User Manual page 316

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

(2) Generation of serial clock
A serial clock can be generated by using baud rate generator control register 0 (BRGC0).
Select the clock to be input to the 5-bit counter by using bits 7 and 6 (TPS01 and TPS00) of BRGC0.
Bits 4 to 0 (MDL04 to MDL00) of BRGC0 can be used to select the division value of the 5-bit counter.
(a) Baud rate
The baud rate can be calculated by the following expression.
f
XCLK0
• Baud rate =
2 × k
f
: Frequency of base clock selected by the TPS01 and TPS00 bits of the BRGC0 register
XCLK0
k:
Value set by the MDL04 to MDL00 bits of the BRGC0 register (k = 8, 9, 10, ..., 31)
(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 = 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
316
CHAPTER 14 SERIAL INTERFACE UART0
[bps]
= 2,500,000/(2 × 16) = 78,125 [bps]
= 1.725 [%]
User's Manual U15947EJ2V0UD
− 1 × 100 [%]
*

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents