Prescaler Mode Register For Serial Clock (Sprm) - NEC uPD784038 Series User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

Caution When changing from "CTXE = 0, CRXE = 1" to "CTXE = 1, CRXE = 0", and when changing from "CTXE
= 1, CRXE = 0" to "CTXE = 0, CRXE = 1", ensure that this is not done with a single instruction, as this
will result in malfunction of the serial clock counter, and the first communication after the change will
finish in fewer than 8 bits. Instead, two instructions should be used as shown below.
Example To change "CTXE = 1, CRXE = 0" to "CTXE = 0, CRXE = 1"
CLR1 CTXE
SET1 CRXE

18.3.2 Prescaler Mode Register for Serial Clock (SPRM)

SPRM is an 8-bit register that specifies the division ratio of the serial clock when SPRS is specified by setting the CLS1
bit of the clocked serial interface mode register (CSIM) to 1 and clearing the CLS0 bit of CSIM to 0.
This register can be read or written to with an 8-bit manipulation instruction. Figure 18-3 shows the format of SPRM.
RESET input sets this register to 04H.
Rewrite the contents of SPRM only when transmission/reception is disabled (CTXE = CRXE = 0).
Figure 18-3 Format of Prescaler Mode Register (SPRM) for Serial Clock
7
6
SPRM
0
0
450
CHAPTER 18 3-WIRE/2-WIRE SERIAL I/O MODE
5
4
3
2
0
0
SPRS3 SPRS2 SPRS1 SPRS0
User's Manual U11316EJ4V1UD
1
0
Address
After reset
0FF81H
04H
SPRS3
SPRS2
SPRS1
SPRS0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
0
0
1
0
0
1
R/W
R/W
Specifies Serial Clock
f
/16
XX
f
/24
XX
f
/32
XX
f
/48
XX
f
/64
XX
f
/96
XX
f
/128
XX
f
/192
XX
f
/256
XX
f
/384
XX

Advertisement

Table of Contents
loading

Table of Contents