Users Manual

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 1674 of 1852
Nov 30, 2020
RX23W Group 48. Data Operation Circuit (DOC)
48.3.3 Data Subtraction Mode
Figure 48.4 shows an example of the steps involved in data subtraction mode operation by the DOC.
(1) Writing 10b to the DOCR.OMS[1:0] bits selects data subtraction mode.
(2) Set the initial value in the DODSR register.
(3) Write the value for subtraction in the DODIR register. The result of the operation is stored in DODSR.
(4) Write all values for use in subtraction to the DODIR register.
(5) If the result of the operation is less than 0000h, the DOCR.DOPCF flag becomes 1. If the DOCR.DOPCIE bit is 1, a
data operation circuit interrupt is also issued.
Figure 48.4 Example of Operation in Data Subtraction Mode
48.4 Interrupt Requests
The data operation circuit interrupt (DOPCI) is the interrupt request generated by the DOC. The DOCR.DOPCF flag
becomes 1 when the interrupt source condition is satisfied.
Table 48.2 lists the details of the interrupt request.
Table 48.2 Interrupt Request from DOC
Interrupt Request Data Operation Result Flag Interrupt Generation Timing
Data operation circuit
interrupt (DOPCI)
DOPCF The result of data comparison meets the detection condition.
The result of data addition is greater than FFFFh.
The result of data subtraction is less than 0000h.
DODIR register
DODSR register
DOCR.OMS[1:0] bits
(1)
(2) (3) (4)
Write 1 to
DOCR.DOPCFCL bit
(5)
10bxxb
FFFDhxxxxh 000Fh 000Bh 0005h
0008hxxxxh 0004h 0006h
DOCR.DOPCF flag