![Sino Wealth SH79F3283 Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063022.webp)
SH79F3283
22
7.1.2 Enhanced CPU core SFRs
Extended 'MUL' and 'DIV' instructions: 16bit X 8bit, 16bit/8bit
Dual Data Pointer
Enhanced CPU core registers: AUXC, DPL1, DPH1, INSCON
The SH79F3283 has modified 'MUL' and 'DIV' instructions. These instructions support 16 bit operand. A new register - the
register AUXC is applied to hold the upper part of the operand/result.
The AUXC register is used during 16 bit operand multiply and divide operations. For other instructions it can be treated as
another scratch pad register.
After reset, the CPU is in standard mode, which means that the 'MUL' and 'DIV' instructions are operating like the standard
8051 instructions. To enable the 16 bit mode operation, the corresponding enable bit in the INSCON register must be set.
Operation
Result
A
B
AUXC
MUL
INSCON.2 = 0; 8 bit mode
(A)*(B)
Low Byte
High Byte
---
INSCON.2 = 1; 16 bit mode
(AUXC A)*(B)
Low Byte
Middle Byte
High Byte
DIV
INSCON.3 = 0; 8 bit mode
(A)/(B)
Quotient Low Byte
Remainder
---
INSCON.3 = 1; 16 bit mode
(AUXC A)/(B)
Quotient Low Byte
Remainder
Quotient High Byte
Dual Data Pointer
Using two data pointers can accelerate data memory moves. The standard data pointer is called DPTR and the new data
pointer is called DPTR1.
DPTR1 is similar to DPTR, which consists of a high byte (DPH1) and a low byte (DPL1). Its intended function is to hold a 16-bit
address, but it may be manipulated as a 16-bit register or as two independent 8-bit registers.
The DPS bit in INSTCON register is used to choose the active pointer by setting 1 or 0. And all DPTR-related instructions will
use the currently selected data pointer.
7.1.3 Register
Table 7.2
Data Pointer Select Register
86H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
INSCON
-
BKS0
-
-
DIV
MUL
-
DPS
R/W
-
R/W
-
-
R/W
R/W
-
R/W
Reset Value
(POR/WDT/LVR/PIN)
-
0
-
-
0
0
-
0
Bit Number
Bit Mnemonic
Description
6
BKS0
SFR Bank Selection Bit
0: SFR Bank0 selected
1: SFR Bank1 selected
3
DIV
16 bit/8 bit Divide Selection Bit
0: 8 bit Divide
1: 16 bit Divide
2
MUL
16 bit/8 bit Multiply Selection Bit
0: 8 bit Multiply
1: 16 bit Multiply
0
DPS
Data Pointer Selection Bit
0: Data pointer
1: Data pointer1