
Arithmetic and Logic Unit
-
ALU
The arithmetic-logic unit or ALU is a critical area of the microcontroller that carries out arithmetic
and logic operations of the instruction set. Connected to the main microcontroller data bus the
ALU receives related instruction codes and performs the required arithmetic or logical operations
after which the result will be placed in the specified register. As these ALU calculation or opera-
tions may result in Carry, borrow or other status changes, the status register will be correspond-
ingly updated to reflect these changes. The ALU supports the following functions:
·
Arithmetic operations ADD, ADDM, ADC, ADCM, SUB, SUBM, SBC, SBCM, DAA
·
Logic operations AND, OR, XOR, ANDM, ORM, XORM, CPL, CPLA
·
Rotation RRA, RR, RRCA, RRC, RLA, RL, RLCA, RLC
·
Increment and Decrement INCA, INC, DECA, DEC
·
Branch decision, JMP, SZ, SZA, SNZ, SIZ, SDZ, SIZA, SDZA, CALL, RET, RETI
Program Memory
The Program Memory is the location where the user code or program is stored. For
microcontrollers, two types of Program Memory are usually supplied. The first type is the One-
Time Programmable (OTP) Memory where users can program their application code into the de-
vice. Devices with OTP memory are denoted by having an
²
R
²
within their device name. By using
the appropriate programming tools, OTP devices offer users the flexibility to freely develop their
applications which may be useful during debug or for products requiring frequent upgrades or pro-
gram changes. OTP devices are also applicable for use in applications that require low or medium
volume production runs. The other type of memory is the mask ROM memory, denoted by having
a
²
C
²
within the device name. These devices offer the most cost effective solutions for high vol-
ume products.
Organization
The Program Memory has a capacity of 0.5K by 14, 1K by 14 or 2K by 14 bits and is the location
where the user program is stored. The Program Memory is addressed by the Program Counter
and also contains data, table information and interrupt entries. Table data, which can be setup in
any location within the Program Memory, is addressed by a separate table pointer register.
The following diagram shows the Program Memory structure for the Cost-Effective I/O Type
microcontroller:
14
Cost-Effective I/O Type MCU
P r o g r a m C o u n t e r
S t a c k L e v e l 1
S t a c k L e v e l 2
P r o g r a m M e m o r y
T o p o f S T A C K
S t a c k
P o i n t e r
B o t t o m o f S T A C K
Summary of Contents for HT48R05A-1
Page 7: ...vi Cost Effective I O Type MCU...
Page 8: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Page 9: ...2 Cost Effective I O Type MCU...
Page 52: ...P a r t I I Programming Language Part II Programming Language 45...
Page 53: ...46 Cost Effective I O Type MCU...
Page 59: ...52 Cost Effective I O Type MCU...
Page 90: ...P a r t I I I Development Tools Part III Development Tools 83...
Page 91: ...84 Cost Effective I O Type MCU...
Page 101: ...94 Cost Effective I O Type MCU...
Page 104: ...Appendix Appendix 97...
Page 105: ...98 Cost Effective I O Type MCU...
Page 115: ...108 Cost Effective I O Type MCU...
Page 116: ...A p p e n d i x B Package Information Appendix B Package Information 109 B...
Page 123: ...116 Cost Effective I O Type MCU...
Page 125: ...Amendments...