HT46R64 Holtek Semiconductor Inc., HT46R64 Datasheet - Page 9

no-image

HT46R64

Manufacturer Part Number
HT46R64
Description
Ht46r64/ht46c64 -- A/d With Lcd Type 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT46R64
Manufacturer:
Bussmann
Quantity:
25 000
Part Number:
HT46R64
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
Company:
Part Number:
HT46R64
Quantity:
9 000
Company:
Part Number:
HT46R64
Quantity:
18
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 8 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 (SP) and is neither readable nor writeable. At the
start of a subroutine call or an interrupt acknowledg-
ment, 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 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 is recorded but the ac-
knowledgment is still inhibited. Once the SP is decre-
mented (by RET or RETI), the interrupt is serviced. This
feature prevents stack overflow, allowing the program-
mer to use the structure easily. Likewise, if the stack is
full, and a ²CALL² is subsequently executed, a stack
overflow occurs and the first entry is lost (only the most
recent sixteen return addresses are stored).
Data Memory - RAM
The data memory (RAM) is designed with 224´8 bits,
and is divided into two functional groups, namely; spe-
cial function registers 32´8 bit and general purpose data
memory, 192´8 bit most of which are readable/writable,
although some are read only. The special function regis-
ter are overlapped in any banks.
Of the two types of functional groups, the special func-
tion registers consist of an Indirect addressing register 0
(00H), a Memory pointer register 0 (MP0;01H), an Indi-
rect addressing register 1 (02H), a Memory pointer reg-
ister 1 (MP1;03H), a Bank pointer (BP;04H), an
A ccu m ul at or ( AC C; 05 H ), a Pro gram co un te r
lower-order byte register (PCL;06H), a Table pointer
(TBLP;07H), a Table higher-order byte register
(TBLH;08H), a Real time clock control register
(RTCC;09H), a Status register (STATUS;0AH), an Inter-
rupt control register 0 (INTC0;0BH), a Timer/Event
Counter 0 (TMR0; 0DH), a Timer/Event Counter 0 con-
trol register (TMR0C;0EH), a Timer/Event Counter 1
(TMR1H:0FH;TMR1L:10H), a Timer/Event Counter 1
control register (TMR1C; 11H), Interrupt control register
1 (INTC1;1EH), PWM data register (PWM0;1AH,
PWM1;1BH, PWM2;1CH, PWM3;1DH), the A/D result
lower-order byte register (ADRL;24H), the A/D result
higher-order byte register (ADRH;25H), the A/D control
register (ADCR;26H), the A/D clock setting register
(ACSR;27H), I/O registers (PA;12H, PB;14H, PD;18H)
and I/O control registers (PAC;13H, PBC;15H,
PDC;19H). The remaining space before the 40H is re-
served for future expanded usage and reading these lo-
cations will get ²00H². The space before 40H is
Rev. 1.80
9
overlapping in each bank. The general purpose data
memory, addressed from 40H to FFH, is used for data
and control information under instruction commands. All
of the data memory areas can handle arithmetic, logic,
increment, decrement and rotate operations directly.
Except for some dedicated 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 mem-
ory pointer registers (MP0;01H/MP1;03H). The space
before 40H is overlapping in each bank.
RAM Mapping
HT46R64/HT46C64
February 14, 2006

Related parts for HT46R64