EM73963A is an advanced single chip CMOS 4-bit micro-controller. It contains 16K-byte ROM, 372-nibble
RAM, 4-bit ALU, 13-level subroutine nesting, 22-stage time base, two 12-bit timer/counters for the kernel
function. EM73963A also equipped with 5 interrupt sources, 3 I/O ports (including 1 input port and 2 bidirection
ports), LCD display (40x8), built-in sound generator.
It's low power consumption and high speedfeature are further strengten with DUAL, SLOW, IDLE and STOP
operation mode for optimized power saving.
FEATURES
Operation voltage: 2.4V to 5.5V.
Clock source: Dual clock system. Low-frequency oscillator is Crystal or RC oscillator (32KHz,
Oscillation frequency : 480K, 1M, 2M and 4M Hz are both available for high frequency clock by mask option.
Instruction set: 107 powerful instructions.
Instruction cycle time : Up to 2 µs for 4 MHz (high speed clock).
ROM capacity: 16K X 8 bits.
RAM capacity: 372 X 4 bits.
Input port: 1 port (P0.0-P0.3), IDLE/STOP releasing function is available by mask option.(each
Bidirection port: 2 ports (P4, P8). P4.0 and SOUND are available by mask option. IDLE/STOP release
12-bit timer/counter: Two 12-bit timer/counters are programmable for timer, event counter and pulse width
Built-in time base counter : 22 stages.
Subroutine nesting: Up to 13 levels.
LCD driver: 40 X 8 dots, 1/8 duty, 1/5 bias.
Sound effect: Tone generator, random generator and volume control.
Power saving function :SLOW, IDLE, STOP operation modes.
Package type: Chip form 69 pins.
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
connect a external resistor) by mask option and high-frequency oscillator is RC
oscillator (connect a external resistor and a capacitor).
External clock and internal clock is available by mask option.
244 µs for 32768 Hz (low speed clock).
input pin has a pull-up and pull-down resistor available by mask option).
function for P8(0..3) is available by mask option.
measurement mode.
Internal . . . . . . 2 Timer overflow interrupts.
1 Time base interrupt.
* This specification are subject to be changed without notice.
Subroutine call entry address
designated by [LCALL a]
instruction
0FFFh
1000h
Bank 1
1FFFh
Bank 2
Bank 3
* This specification are subject to be changed without notice.
Data table for
[LDAX],[LDAXI]
instruction
6.14.2001
3
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
User's program and fixed data are stored in the program ROM. User's program is executed using the PC value
to fetch an instruction code.
The 16Kx8 bits program ROM can be divided into 4 banks. There are 4Kx8 bits per bank.
The program ROM bank is selected by P3(1..0). The program counter is a 13-bit binary counter. The PC
and P3 are initialized to "0" during reset.
When P3(1..0)=00B, the bank0 and bank1 of program ROM will be selected. P3(1..0)=01B, the bank0 and
bank2 will be selected.
AddressP3=xx00BP3=xx01BP3=xx10B
0000h
:
:Bank0Bank0Bank0
0FFFh
1000h
:
:Bank1Bank2Bank3
1FFFh
PROGRAM EXAMPLE:
BANK 0
START::
:
:
LDIA#00H; set program ROM to bank1
OUTA P3
BXA1
:
XA ::
:
LDIA#01H; set program ROM to bank2
OUTA P3
BXB1
:
XB ::
:
LDIA#02H; set program ROM to bank3
OUTA P3
BXC1
:
Fixed data can be read out by table-look-up instruction. Table-look-up instruction requires the Data point
(DP) to indicate the ROM address in obtaining the ROM code data (Except bank 0) :
LDAXAcc
LDAXIAcc
←←
← ROM[DP]
←←
←←
← ROM[DP]
←←
L
,DP+1
H
DP is a 12-bit data register that stores the program ROM address as pointer for the ROM code data.
User has to initially load ROM address into DP with instructions "STADPL", and "STADPM, STADPH",
then to obtain the lower nibble of ROM code data by instruction "LDAX" and higher nibble by instruction
"LDAXI"
PROGRAM EXAMPLE: Read out the ROM code of address 1777h by table-look-up instruction.
LDIA #07h;
STADPL ; [DP]
STADPM ; [DP]
STADPH; [DP]
:
OUT #00H , P3 ; Set in bank 1
LDL #00h;
LDH #03h;
A total 372 - nibble data RAM is available from address 000 to 17Fh
Data RAM includes the zero page region, stacks and data area.
* This specification are subject to be changed without notice.
6.14.2001
5
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
Bank 0
Bank 1
Address
000h - 00Fh
010h - 01Fh
020h - 02Fh
:
:
:
0C0h - 0CFh
0D0h - 0DFh
0E0h - 0EFh
0F0h - 0F3h
100h - 10Fh
110h - 11Fh
:
:
:
160h - 16Fh
Increment
Level 0
Level 4
Level 8
Level 12
Zero-page
Level 1
Level 5
Level 9
Level 2
Level 6
Level 10
Increment
Level 3
Level 7
Level 11
170h - 17Fh
ZERO- PAGE:
From 000h to 00Fh is the zero-page location. It is used as the zero-page address mode pointer for the
instruction of "STD #k,y; ADD #k,y; CLR y,b; CMP k,y".
PROGRAM EXAMPLE: To wirte immediate data "07h" to RAM [03] and to clear bit 2 of RAM [0Eh].
STD #07h, 03h ; RAM[03] ← 07h
CLR 0Eh,2 ; RAM[0Eh]
← 0
2
STACK:
There are 13 - level (maximum) stack levels that user can use for subroutine (including interrupt and CALL).
User can assign any level be the starting stack by providing the level number to stack pointer (SP).
When an instruction (CALL or interrupt) is invoked, before enter the subroutine, the previous PC address is
saved into the stack. Until returned from those subroutines, the PC value is restored by the data saved in stack.
DATA AREA:
Except the area used by user's application, the whole RAM can be used as data area for storing and loading
general data.
ADDRESSING MODE
The 372 nibble data memory consists of two banks (bank 0 and bank 1). There are 244x4 bits (address
000h~0F3h) in bank 0 and 128x4 bits (address 100h~17Fh) in bank 1.
* This specification are subject to be changed without notice.
6.14.2001
6
EM73963A
R
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
The bank is selected by P9.3. When P9.3 is cleared to "0", the bank 0 is selected, when P9.3 is set to "1", the bank
1 is selected.
The data Memory consists of three Address mode, namely -
(1) Indirect addressing mode:
The address in the bank is specified by the HL registers.
P9.3HRLR
AM address
PROGRAM EXAMPLE: Load the data of RAM address "143h" to RAM address "023h".
The zero-page is in the bank 0 (address 000h~00Fh). The address is the lower 4 bits of the second byte in the
instruction field.
xxxxxxxx
instruction field
yyyy
RAM address
0
0000
yyyy
PROGRAM EXAMPLE: Write immediate "0Fh" to RAM address "005h".
STD #0Fh, 05h ; RAM[05h]← 0Fh
* This specification are subject to be changed without notice.
6.14.2001
7
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
PROGRAM COUNTER (16K ROM)
Program counter ( PC ) is composed by a 13-bit counter, which indicates the next executed address for the
program ROM instruction.
For BRANCH and CALL instructions, PC is changed by instruction indicating. PC only can indicate the address
from 0000h-1FFFh. The bank number is decided by P3.
Condition: SF=1; PC ← a ( branch condition satisified)
PCaaaaaaaaaaaa a
SF=0 ; PC ← PC + 3 ( branch condition not satisified )
PCOriginal PC value + 3
(2) Subroutine instruction:
SCALL a
Object code: 1110 nnnn
Condition : PC ← a ; a=8n+6 ; n=1..Fh ; a=86h, n=0
PC00000aaaaa aaa
LCALL a
Object code: 0100 0aaa aaaa aaaa
Condition: PC ← a
* This specification are subject to be changed without notice.
6.14.2001
8
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
PC00aaaaaaaaaa a
RET
Object code: 0100 1111
Condition: PC ← STACK[SP]; SP + 1
PCThe return address stored in stack
RT I
Object code: 0100 1101
Condition : FLAG. PC ← STACK[SP]; EI ← 1; SP + 1
PCThe return address stored in stack
(3) Interrupt acceptance operation:
When an interrupt is accepted, the original PC is pushed into stack and interrupt vector will be loaded into
PC,The interrupt vectors are as follows :
INT0 (External interrupt from P8.2)
PC00000000000 1 0
TRGA (Timer A overflow interrupt)
PC0000000000 1 1 0
TRGB (Time B overflow interrupt)
PC00000000 0 1 0 0 0
TBI (Time base interrupt)
PC00000000 0 1 0 1 0
INT1 (External interrupt from P8.0)
PC00000000 0 1 1 0 0
(4) Reset operation:
PC00000000000 0 0
(5) Other operations:
For 1-byte instruction execution: PC + 1
For 2-byte instruction execution: PC + 2
For 3-byte instruction execution: PC + 3
* This specification are subject to be changed without notice.
6.14.2001
9
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
ACCUMULATOR
Accumulator is a 4-bit data register for temporary data storage. For the arithematic, logic and comparative
opertion .., ACC plays a role which holds the source data and result.
FLAGS
There are three kinds of flag, CF ( Carry flag ), ZF ( Zero flag ), and SF ( Status flag ), these three 1-bit flags
are included by the arithematic, logic and comparative .... operation.
All flags will be put into stack when an interrupt subroutine is served, and the flags will be restored after
RTI instruction is executed.
(1) Carry Flag ( CF )
The carry flag is affected by the following operations :
a. Addition : CF as a carry out indicator, under addition operation, when a carry-out occures, the CF is "1",
likewise, if the operation has no carry-out, the CF is "0".
b. Subtraction : CF as a borrow-in indicator, under subtraction operation, when a borrow occures, the CF
is "0", likewise, if there is no borrow-in, the CF is "1".
c. Comparision: CF as a borrow-in indicator for Comparision operation as the same as subtraction
operation.
d. Rotation: CF shifts into the empty bit of accumulator for the rotation and holds the shift out data after
rotation.
e. CF test instruction : Under TFCFC instruction, the CF content is sent into SF then clear itself as "0".
Under TTSFC instruction, the CF content is sent into SF then set itself as "1".
(2) Zero Flag ( ZF )
ZF is affected by the result of ALU, if the ALU operation generates a "0" result, the ZF is "1",
likewise, the ZF is "0".
(3) Status Flag ( SF )
The SF is affected by instruction operation and system status.
a. SF is initiated to "1" for reset condition.
b. Branch instruction is decided by SF, when SF=1, branch condition is satisified, likewise,
when SF=0, branch condition is unsatisified.
PROGRAM EXAMPLE:
Check following arithematic operation for CF, ZF, SF
* This specification are subject to be changed without notice.
6.14.2001
10
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
ALU
The arithematic operation of 4 - bit data is performed in ALU unit . There are 2 flags that can be affected by
the result of ALU operation, ZF and SF. The operation of ALU is affected by CF only.
ALU STRUCTURE
ALU supported user arithematic operation functions, including Addition, Subtraction and Rotaion.
DATA BUS
ALU
ZF CF SF
ALU FUNCTION
(1) Addition:
ALU supports addition function with instructions ADDAM, ADCAM, ADDM #k, ADD #k,y .... .
The addition operation affects CF and ZF. Under addition operation, if the result is "0", ZF will be "1",
otherwise, ZF will be "0", When the addition operation has a carry-out, CF will be "1", otherwise, CF will
be "0".
ALU supports subtration function with instructions SUBM #k, SUBA #k, SBCAM, DECM.... The
subtraction operation affects CF and ZF, Under subtraction operation, if the result is negative, CF will be "0",
and a borrow out, otherwise, if the result is positive, CF will be "1". For ZF, if the result of subtraction
operation is "0", the ZF is "1", otherwise, ZF is "1".
* This specification are subject to be changed without notice.
6.14.2001
11
EM73963A
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
(3) Rotation:
There are two kinds of rotation operation, one is rotation left, the other is rotation right.
RLCA instruction rotates Acc value to left, shift the CF value into the LSB bit of Acc and the shift out data
will be hold in CF.
MSBLSB
ACC
CF
RRCA instruction operation rotates Acc value to right, shift the CF value into the MSB bit of Acc and the
shift out data will be hold in CF.
MSBLSB
ACC
CF
PROGRAM EXAMPLE: To rotate Acc clockwise(right) and shift a "1" into the MSB bit of Acc.
TTCFS; CF ← 1
RRCA; rotate Acc right and shift CF=1 into MSB.
HL REGISTER
HL register are two 4-bit registers, they are used as a pair of pointer for the of RAM memory address. They
are used as also 2 independent temporary 4-bit data registers. For certain instructions, L register can be a pointer
to indicate the pin number (Port4 only).
HL REGISTER STRUCTURE
3 2 1 0
H REGISTER
HL REGISTER FUNCTION
(1) HL register is used as a temporary register for instructions : LDL #k, LDH #k, THA, THL, INCL, DECL,
EXAL, EXAH.
3 2 1 0
L REGISTER
PROGRAM EXAMPLE:
LDL #05h;
LDH #0Dh;
(2) HL register is used as a poiner for the address of RAM memory for instructions : LDAM, STAM, STAMI... .
PROGRAM EXAMPLE: Store immediate data "#0Ah" into RAM of address 35h.
LDL #5h;
LDH #3h;
STDMI #0Ah; RAM[35] ← Ah
* This specification are subject to be changed without notice.
Load immediate data "5h" into L register, "0Dh" into H register.
6.14.2001
12
Loading...
+ 26 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.