HT46R47
Rev. 1.40
9
July 18, 2001
clock setting register (ACSR;23H), I/O regis-
ters (PA;12H, PB;14H, PD;18H) and I/O con-
trol registers (PAC;13H, PBC;15H, PDC;19H).
The remaining space before the 40H is re-
served for future expanded usage and reading
these locations will get "00H". The general
purpose data memory, addressed from 40H to
7FH, is used for data and control information
under instruction commands.
All of the data memory areas can handle arith-
metic, 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 memory
pointer register (MP;01H).
Indirect addressing register
Location 00H is an indirect addressing register
that is not physically implemented. Any
read/writeoperationof[00H]accessesdatamem-
orypointedtobyMP(01H).Readinglocation00H
itself indirectly will return the result 00H. Writ-
ing 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
willreturntheresult 1 .Anywritingoperationto
MPwillonlytransferthelower7-bitdatatoMP.
Accumulator
The accumulator is closely related to ALU oper-
ations. 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.
Arithmetic and logic unit
ALU
This circuit performs 8-bit arithmetic and logic
operations. The ALU provides the following func-
tions:
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 ....)
The ALU not only saves the results of a data op-
eration but also changes the status register.
Status register
STATUS
This 8-bit register (0AH) contains the zero flag
(Z), carry flag (C), auxiliary carry flag (AC),
overflow flag (OV), power down flag (PD), and
watchdog time-out flag (TO). It also records the
/ # % 0 & ', " / ) $ #
- 2 0 " # % .2 2 " # $ $ 0 - * # * 0 $ . # "
B - , $ # 2
# & 2 & $ C C
4 # - # " & ', " / ) $ #
91 . # $ :
RAM mapping