NEC 78K0 Series User Manual page 480

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

CHAPTER 18 MULTIPLIER/DIVIDER (
The functions of MDA0 when an operation is executed are shown in the table below.
DMUSEL0
0
1
The register configuration differs between when multiplication is executed and when division is executed, as
follows.
• Register configuration during multiplication
<Multiplier A>
MDA0 (bits 15 to 0) × MDB0 (bits 15 to 0) = MDA0 (bits 31 to 0)
• Register configuration during division
<Dividend>
MDA0 (bits 31 to 0) ÷ MDB0 (bits 15 to 0) = MDA0 (bits 31 to 0) ... SDR0 (bits 15 to 0)
MDA0 fetches the calculation result as soon as the clock is input, when bit 7 (DMUE) of multiplier/divider
control register 0 (DMUC0) is set to 1.
MDA0H and MDA0L can be set by an 8-bit or 16-bit memory manipulation instruction.
Reset signal generation clears MDA0H and MDA0L to 0000H.
(3) Multiplication/division data register B0 (MDB0)
MDB0 is a register that stores a 16-bit multiplier B in the multiplication mode and a 16-bit divisor in the
division mode.
MDB0 can be set by an 8-bit or 16-bit memory manipulation instruction.
Reset signal generation sets MDB0 to 0000H.
Figure 18-4. Format of Multiplication/Division Data Register B0 (MDB0)
Address: FF66H, FF67H
Symbol
MDB0
MDB
MDB
MDB
015
014
Cautions 1. Do not change the value of MDB0 during operation processing (while bit 7 (DMUE) of
multiplier/divider control register 0 (DMUC0) is 1).
executed, but the result is undefined.
2. Do not clear MDB0 to 0000H in the division mode. If set, undefined operation results are
stored in MDA0 and SDR0.
480
µ
PD78F0534, 78F0535, 78F0536, 78F0537, AND 78F0537D ONLY)
Table 18-2. Functions of MDA0 During Operation Execution
Operation Mode
Division mode
Multiplication mode
<Multiplier B>
<Divisor>
After reset: 0000H
R/W
FF67H (MDB0H)
MDB
MDB
MDB
MDB
013
012
011
010
009
Preliminary User's Manual U17260EJ3V1UD
Setting
Dividend
Higher 16 bits: 0, Lower 16
bits: Multiplier A
<Product>
<Quotient>
<Remainder>
FF66H (MDB0L)
MDB
MDB
MDB
MDB
MDB
008
007
006
005
Even in this case, the operation is
Operation Result
Division result (quotient)
Multiplication result
(product)
MDB
MDB
MDB
MDB
004
003
002
001
000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents