NEC UPD703116 User Manual page 472

32-bit single-chip microcontrollers
Table of Contents

Advertisement

(f) Baud rate setting value
The formulas for calculating the baud rate in the asynchronous mode and the synchronous mode and the
formula for calculating the error are as follows.
<1> Formula for calculating baud rate in asynchronous mode
Baud rate =
f
= Internal system clock frequency [Hz]
XX
= CPU clock/2 [Hz]
m: Setting value of PRSCMn register (1 ≤ m ≤ 256
k: Value set with bits BGCS1, BGCS0 of PRSMn register (k = 0, 1, 2, 3)
Note The setting of m = 256 is performed by writing 00H to the PRSCMn register.
<2> Formula for calculating the baud rate in synchronous mode
Baud rate =
f
= Internal system clock frequency [Hz]
XX
= CPU clock/2 [Hz]
m: Setting value of PRSCMn register (1 ≤ m ≤ 256
k: Value set with bits BGCS1, BGCS0 of PRSMn register (k = 0, 1, 2, 3)
Note The setting of m = 256 is performed by writing 00H to the PRSCMn register.
<3> Formula for calculating error
Error [%] =
Example (9520 − 9600)/9600 × 100 = −0.833 [%]
Remark
Actual baud rate: Baud rate with error
Target baud rate: Normal baud rate
472
CHAPTER 10 SERIAL INTERFACE FUNCTION
f
XX
[bps]
2 × m × 2
× 16
k
f
XX
[bps]
2 × m × 2
k
Actual baud rate − Target baud rate
Target baud rate
User's Manual U14492EJ5V0UD
Note
)
Note
)
× 100

Advertisement

Table of Contents
loading

Table of Contents