Rev. 1.10
20
November 04, 2019
Rev. 1.10
21
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
If the stack is overflow, the first Program Counter save in the stack will be lost.
Stack
Pointer
Stack Level 2
Stack Level 1
Stack Level 3
:
:
:
Stack Level 6
Program
Memory
Program Counter
Bottom of Stack
Top of Stack
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 operations may
result in carry, borrow or other status changes, the status register will be correspondingly 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
Flash Program Memory
The Program Memory is the location where the user code or program is stored. For the device the
Program Memory is Flash type, which means it can be programmed and re-programmed a large
number of times, allowing the user the convenience of code modification on the same device. By
using the appropriate programming tools, the Flash device offers users the flexibility to conveniently
debug and develop their applications while also offering a means of field programming and
updating.
Structure
The Program Memory has a capacity of 4K×15 bits. 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.