sh6616 SinoWealth Micro-Electronics Corp. Ltd, sh6616 Datasheet - Page 3

no-image

sh6616

Manufacturer Part Number
sh6616
Description
16k 4-bit Microcontroller
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
Functional Description
1. CPU
The CPU core contains the following function blocks:
Program Counter, ALU, Carry Flag, Accumulator, Table
Branch Register (TBR), Data Pointer (INX, DPH, DPM and
DPL), and Stack.
1.1. PC (Program Counter)
The PC is used for ROM addressing consisting of 12-bits:
Page Register (PC11),
and Ripple Carry Counter (PC10 - PC0).
The program counter normally increases by one (+1) with
each execution of an instruction except in the following
cases:
Program Counter can only address a 4K program ROM. To
address 24K program ROM, use bank switch (Refer to the
ROM description in Section 3 for details).
1.2. ALU and CY
ALU performs arithmetic and logic operations.
The ALU provides the following functions:
2. RAM
RAM consists of general purpose data memory, LCD
RAM, and system registers.
2.1
Data memory and system register can be accessed in one
instruction by direct addressing.
Following is the memory allocation map:
$000 - $01F: System register and I/O (32 X 4 bits)
$020 - $1FF: Data Memory (480 X 4 bits)
$200 - $2FF: Reserved
$300 - $383: LCD RAM space (132 X 4 bits)
(1) When executing a jump instruction (such as JMP, BA0,
(2) When executing a subroutine call instruction (CALL);
(3) When an interrupt occurs; and,
(4) When the chip is at INITIAL RESET. The program
.
counter is loaded with data corresponding to each
instruction. The unconditional jump instruction (JMP) can
set an 1-bit page register for higher than 2K.
BC);
RAM Addressing
3
Binary addition/subtraction
(ADC, SBC, ADD, SUB, ADI, SBI)
Decimal adjustment for addition/subtraction (DAA, DAS)
Logic operations (AND, EOR, OR, ANDI, EORI, ORI)
Decision (BA0, BA1, BA2, BA3, BAZ, BC)
The Carry Flag (CY) holds the arithmetic operation ALU
overflow.
During interrupt or call instruction, carry flag is pushed into
stack and restored from stack by RTNI. The carry flag is
unaffected by an RTNW instruction.
1.3. Accumulator
The accumulator is a 4-bit register holding the results of the
arithmetic logic unit. In conjunction with ALU, data transfers
between the accumulator and system registers, LCD RAM,
or data memory can be performed.
1.4. Stack
A group of registers are used to save the contents of CY &
PC (10-0) sequentially with each subroutine call or interrupt.
It is organized as 13 bits
CY. 4 levels are the maximum allowed for subroutine calls
and interrupts.
The contents of Stack are returned sequentially to the PC
with the return instructions (RTNI/RTNW). Stack is operated
on a first-in, last-out basis. This 4-level nesting includes both
subroutine calls and interrupt requests. Note that program
execution may enter an abnormal state if the number of calls
and interrupt requests exceeds 4, and the bottom of stack
will be shifted out.
2.2. Data Memory
Data memory is organized as 480 X 4 bits ($020 - $1FF).
Because of its static nature, the RAM can retain data after
the CPU enters STOP or HALT.
× 4 levels. The MSB is saved for
×
SH6616

Related parts for sh6616