HT46CU66 HOLTEK [Holtek Semiconductor Inc], HT46CU66 Datasheet - Page 10

no-image

HT46CU66

Manufacturer Part Number
HT46CU66
Description
A/D Type 8-Bit MCU with LCD
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Stack Register - STACK
The stack register is a special part of the memory used
to save the contents of the program counter. The stack
is organized into 16 levels and is neither part of the data
nor part of the program, and is neither readable nor
writeable. Its activated level is indexed by a stack
pointer, known as SP, which is neither readable nor
writeable. At the start of a subroutine call or an interrupt
acknowledgment, the contents of the program counter
is pushed onto the stack. At the end of the subroutine or
interrupt routine, signaled by a return instruction, RET or
RETI, the contents of the program counter is restored to
its previous value from the stack. After a device reset,
the stack pointer will point to the top of the stack.
If the stack is full and a non-masked interrupt takes
place, the interrupt request flag is recorded but the ac-
knowledge signal is still inhibited. Once the SP is decre-
mented, using an RET or RETI instruction, the interrupt
is serviced. This feature prevents stack overflow, allow-
ing the programmer to use the structure easily. Like-
wise, if the stack is full, and a CALL is subsequently
executed, a stack overflow occurs and the first entry is
lost as only the most recent 16 return addresses are
stored.
Data Memory - RAM
The Data Memory, RAM, has a structure of 620 8 bits,
and is divided into two functional groups, namely; spe-
cial function registers, 44 8 bits, and general purpose
data memory (Bank 0: 192 8 bits, Bank 2: 192 8 bits
Rev. 1.20
Location 018H
This area is reserved for the Multi-function interrupt
service program. If a timer interrupt results from a
Timer/Event Counter 2 overflow, or the real time clock
time out, or Time base time out, and if the interrupt is
enabled and the stack is not full, the program will jump
to this location and begin execution.
Table location
Any location in the Program Memory can be used as a
look-up table. The instructions TABRDC [m] (page
specified by the TBHP) for the current page, 1
page=256 words) and TABRDL [m] (the last page),
transfer the contents of the lower-order byte to the
specified data memory, and the contents of the
higher-order byte to the TBLH register. This is the Ta-
ble Higher-order byte register (08H). Only the destina-
tion of the lower-order byte in the table is well-defined,
the other bits of the table word are all transferred to
the lower portion of the TBLH. The TBLH is read only,
the higher-order byte table pointer TBHP (1FH) and
the table pointer, TBLP, is a read/write register (07H),
indicating the table location. Before accessing the ta-
ble, the location should be placed in the TBHP and
TBLP registers. All the table related instructions re-
quire 2 cycles to complete the operation. These areas
may function as a normal Program Memory depend-
ing upon the user s requirements.
10
RAM Mapping
HT46RU66/HT46CU66
October 2, 2007

Related parts for HT46CU66