HT68F14 HOLTEK [Holtek Semiconductor Inc], HT68F14 Datasheet - Page 24

no-image

HT68F14

Manufacturer Part Number
HT68F14
Description
Enhanced I/O Flash Type MCU
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
HT68F14
Quantity:
310
Special Function Register Description
Rev. 1.10
Indirect Addressing Registers - IAR0, IAR1
Memory Pointers - MP0, MP1
Indirect Addressing Program Example
Most of the Special Function Register details will be described in the relevant functional section.
However, several registers require a separate description in this section.
The Indirect Addressing Registers, IAR0 and IAR1, although having their locations in normal RAM
register space, do not actually physically exist as normal registers. The method of indirect addressing
for RAM data manipulation uses these Indirect Addressing Registers and Memory Pointers, in
contrast to direct memory addressing, where the actual memory address is specified. Actions on the
IAR0 and IAR1 registers will result in no actual read or write operation to these registers but rather to
the memory location specified by their corresponding Memory Pointers, MP0 or MP1. As the Indirect
Addressing Registers are not physically implemented, reading the Indirect Addressing Registers
indirectly will return a result of 00H and writing to the registers indirectly will result in no operation.
data .section ¢data¢
adres1 db ?
adres2 db ?
adres3 db ?
adres4 db ?
block db ?
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
RAM addresses.
Two Memory Pointers, known as MP0 and MP1 are provided. These Memory Pointers are physically
implemented in the Data Memory and can be manipulated in the same way as normal registers
providing 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 that for the HT68F13 device, bit 7 of the
Memory Pointers is not required to address the full memory space. When bit 7 of the Memory Pointers
for HT68F13 device is read, a value of 1 will be returned. The following example shows how to clear a
section of four Data Memory locations already defined as locations adres1 to adres4.
00h
mov
mov
mov
mov
clr
inc
sdz
jm
a,04h
block,a
a,offset adres1
mp0,a
IAR0
mp0
block
p loop
; setup size of block
; Accumulator loaded with first RAM address
; setup memory pointer with first RAM address
; clear the data at address defined by MP0
; increment memory pointer
; check if last memory location has been cleared
24
Enhanced I/O Flash Type MCU
HT68F13/HT68F14/HT68F15
February 9, 2011

Related parts for HT68F14