User Manual

INTEGRATED API4000M SERIES
CIRCUITS INC. VOICE OTP MODULE
3
Functional Description
A. Micro–Controller
The Micro-Controller inside API4000M is a 8Bit Processor, it has 2 groups Data Bank each has 16 X 8
Bit Register, the Function for processing Data: Addition , Subtraction , logical AND , Moving , Shift and
the other Basic Function. It also has Address Jump , Data Input , Data Output , Sound Control , Melod
yControl and the other Advanced Function.
Here is the list of 42 instruction in API4000M, each instruction has its Format and Description.
1. JUMP
Instruction Format Code Cycle Bytes
Instruction
Description
JUMP INTR1, Pn
01 2 3
if INTR1 = 1, Program Address(PC) will jump to Pn.
JUMP INTR2, Pn
02 2 3
if INTR2 = 1, Program Address (PC)will jump to Pn.
JUMP INTR3, Pn
03 2 3
if INTR3 = 1, Program Address (PC)will jump to Pn.
JUMP INTR4, Pn
04 2 3
if INTR4 = 1, Program Address(PC) will jump to Pn.
JUMP ADDR, Pn
05 2 3 Program Address(PC) direct jump to Pn.
JUMP CO0, Pn
06 2 3
if carry out = 0,Program Address(PC) will jump to Pn.
JUMP CO1, Pn
07 2 3
if carry out = 1,Program Address(PC) will jump to Pn.
PS :
(1). Code : Code of instruction.
(2). Cycle : Time to executive instruction, 1Cycle = 64 clock period.
(3). Bytes : Size of instruction, 1 Byte = 8 Bits.
(4). Pn Address in Program, e.g. P123n = 0 ~ 9999.
(5). INTR1 Key In signal.
(6). INTR2 Song End signal.
(7). INTR3 Sound End signal.
(8). INTR4 Change Instrument signal.
2. Register & Data
Instruction Format Code Cycle Bytes Instruction Description
ADDC Rn, Data
6n 1 2
The value of Rn adds Data,only set Carry but don’t
change the value of Rn. ( Rn + Data ÎC=?)
ADDD Rn, Data
7n 1 2 Rn ÍRn + Data
ANDD Rn, Data
4n 1 2
The value of Rn logical AND Data,set the solution
to Rn. ( Rn Í Rn AND Data)
MOVD Rn, Data
5n 1 2 set Rn Í Data.
SUBDC Rn, Data
En 1 2
The value of Rn subduct Data, only return Carry
but don’t change the value of Rn.(Rn-DataÎC?)
SUBD Rn, Data
Fn 1 2 Rn Í Rn - Data
PS :
(1). Rn Number of Register,e.g. R3n = 0 ~ 15.
(2). Data a decimal value during 0 ~ 255.