Special Function Registers
To ensure successful operation of the microcontroller, certain internal registers are implemented
in the Data Memory area. These registers ensure correct operation of internal functions such as
timers, interrupts, etc. as well as external functions such as I/O data control and A/D converter op-
eration. The location of these registers within the Data Memory begins at the address 00H. Any un-
used Data Memory locations between these special function registers and the point where the
General Purpose Memory begins is reserved for future expansion purposes, attempting to read
data from these locations will return a value of 00H.
Indirect Addressing Registers
-
IAR, IAR0, IAR1
The method of indirect addressing allows data manipulation using memory pointers instead of the
usual direct memory addressing method where the actual memory address is defined. Any action
on the Indirect Addressing Registers will result in corresponding read/write operations to the mem-
ory location specified by the corresponding memory pointer. For the HT46R47/HT46C47 and
HT46R22/HT46C22 devices, one Indirect Addressing Register, IAR, and one Memory Pointer,
MP, is provided. For the HT46R23/HT46C23 and HT46R24/HT46C24 devices, two Indirect Ad-
dressing Registers, IAR0 and IAR1, and two Memory Pointers, MP0 and MP1, are provided. Note
that these Indirect Addressing Registers are not physically implemented and that reading the Indi-
rect Addressing Registers indirectly will return a result of 00H and writing to the registers indirectly
will result in no operation.
Memory Pointers
-
MP, MP0, MP1
For the HT46R47/HT46C47 and HT46R22/HT46C22 devices, one memory pointer known as MP
is provided, whereas for the HT46R23/HT46C23 and HT46R24/HT46C24 devices, two memory
pointers known as MP0 and MP1 are provided. These memory pointers are physically imple-
mented in the Data Memory and can be manipulated in the same way as normal registers provid-
ing a convenient way with which to address and track data. When any operation to the relevant
Indirect Addressing Registers is carried out, the actual address that the microcontroller is directed
to is the address specified by the related Memory Pointer.
Note
For the HT46R47/HT46C47 and HT46R22/HT46C22 devices, bit 7 of the memory pointers are not
implemented. However, it must be noted that when the memory pointers in these devices are
read, a value of
²
1
²
will be read.
The following example shows how to clear a section of four RAM locations already defined as loca-
tions adres1 to adres4.
data .section
¢
data
¢
adres1
db ?
adres2
db ?
adres3
db ?
adres4
db ?
block
db ?
code .section at 0
¢
code
¢
org
00h
Chapter 1 Hardware Structure
25
Содержание HT46R22
Страница 7: ...vi A D Type MCU...
Страница 9: ...viii A D Type MCU...
Страница 10: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Страница 11: ...2 A D Type MCU...
Страница 90: ...P a r t I I Programming Language Part II Programming Language 81...
Страница 91: ...82 A D Type MCU...
Страница 97: ...88 A D Type MCU...
Страница 128: ...P a r t I I I Development Tools Part III Development Tools 119...
Страница 129: ...120 A D Type MCU...
Страница 140: ...Appendix Appendix 131...
Страница 141: ...132 A D Type MCU...
Страница 151: ...142 A D Type MCU...
Страница 152: ...A p p e n d i x B Package Information Appendix B Package Information 143 B...
Страница 161: ...A D Type MCU...
Страница 162: ...Amendments...