BS2824 Holtek Semiconductor Inc., BS2824 Datasheet - Page 15

no-image

BS2824

Manufacturer Part Number
BS2824
Description
Touch Key Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Rev. 1.00
Arithmetic and Logic Unit - ALU
Program Memory
Structure
If the stack is full and an enabled interrupt takes place, the interrupt request flag will be recorded but
the acknowledge signal will be inhibited. When the Stack Pointer is decremented, by RET or RETI,
the interrupt will be serviced. This feature prevents stack overflow allowing the programmer to use
the structure more easily. However, when the stack is full, a CALL subroutine instruction can still be
executed which will result in a stack overflow. Precautions should be taken to avoid such cases
which might cause unpredictable program branching.
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:
The Program Memory is the location where the user code or program is stored. The device is
supplied with One-Time Programmable, OTP, memory where users can program their application
code into the device. 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 program changes.
The Program Memory has a capacity of 2K 15 or 4K 15. 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 separate table pointer
registers.
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 Structure
15
BS2824/BS2854/BS2868
Touch Key MCU
January 27, 2010

Related parts for BS2824