User Manual
C166S V2
C166S V2 Memory Organization
User Manual
3-96
V 1.7, 2001-01
3.3.2
Special Function Register Areas
The functions of the CPU, the bus interface, the IO ports, and the on-chip peripherals of
the C166S V2 device are controlled via a number of so-called Special Function
Registers (SFRs). These SFRs are arranged within two areas of 512 Bytes each. The
first register block, the SFR area, is located in the 512 Bytes above the DPRAM
(00’FE00
H
...00’FFFF
H
). The second register block, the Extended SFR (ESFR) area, is
located in the 512 Bytes below the DPRAM (00’F000
H
...00’F1FF
H
).
Special Function Registers can be addressed via indirect and long 16-bit addressing
modes. Using an 8-bit offset together with an implicit base address allows word SFRs
and their respective low bytes to be addressed. However, this
does not work
for the
respective high bytes!
Note: High byte access of SFRs using the 8-bit offset addressing mode is not possible.
Note: Writing to any byte of an SFR causes the non-addressed complementary byte to
be cleared!
Note: GPRs can be accessed using the 8-bit offset addressing mode, but they are not
mapped into the SFR and ESFR memory area. an internal peripheral bus access
is executed using the respective long address instead of a GPR access.
The upper half of each register block (except the 16 highest words, refer to
) is bit-addressable, so the respective control/status bits can be directly modified or
checked using bit addressing.
When accessing registers in the ESFR area using 8-bit addresses or direct bit
addressing, the Extend Register (EXTR) instruction is required to switch the short
addressing mechanism from the standard SFR area to the Extended SFR area before
accessing registers in the ESFR area. This is not required for 16-bit and indirect
addresses. GPRs R15...R0 are duplicated, i.e. they are accessible within both register
blocks via short 2-, 4- or 8-bit addresses without switching.
Example:
EXTR
#4
;Switch to ESFR area for the next four instructions
MOV
ODP2, #data16
;ODP2 (ESFR register) uses 8-bit register addressing
BFLDL DP6, #mask, #data8;DP6 (ESFR register) bit addressing for bit fields
BSET
DP6.7
;DP6 (ESFR register) bit addressing for single bits
MOV
T8REL, R1
;T8REL uses 16-bit address, R1 is duplicatedº
;...and also accessible via the ESFR mode
;(EXTR is not required for this access)
;-------
;-------------------
;The scope of the EXTR #4 instruction ends here!
MOV
T8REL, R1
;T8REL uses 16-bit address, R1 is duplicatedº
;...and does not require switching
Summary of Contents for C166S V2
Page 102: ...User Manual C166S V2 C166S V2 Memory Organization User Manual 3 102 V 1 7 2001 01...
Page 116: ...User Manual C166S V2 Instruction Pipeline User Manual 4 116 V 1 7 2001 01...
Page 152: ...User Manual C166S V2 Interrupt and Exception Handling User Manual 5 152 V 1 7 2001 01...
Page 204: ...User Manual C166S V2 Instruction Set User Manual 7 204 V 1 7 2001 01...
Page 420: ...User Manual C166S V2 Detailed Instruction Description User Manual 8 420 V 1 7 2001 01...
Page 432: ...User Manual C166S V2 Summary of CPU Subsystem Registers User Manual 9 432 V 1 7 2001 01...
Page 437: ...437...