HT49R30A-1/HT49C30-1/HT49C30L
Rev. 1.10
10
September 25, 2002
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 four return addresses are stored).
Data memory
RAM
The data memory (RAM) is designed with 113 8 bits,
and is divided into two functional groups, namely special
function registers and general purpose data memory,
most of which are readable/writeable, although some
are read only.
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
Accumulator (ACC;05H), a Program counter
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 coun-
ter (TMR;0DH), a timer/event counter control register
(TMRC;0EH), I/O registers (PA;12H, PB;14H), and In-
terrupt control register 1 (INTC1;1EH). On the other
hand, the general purpose data memory, addressed
from 20H to 7FH, is used for data and control informa-
tion under instruction commands.
The areas in the RAM can directly handle arithmetic,
logic, increment, decrement, and rotate operations. Ex-
cept some dedicated bits, each bit in the RAM can be
set and reset by SET [m].i and CLR [m].i They are
also indirectly accessible through the Memory pointer
register 0 (MP0;01H) or the Memory pointer register 1
(MP1;03H).
Indirect addressing register
Location 00H and 02H are indirect addressing registers
that are not physically implemented. Any read/write op-
eration of [00H] and [02H] accesses the RAM pointed to
by MP0 (01H) and MP1(03H) respectively. Reading lo-
cation 00H or 02H indirectly returns the result 00H.
While, writing it indirectly leads to no operation.
The function of data movement between two indirect ad-
dressing registers is not supported. The memory pointer
registers, MP0 (7-bit) and MP1 (7-bit), used to access
the RAM by combining corresponding indirect address-
ing registers. MP0 can only be applied to data memory,
while MP1 can be applied to data memory and LCD dis-
play memory.
Accumulator
ACC
The accumulator (ACC) is related to the ALU opera-
tions. It is also mapped to location 05H of the RAM and
is capable of operating with immediate data. The data
movement between two data memory locations must
pass through the ACC.
Arithmetic and logic unit
ALU
This circuit performs 8-bit arithmetic and logic opera-
tions and provides the following functions:
Arithmetic operations (ADD, ADC, SUB, SBC, DAA)
Logic operations (AND, OR, XOR, CPL)
Rotation (RL, RR, RLC, RRC)
Increment and Decrement (INC, DEC)
Branch decision (SZ, SNZ, SIZ, SDZ etc.)
= '
#
# '
,
7 6 5 ' *
9
= '
#
# '
,
( ( 4
(
4
(
4
(
4
(
4
( 3 4
( 5 4
( 0 4
( 2 4
( 6 4
( # 4
( * 4
(
4
(
4
(
4
( . 4
( 4
4
4
4
4
3 4
5 4
0 4
2 4
6 4
# 4
* 4
4
4
4
. 4
0 . 4
@ ' !
D
'
' E ( E
( 4
(
' #
'
' (
' #
'
'
*
#
$
* $
* $ 4
#
!
(
#
*
RAM mapping