HT46RU22 Holtek Semiconductor Inc., HT46RU22 Datasheet - Page 8
![no-image](/images/no-image-200.jpg)
HT46RU22
Manufacturer Part Number
HT46RU22
Description
Ht46ru22 -- A/d Type 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
1.HT46RU22.pdf
(60 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Stack Register - STACK
This is a special part of the memory which is used to
save the contents of the program counter (PC) only. The
stack is organized into 6 levels and is neither part of the
data nor part of the program space, and is neither read-
able nor writeable. The activated level is indexed by the
stack pointer (SP) and is neither readable nor writeable.
At a subroutine call or interrupt acknowledgment, the
contents of the program counter are pushed onto the
stack. At the end of a subroutine or an interrupt routine,
signaled by a return instruction (RET or RETI), the pro-
gram counter is restored to its previous value from the
stack. After a chip reset, the SP will point to the top of the
stack.
If the stack is full and a non-masked interrupt takes
place, the interrupt request flag will be recorded but the
acknowledgment will be inhibited. When the stack
pointer is decremented (by RET or RETI), the interrupt
will be serviced. This feature prevents stack overflow al-
lowing the programmer to use the structure more easily.
In a similar case, if the stack is full and a CALL is sub-
sequently executed, stack overflow occurs and the first
entry will be lost (only the most recent 6 return ad-
dresses are stored).
Data Memory - RAM
The data memory is designed with 92 8 bits. The data
memory is divided into two functional groups: special
function registers and general purpose data memory
(64 8). Most are read/write, but some are read only.
The remaining space before the 40H is reserved for fu-
ture expanded usage and reading these locations will
get 00H . The general purpose data memory, ad-
dressed from 40H to 7FH, is used for data and control
information under instruction commands. All of the data
memory areas can handle arithmetic, logic, increment, dec-
rement and rotate operations directly. Except for some dedi-
cated bits, each bit in the data memory can be set and reset
by SET [m].i and CLR [m].i . They are also indirectly
accessible through memory pointer register (MP;01H).
Indirect Addressing Register
Location 00H is an indirect addressing register that is
not physically implemented. Any read/write operation of
[00H] accesses data memory pointed to by MP (01H).
Reading location 00H itself indirectly will return the re-
sult 00H. Writing indirectly results in no operation.
The memory pointer register MP (01H) is a 7-bit register.
The bit 7 of MP is undefined and reading will return the
result 1 . Any writing operation to MP will only transfer
the lower 7-bit data to MP.
Rev. 1.20
8
Accumulator
The accumulator is closely related to ALU operations. It
is also mapped to location 05H of the data memory and
can carry out immediate data operations. The data
movement between two data memory locations must
pass through the accumulator.
RAM Mapping
HT46RU22
March 23, 2007