sh6614d SinoWealth Micro-Electronics Corp. Ltd, sh6614d Datasheet - Page 6

no-image

sh6614d

Manufacturer Part Number
sh6614d
Description
4k 4-bit Microcontroller With Lcd Driver
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:
(1) When executing a jump instruction (such as JMP, BA0,
(2) When executing a subroutine call instruction (CALL),
(3) When an interrupt occurs,
(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 be set at 1-bit page register for higher than 2K. Program
Counter can only address a 4K of program ROM.
1.2. ALU and CY
The ALU performs arithmetic and logic operations.
It provides the following functions:
Binary addition/subtraction
(ADC, SBC, ADD, SUB, ADI, SBI)
2. ROM
SH6614D can address 4096 × 16 bit of program area $000 to $FFF. There is an area from addresses $000 through $004 that is
reserved for special interrupts service routines such as starting vector address.
BC),
Address
000H
001H
002H
003H
004H
JMP Instruction
JMP Instruction
JMP Instruction
JMP Instruction
JMP Instruction
Instruction
Jump to Base Timer service routine
Jump to RESET service routine
Jump to Timer0 service routine
Jump to INT0 service routine
Jump to INT1 service routine
6
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 is pushed into stack
and restored from stack by RTNI. It 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 the ALU, data
transfers between the accumulator and system register, LCD
RAM, or data memory can be performed.
1.4. Stack
This group of registers is used to save the contents of CY &
PC (11 - 0) sequentially with each subroutine call or interrupt.
It is organized 13 bits X 4 levels. The MSB is saved for CY.
Four 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 interrupts requests. Note that program
execution may enter an abnormal state if the number of calls
and interrupt requests exceeds 4, where then the bottom of
stack will be shifted out.
Function
SH6614D

Related parts for sh6614d