Datasheet

Table Of Contents
Data Sheet ADuC832
Rev. B | Page 33 of 92
SPECIAL FUNCTION REGISTERS (SFRS)
The SFR space is mapped into the upper 128 bytes of internal
data memory space and accessed by direct addressing only.
It provides an interface between the CPU and all on-chip peripher-
als. A block diagram showing the programming model of the
ADuC832 via the SFR area is shown in Figure 35.
All registers, except the program counter (PC) and the four
general-purpose register banks, reside in the SFR area. The SFR
registers include control, configuration, and data registers that
provide an interface between the CPU and all on-chip peripherals.
128-BYTE
SPECIAL
FUNCTION
REGISTER
AREA
62-kB
ELECTRICALLY
REPROGRAMMABLE
NONVOLATILE
FLASH/EE PROGRAM
MEMORY
8051-
COMPATIBLE
CORE
OTHER ON-CHIP
PERIPHERALS
TEMPERATURE
SENSOR
2
12-BIT DACs
SERIAL I/O
WDT
PSM
TIC
PWM
8-CHANNEL
12-BIT ADC
4-kB
ELECTRICALLY
REPROGRAMMABLE
NONVOLATILE
FLASH/EE DATA
MEMORY
2304 BYTES
RAM
02987-024
Figure 35. Programming Model
ACCUMULATOR SFR (ACC)
ACC is the accumulator register and is used for math operations
including addition, subtraction, integer multiplication and
division, and Boolean bit manipulations. The mnemonics for
accumulator-specific instructions refer to the accumulator as A.
B SFR (B)
The B register is used with the ACC for multiplication and
division operations. For other instructions, it can be treated
as a general-purpose scratch pad register.
STACK POINTER (SP AND SPH)
The SP SFR is the stack pointer and is used to hold an internal
RAM address that is called the top of the stack. The SP register
is incremented before data is stored during push and call
executions. While the stack may reside anywhere in on-chip
RAM, the SP register is initialized to 07H after a reset. This
causes the stack to begin at Location 08H.
As mentioned previously, the ADuC832 offers an extended
11-bit stack pointer. The three extra bits to make up the 11-bit
stack pointer are the three LSBs of the SPH byte located at B7H.
DATA POINTER (DPTR)
The data pointer is made up of three 8-bit registers, named DPP
(page byte), DPH (high byte), and DPL (low byte). These are
used to provide memory addresses for internal and external
code access and external data access. It can be manipulated as a
16-bit register (DPTR = DPH, DPL), although INC DPTR
instructions automatically carry over to DPP, or as three
independent 8-bit registers (DPP, DPH, and DPL).
The ADuC832 supports dual data pointers. Refer to the Dual
Data Pointers section.
PROGRAM STATUS WORD (PSW)
SFR Address: D0H
Power-On Default Value: 00H
Bit Addressable: Ye s
The PSW SFR contains several bits reflecting the current status
of the CPU, as detailed in Table 14.
Table 14. PSW SFR Bit Designations
Bit Name Description
[7] CY Carry flag
[6] AC Auxiliary carry flag
[5] F0 General-purpose flag
[4:3]
RS[1:0]
Register bank select bits
RS1 RS0 Selected Bank
0 0 0
0 1 1
1 0 2
1
1
3
[2] OV Overflow flag
[1] F1 General-purpose flag
[0] P Parity bit
POWER CONTROL SFR (PCON)
SFR Address: 87H
Power-On Default Value: 00H
Bit Addressable: No
The PCON SFR contains bits for power-saving options and
general-purpose status flags, as shown in Table 15.
Table 15. PCON SFR Bit Designations
Bit Name Description
[7] SMOD Double UART baud rate
[6] SERIPD I
2
C/SPI power-down interrupt enable
[5] INT0PD
INT0 power-down interrupt enable
[4] ALEOFF Disable ALE output
[3] GF1 General-purpose flag bit
[2]
GF0
General-purpose flag bit
[1] PD Power-down mode enable
[0] IDL Idle mode enable