W921E400A/W921C400
4-BIT MICROCONTROLLER
Table of Contents-
1. GENERAL DESCRIPTION .........................................................................................................................3
2. FEATURES.................................................................................................................................................3
3. PIN CONFIGURATION ...............................................................................................................................5
4. PIN DESCRIPTION.....................................................................................................................................6
5. BLOCK DIAGRAM ......................................................................................................................................7
6. FUNCTION DESCRIPTION........................................................................................................................8
6.1 ROM Memory Map ..............................................................................................................................8
6.2 RAM Memory Map...............................................................................................................................9
6.2.1 Special Control Register Area ....................................................................................................9
6.2.2 Stack Register Area .................................................................................................................11
6.2.3 Working Register Area.............................................................................................................12
6.3 Internal Oscillator Circuit.....................................................................................................................12
6.4 Initial State .........................................................................................................................................13
6.5 Input/Output........................................................................................................................................13
6.5.1 Normal/Special function selection of I/O...................................................................................14
6.5.2 Pull High and Open Drain Control of I/O ..................................................................................15
6.6 Serial Port ..........................................................................................................................................18
6.7 DTMF Generator................................................................................................................................20
6.8 Beep Tone Generator ........................................................................................................................22
6.9 Comparator........................................................................................................................................22
6.10 Timer/Counter ..................................................................................................................................24
6.10.1 TM0.......................................................................................................................................24
6.10.2 TM2.......................................................................................................................................26
6.10.3 TM3.......................................................................................................................................28
6.10.4 Arbitrary Waveform Generator ...............................................................................................29
6.11 Interrupt............................................................................................................................................30
6.11.1 Interrupt Control Register.......................................................................................................30
6.11.2 Interrupt Enable Flag .............................................................................................................31
-1-
Publication Release Date: July 1998
Revision A3
W921E400A/W921C400
6.12 Operating Mode ...............................................................................................................................31
6.12.1 Normal Mode: ........................................................................................................................31
6.12.2 Hold Mode: ............................................................................................................................31
6.12.3 Stop Mode: ............................................................................................................................34
6.13 Initial Condition Register of EPROM Program Method .....................................................................36
6.14 Reset.................................................................................................................................................36
6.14.1 Reset by
RESET
.....................................................................................................................36
6.14.2 Reset by Watch Dog Timer .....................................................................................................36
7. ABSOLUTION MAXIMUM RATINGS .......................................................................................................37
8. ELECTRICAL CHARACTERISTICS.........................................................................................................37
8.1 DC Characteristics .............................................................................................................................37
8.2 AC Characteristics .............................................................................................................................40
9. ADDRESSING MODE ..............................................................................................................................42
9.1 ROM Addressing Mode......................................................................................................................42
9.1.1 Indirect Call Addressing Mode: (1 word/2 cycles) .....................................................................42
9.1.2 Long Call/Jump Addressing Mode: (2 words/2 cycles)..............................................................42
9.2 RAM Addressing Mode ......................................................................................................................42
9.2.1 Direct Addressing Mode: (2 words/2 cycles) .............................................................................43
9.2.2 Indirect Addressing Mode: (1 word / 1 cycle) ............................................................................43
9.2.3 Working Register Addressing Mode: (1 word / 1 cycle).............................................................43
9.3 Look-up Table Addressing Mode (1 word/2 cycles) ...........................................................................43
10. INSTRUCTION CODE MAP ...................................................................................................................45
11. INSTRUCTION SET SUMMARY ............................................................................................................48
12. PACKAGE DIMENSIONS........................................................................................................................52
28-pin DIP .................................................................................................................................................52
28-pin SOP ...............................................................................................................................................52
-2-
W921E400A/W921C400
1. GENERAL DESCRIPTION
The W921E400A/W921C400 is a single-chip CMOS 4-bit microcontroller that is a subset of
W921E880A/W921C880. It features a 4-bit ALU, three multi-function timers, one channel DTMF
generator, a beep tone generator, a serial I/O port and built in four by one channel comparator circuit,
thus it can be easily implemented as telephone processor. Using the serial transmit/receive function,
the W921E400A/W921C400 series can interface with Winbond LCD driver IC by the serial control
circuit. There are also seven interrupt sources and 48-level subroutine nesting for interrupt
applications.
The W921E400A/W921C400 have two power reduction modes, hold mode and stop mode, which
help to minimize power dissipation. This product is a powerful microcontroller for telephone
processor, remote controllers, multiple I/O products, keyboard controllers, speech synthesis LSI
controllers, and other products with few components.
2. FEATURES
Operating Voltage
•
2.8 to 5.5V operating voltage for W921E400A EPROM TYPE
•
2.4 to 5.5V operating voltage for W921C400 MASK ROM TYPE
Operating Frequency
•
Crystal or RC for main system clock:
−
Crystal for 400K, 800K, 2M, 3.58M, 4 MHz
−
RC up to 4 MHz
Memory
•
4K
×
10-bit ROM (super EPROM):
•
512
×
4-bit RAM:
−
−
−
−
64
×
4-bit special register
16
×
4-bit working register
128
×
4-bit general register
304
×
4-bit multi-purpose register
Stack
•
8-bit stack pointer
I/O Pins
•
13 bidirectional and individually controllable I/O lines:
−
P2 Port: P2.0 to P2.1 large sink current pins and open drain option
−
P3 Port: P3.0 to P3.3 multi-function I/O
−
P4 Port: P4.2 to P4.3 open drain and pull high resistor option, multi-function I/O
−
P5 Port: P5.1 multi-function I/O
−
P6 Port: P6.0 to P6.3 open drain and pull high resistor option, multi-function I/O
•
8 bidirectional I/O lines:
−
PA Port: PA.0 to PA.3 open drain and pull high resistor option
−
PB Port: PB.0 to PB.3 open drain and pull high resistor option
-3-
Publication Release Date: July 1999
Revision A3
W921E400A/W921C400
Serial I/O Interface
•
Clock synchronous multi-nibbles serial transmitter/receiver interface
DTMF Generator
•
One channel DTMF generator
Beep Tone Generator
•
4 frequencies (2K, 1K, 630, 520 Hz) software selectable beep tone generator
Voltage Comparator
•
Multiplexed four channel voltage comparator
Timer/Counter
•
Timer 0: 2 to 19 order divider, auto-reload timer, watch-dog timer
•
Timer 2: 2 to 19 order divider, auto-reload timer, arbitrary waveform generator, period/pulse width
measurement function
•
Timer 3: 2 to 19 order divider, auto-reload timer
Interrupt
•
Two external sources: INT0 (P4.3), P4 Port (P4.2)
•
Five internal sources: Timer 0, Timer 2, Timer 3, Comparator, Serial Port
Operating Mode (System Clock)
•
Normal mode: System clock operating
•
HOLD mode: No operation except for oscillator (system clock stops only)
•
STOP mode: No operation including oscillator
Addressing Mode
•
ROM: Indirect call addressing mode
Long jump/call addressing mode
•
RAM: Direct addressing mode
Indirect addressing mode
Working register addressing mode
•
Look-up table addressing mode
Instruction Sets
•
117 instruction sets
Package Type
•
28-pin DIP, 28-pin SOP
-4-
W921E400A/W921C400
3. PIN CONFIGURATION
PIN NAME
P2.0
P2.1
P3.0/ANI0
P3.1/ANI1
P3.2/ANI2
P3.3/ANI3
P4.2
P4.3/INT0
P5.1/TM2
P6.0/WDATA
P6.1/WCLK
P6.2/RDATA
V
SS
P6.3/RCLK
DIP28 (OR SOP28)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PIN NAME
PA.0
PA.1
PA.2
PA.3
PB.0
PB.1
PB.2
PB.3
BTG
DTMF
RESET
OSCO
DIP28 (OR SOP28)
15
16
17
18
19
20
21
22
23
24
25
26
27
28
OSCI
V
DD
15
W921E400A
/ W921C400
1
-5-
Publication Release Date: July 1999
Revision A3