Renesas RL78 Series User Manual page 647

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
16.2.1 Multiplication/division data register A (MDAH, MDAL)
The MDAH and MDAL registers set the values that are used for a multiplication or division operation and store the
operation result. They set the multiplier and multiplicand data in the multiplication mode or multiply-accumulator mode,
and set the dividend data in the division mode. Furthermore, the operation result (quotient) is stored in the MDAH and
MDAL registers in the division mode.
The MDAH and MDAL registers can be set by a 16-bit manipulation instruction.
Reset signal generation clears these registers to 0000H.
Figure 16-2. Format of Multiplication/Division Data Register A (MDAH, MDAL)
Address: FFFF0H, FFFF1H, FFFF2H, FFFF3H
Symbol
MDAH
MDAH
MDAH
15
14
Symbol
MDAL
MDAL
MDAL
15
14
Cautions 1. Do not rewrite the MDAH and MDAL registers values during division operation processing
(when the multiplication/division control register (MDUC) value is 81H or C1H). The operation
will be executed in this case, but the operation result will be an undefined value.
2. The MDAH and MDAL registers values read during division operation processing (when the
MDUC register value is 81H or C1H) will not be guaranteed.
3. The data is in the two's complement format in either the multiplication mode (signed) or
multiply-accumulator mode (signed).
The following table shows the functions of the MDAH and MDAL registers during operation execution.
Table 16-2. Functions of MDAH and MDAL Registers During Operation Execution
Operation Mode
Multiplication mode (unsigned)
Multiply-accumulator mode (unsigned)
Multiplication mode (signed)
Multiply-accumulator mode (signed)
Division mode (unsigned)
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
CHAPTER 16 MULTIPLIER AND DIVIDER/MULTIPLY-ACCUMULATOR
After reset: 0000H, 0000H R/W
FFFF3H
MDAH
MDAH
MDAH
MDAH
13
12
11
10
FFFF1H
MDAL
MDAL
MDAL
MDAL
13
12
11
10
MDAH: Multiplier (unsigned)
MDAL: Multiplicand (unsigned)
MDAH: Multiplier (signed)
MDAL: Multiplicand (signed)
MDAH: Dividend (unsigned)
(higher 16 bits)
MDAL: Dividend (unsigned)
(lower 16 bits)
MDAH
MDAH
MDAH
MDAH
9
8
7
6
MDAL
MDAL
MDAL
MDAL
9
8
7
6
Setting
FFFF2H
MDAH
MDAH
MDAH
MDAH
5
4
3
2
FFFF0H
MDAL
MDAL
MDAL
MDAL
5
4
3
2
Operation Result
(unsigned)
MDAH: Division result
Higher 16 bits
(unsigned)
MDAL: Division result
Lower 16 bits
MDAH
MDAH
1
0
MDAL
MDAL
1
0
626

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents