TMP92CZ26A

92CZ26A-631

(d) Sign mode
Both multiply-accumulate and multiply-subtract operations can be executed in unsigned
or signed mode.
In signed mode, the MACMA , MACMB, and MACOR registers become signed registers,
and the most significant bit is treated as the sign bit and the data set in each register is
treated as a two’s complement value. Table 3.26.1 shows the range of values that can be
represented in each si gn mode.
Table 3.26.1 Data Range in Unsigned/Signed Mode
MACMA, MACMB Registers MACOR Register
Unsigned 0 2321 0 2641
Signed 231 +231-1 263 +2631
Use signed mode when the values to be set in the MACMA and MACMB registers are
signed (two’s complement) data. Even in unsigned mode it is possible to set signed (two’s
complement) data in the MACOR register to perform additions and subtractions in signed
mode.
(2) Calculation start trigger
As a trigger to start calculation, writing to the MACMA, MACMB or MACOR register or
soft start (MACCR<MOPST>=1) can be selected in MACCR<MSTTG2:0>.
(3) Overflow flag
When an overflow occ urs in the calculation result (s ee T able 3.2 6.2), MACCR<MOVF> is set
to “1”. Once an overflow occurs, MACCR<MOVF> is held at “1” regardless of subsequent
calculation results. Sinc e the overflo w flag is n ot au tomatica lly cleare d by a r ead operat ion, it
is necessary to write “0” to clear this flag.
Table 3.26.2 Overflow Definitions
Sign Mode Calculation Result
(MACOR register value) MACCR<MOVF>
MACOR > 2641 1
0 MACOR 2641 0
Signed
MACOR < 0 1
MACOR > 2631 1
263 MACOR 2631 0
Unsigned
MACOR < 263 1