ht82m72e Holtek Semiconductor Inc., ht82m72e Datasheet - Page 9

no-image

ht82m72e

Manufacturer Part Number
ht82m72e
Description
Ht82m72e/ht82m72a -- Rf One Channel Mouse 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
HT82M72E
Quantity:
650
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. The
location of these registers within the Data Memory be-
gins at the address 00H. Any unused Data Memory lo-
cations between these special function registers and the
point where the General Purpose Memory begins is re-
served and attempting to read data from these locations
will return a value of 00H.
Indirect Addressing Registers - IAR
The IAR register, located at Data Memory address
ter allows what is known as indirect addressing, which
permits data manipulation using a Memory Pointer in-
stead of the usual direct memory addressing method
data .section
adres1
adres2
adres3
adres4
block
code .section at 0 code
org
start:
loop:
continue:
The important point to note here is that in the example shown above, no reference is made to specific Data Memory ad-
dresses.
Rev. 1.20
00H , is not physically implemented. This special regis-
00h
mov a,04h
mov block,a
mov a,offset adres1; Accumulator loaded with first RAM address
mov mp,a
clr IAR
inc mp
sdz block
jmp loop
db ?
db ?
db ?
db ?
db ?
data
; setup size of block
; setup memory pointer with first RAM address
; clear the data at address defined by MP
; increment memory pointer
; check if last memory location has been cleared
9
where the actual memory address is defined. Any ac-
tions on the IAR register will result in corresponding
read/write operations to the memory location specified
by the Memory Pointer MP. Reading the IAR register in-
directly will return a result of 00H and writing to the
register indirectly will result in no operation.
Memory Pointer - MP
One Memory Pointer, known as MP, is physically imple-
mented in the Data Memory. The Memory Pointer can
be written to and manipulated in the same way as nor-
mal registers providing an easy way of addressing and
tracking data. When using any operation on the indirect
addressing register IAR, it is actually the address speci-
fied by the Memory Pointer that the microcontroller will
be directed to. Bit 7 of the Memory Pointer is not imple-
mented. However, it must be noted that when the Mem-
ory Pointer is read, bit 7 will be read as high.
HT82M72E/HT82M72A
May 22, 2008

Related parts for ht82m72e