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

HT46R92 Ver la hoja de datos (PDF) - Holtek Semiconductor

Número de pieza
componentes Descripción
Fabricante
HT46R92 Datasheet PDF : 61 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
HT46R92
Special Purpose Data Memory
This area of Data Memory is where registers, necessary
for the correct operation of the microcontroller, are
stored. Most of the registers are both readable and
writeable but some are protected and are readable only,
the details of which are located under the relevant Spe-
cial Function Register section. Note that for locations
that are unused, any read instruction to these addresses
will return the value ²00H².
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 Registers - IAR0, IAR1
The IAR0 and IAR1 registers, located at Data Memory
addresses 00H and 02H, are not physically imple-
mented. These special function registers allows what is
known as indirect addressing, which permits data ma-
nipulation using Memory Pointers instead of the usual
direct memory addressing method where the actual
memory address is defined. Any actions on the IAR0
and IAR1 registers will result in corresponding
read/write operations to the memory locations specified
by the Memory Pointers MP0 and MP1. Reading the
IAR0 and IAR1 registers indirectly will return a result of
²00H² and writing to the register indirectly will result in
no operation.
Memory Pointer - MP0, MP1
Two Memory Pointers, known as MP0 and MP1, are
physically implemented in Data Memory. The Memory
Pointer can be written to and manipulated in the same
way as normal registers providing an easy way of ad-
dressing and tracking data. When using any operation
on the indirect addressing register IAR0 or IAR1, it is ac-
tually the address specified 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 mp0,a
; setup memory pointer with first RAM address
loop:
clr IAR0
inc mp0
sdz block
jmp loop
; clear the data at address defined by MP0
; 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.10
12
November 5, 2008

Share Link: 

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