DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

HT46R4A View Datasheet(PDF) - Holtek Semiconductor

Part Name
Description
Manufacturer
HT46R4A
Holtek
Holtek Semiconductor Holtek
HT46R4A Datasheet PDF : 60 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
HT46R4A
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 operation. The location of these registers
within the Data Memory begins at the address 00H. Any
unused Data Memory locations between these special
function registers and the point where the General Pur-
pose Memory begins is reserved for future expansion
purposes, attempting to read data from these locations
will return a value of 00H.
Indirect Addressing Register - IAR
The IAR register, located at Data Memory address
²00H², is not physically implemented. This special regis-
ter allows what is known as indirect addressing, which
permits data manipulation using Memory Pointers in-
stead of the usual direct memory addressing method
where the actual memory address is defined.
Any actions on the IAR register will result in correspond-
ing read/write operations to the memory location speci-
fied by the Memory Pointer MP. Reading the IAR
register indirectly 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.
The following example shows how to clear a section of four RAM locations already defined as locations adres1 to
adres4.
data .section ¢data¢
adres1
db ?
adres2
db ?
adres3
db ?
adres4
db ?
block
db ?
code .section at 0 ¢code¢
org 00h
start:
mov a,04h
; setup size of block
mov block,a
mov a,offset adres1 ; Accumulator loaded with first RAM address
mov mp,a
; setup memory pointer with first RAM address
loop:
clr IAR
inc mp
sdz block
jmp loop
; clear the data at address defined by MP
; increment memory pointer
; check if last memory location has been cleared
continue:
The important point to note here is that in the example shown above, no reference is made to specific RAM addresses.
Rev. 1.00
11
November 28, 2007

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]