ChipFind - документация

Электронный компонент: HD404618

Скачать:  PDF   ZIP

Document Outline

Regarding the change of names mentioned in the document, such as Hitachi
Electric and Hitachi XX, to Renesas Technology Corp.
The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas
Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog
and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.)
Accordingly, although Hitachi, Hitachi, Ltd., Hitachi Semiconductors, and other Hitachi brand
names are mentioned in the document, these names have in fact all been changed to Renesas
Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and
corporate statement, no changes whatsoever have been made to the contents of the document, and
these changes do not constitute any alteration to the contents of the document itself.
Renesas Technology Home Page: http://www.renesas.com
Renesas Technology Corp.
Customer Support Dept.
April 1, 2003
To all our customers
Cautions
Keep safety first in your circuit designs!
1. Renesas Technology Corporation puts the maximum effort into making semiconductor products better
and more reliable, but there is always the possibility that trouble may occur with them. Trouble with
semiconductors may lead to personal injury, fire or property damage.
Remember to give due consideration to safety when making your circuit designs, with appropriate
measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or
(iii) prevention against any malfunction or mishap.
Notes regarding these materials
1. These materials are intended as a reference to assist our customers in the selection of the Renesas
Technology Corporation product best suited to the customer's application; they do not convey any
license under any intellectual property rights, or any other rights, belonging to Renesas Technology
Corporation or a third party.
2. Renesas Technology Corporation assumes no responsibility for any damage, or infringement of any
third-party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or
circuit application examples contained in these materials.
3. All information contained in these materials, including product data, diagrams, charts, programs and
algorithms represents information on products at the time of publication of these materials, and are
subject to change by Renesas Technology Corporation without notice due to product improvements or
other reasons. It is therefore recommended that customers contact Renesas Technology Corporation
or an authorized Renesas Technology Corporation product distributor for the latest product information
before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corporation assumes no responsibility for any damage, liability, or other loss
rising from these inaccuracies or errors.
Please also pay attention to information published by Renesas Technology Corporation by various
means, including the Renesas Technology Corporation Semiconductor home page
(http://www.renesas.com).
4. When using any or all of the information contained in these materials, including product data, diagrams,
charts, programs, and algorithms, please be sure to evaluate all information as a total system before
making a final decision on the applicability of the information and products. Renesas Technology
Corporation assumes no responsibility for any damage, liability or other loss resulting from the
information contained herein.
5. Renesas Technology Corporation semiconductors are not designed or manufactured for use in a device
or system that is used under circumstances in which human life is potentially at stake. Please contact
Renesas Technology Corporation or an authorized Renesas Technology Corporation product distributor
when considering the use of a product contained herein for any specific purposes, such as apparatus or
systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use.
6. The prior written approval of Renesas Technology Corporation is necessary to reprint or reproduce in
whole or in part these materials.
7. If these products or technologies are subject to the Japanese export control restrictions, they must be
exported under a license from the Japanese government and cannot be imported into a country other
than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the
country of destination is prohibited.
8. Please contact Renesas Technology Corporation for further details on these materials or the products
contained therein.
HD404618 Series
4-Bit Single-Chip Microcomputer
Rev. 6.0
Sept. 1998
Description
The HD404618 Series is designed with the powerful and efficient architecture of the HMCS400 family.
The MCU incorporates a high-precision dual-tone multifrequency (DTMF) circuit, LCD driver/controller,
voltage comparator, and 32-kHz watch oscillator circuit.
The HD404618 Series includes five chips: the HD404612 with 2-kword ROM; the HD404614 with 4-
kword ROM; the HD404616 with 6-kword ROM; the HD404618 with 8-kword ROM; the HD4074618
with 8-kword PROM.
The HD4074618, incorporating PROM, is a ZTAT
TM
microcomputer that can dramatically shorten system
development periods and smooth the process from debugging to mass production.
ZTATTM : Zero Turn Around time ZTAT is a trademark of Hitachi Ltd.
Features
2048-word
10-bit ROM (HD404612)
4096-word
10-bit ROM (HD404614)
6144-word
10-bit ROM (HD404616)
8192-word
10-bit ROM (HD404618, HD4074618)
1184-digit
4-bit RAM
30 I/O pins
10 high-current output pins
CMOS I/O pin circuit configuration
Input/output pull-up MOS can be selected by software
On-chip DTMF generator
LCD controller/driver (32 segments
4 commons)
Three timer/counters
Clock-synchronous 8-bit serial interface
Six interrupt sources
Two by external sources
Four by internal sources
HD404618 Series
2
Subroutine stack up to 16 levels, including interrupts
Instruction cycle time
10
s (f
OSC
= 400 kHz)
5
s (f
OSC
= 800 kHz)
Four low-power dissipation modes
Stop mode
Standby mode
Watch mode
Subactive mode
Built-in oscillator
Crystal or ceramic oscillator (an external clock also possible)
Voltage comparator (2 channels)
Two operating modes
MCU mode
PROM mode (HD4074618)
Package
80-pin plastic flat package
(FP-80B) (FP-80A)
80-pin plastic thin flat package (TFP-80)
Ordering Information
Type
Product Name
Model Name
ROM (Word)
Package
Mask ROM
HD404612
HD404612FS
2,048
FP-80B
HD404612H
FP-80A
HD404612TF
TFP-80
HD404614
HD404614FS
4,096
FP-80B
HD404614H
FP-80A
HD404614TF
TFP-80
HD404616
HD404616FS
6,144
FP-80B
HD404616H
FP-80A
HD404616TF
TFP-80
HD404618
HD404618FS
8,192
FP-80B
HD404618H
FP-80A
HD404618TF
TFP-80
ZTAT
TM
HD4074618
HD4074618FS
8,192
FP-80B
HD4074618H
FP-80A
HD4074618TF
TFP-80
HD404618 Series
3
Pin Arrangement
D
RESET
OSC
OSC
V
V
V
COM4
V
VT
TONER
TONEC
COM3
COM2
COM1
D
1
0
2
CC
ref
3
2
1
R2
R2
R2
R3
SEG2
SEG3
SEG4
SEG5
TIMO/R3
INT
/R3
INT
/R3
SEG1
SEG6
SEG7
SEG8
R2
3
0
2
1
2
1
0
0
3
1
1
1
2
3
4
5
6
7
8
9
10
11
12
14
13
15
17
16
18
20
19
22
21
24
23
64
63
62
61
60
59
58
57
56
55
54
53
51
52
50
48
49
47
45
46
43
44
41
42
26
27
28
29
34
35
36
37
30
31
32
33
38
39
40
25
79
78
77
76
71
70
69
68
75
74
73
72
67
66
65
80
(top view)
(top view)
FP-80B
SEG32
SEG31
SEG30
SEG29
SEG28
SEG27
SEG26
SEG25
SEG24
SEG23
SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
SEG10
SEG9
D
D
D
VC /D
COMP
0
/D
COMP
1
/D
X1
TEST
X2
SCK
/R0
GND
SI/R0
R0
SO/R0
R1
R1
R1
R1
2
4
5
6
7
8
9
10
11
12
13
0
1
2
3
0
1
2
3
ref
D
D
D
D
3
D
D
1
2
3
4
5
6
7
8
9
10
11
12
14
13
15
17
16
18
20
19
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
47
48
46
44
45
43
41
42
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FP-80A
TFP-80
D
D
D
RESET
V
V
V
OSC
V
COM4
COM3
D
3
2
3
2
1
2
VT
COM2
COM1
SEG32
SEG31
1
0
OSC
1
CC
ref
TONER
TONEC
R2
R2
R2
R3
SEG2
SEG3
SEG4
SEG5
TIMO/R3
INT
/R3
INT
/R3
SEG1
SEG6
SEG7
SEG8
R2
3
0
2
1
2
1
0
0
1
SEG9
SEG10
R1
R1
3
3
2
D
D
D
D
D
4
5
6
7
8
9
D
10
D
11
VC /D
ref
COMP
0
/D
COMP
1
/D
12
13
TEST
X1
X2
GND
SCK
/R0
0
SI/R0
1
SO/R0
2
R0
3
R1
0
R1
1
SEG30
SEG29
SEG28
SEG27
SEG26
SEG25
SEG24
SEG23
SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
HD404618 Series
4
Pin Description
Pin Number
Pin Number
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
1
79
D
2
I/O
33
31
SEG1
O
2
80
D
3
I/O
34
32
SEG2
O
3
1
D
4
I/O
35
33
SEG3
O
4
2
D
5
I/O
36
34
SEG4
O
5
3
D
6
I/O
37
35
SEG5
O
6
4
D
7
I/O
38
36
SEG6
O
7
5
D
8
I/O
39
37
SEG7
O
8
6
D
9
I/O
40
38
SEG8
O
9
7
D
10
I
41
39
SEG9
O
10
8
D
11
/VC
ref
I
42
40
SEG10
O
11
9
D
12
/COMP
0
I
43
41
SEG11
O
12
10
D
13
/COMP
1
I
44
42
SEG12
O
13
11
TEST
I
45
43
SEG13
O
14
12
X1
I
46
44
SEG14
O
15
13
X2
O
47
45
SEG15
O
16
14
GND
48
46
SEG16
O
17
15
R0
0
/
SCK
I/O
49
47
SEG17
O
18
16
R0
1
/SI
I/O
50
48
SEG18
O
19
17
R0
2
/SO
I/O
51
49
SEG19
O
20
18
R0
3
I/O
52
50
SEG20
O
21
19
R1
0
I/O
53
51
SEG21
O
22
20
R1
1
I/O
54
52
SEG22
O
23
21
R1
2
I/O
55
53
SEG23
O
24
22
R1
3
I/O
56
54
SEG24
O
25
23
R2
0
I/O
57
55
SEG25
O
26
24
R2
1
I/O
58
56
SEG26
O
27
25
R2
2
I/O
59
57
SEG27
O
28
26
R2
3
I/O
60
58
SEG28
O
29
27
R3
0
I/O
61
59
SEG29
O
30
28
R3
1
/TIMO
I/O
62
60
SEG30
O
31
29
R3
2
/
INT
0
I/O
63
61
SEG31
O
32
30
R3
3
/
INT
1
I/O
64
62
SEG32
O
HD404618 Series
5
Pin Number
Pin Number
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
65
63
COM1
O
73
71
TONER
O
66
64
COM2
O
74
72
VT
ref
67
65
COM3
O
75
73
V
CC
68
66
COM4
O
76
74
OSC
1
I
69
67
V
1
77
75
OSC
2
O
70
68
V
2
78
76
RESET
I
71
69
V
3
79
77
D
0
I/O
72
70
TONEC
O
80
78
D
1
I/O
Note: I/O: Input/output pin, I: Input pin, O: Output pin
Pin Functions
Power Supply
V
CC
: Apply power voltage to this pin.
GND: Connect to ground.
TEST: Used for test purposes only. Connect it to V
CC
.
RESET: Resets the MCU.
Oscillators
OSC
1
, OSC
2
: Used as pins for the internal oscillator circuit. They can be connected to a ceramic
resonator, or OSC
1
can be connected to an external oscillator circuit.
X1, X2: Used for a 32.768-kHz crystal oscillator that acts as a clock.
Ports
D
0
D
13
(D Port): Input/output port addressable by individual bits. D
0
D
9
are I/O pins and D
10
D
13
are
input pins. D
0
D
9
are high current output pins (15 mA, max.). D
11
D
13
are also available as voltage
comparators.
R0R3 (R Ports): Input/output ports addressable in 4-bit units. R0
0
, R0
1
, R0
2
, R3
1
, R3
2
, and R3
3
, are
multiplexed with
SCK, SI, SO, TIMO, INT
0
, and
INT
1
, respectively.
HD404618 Series
6
Interrupts
INT
0
,
INT
1
: Input external interrupts to the MCU.
INT
1
is also used as an external event input for timer B.
INT
0
and
INT
1
are multiplexed with R3
2
and R3
3
, respectively.
Serial Communications Interface
SCK: Input/output serial clock pin multiplexed with R0
0
.
SI: Serial receive data input pin multiplexed with R0
1
.
SO: Serial transmit data output pin multiplexed with R0
2
.
Timers
TIMO: Outputs a variable-duty square wave. It is multiplexed with R3
1
.
LCD Driver/Controller
V
1
, V
2
, V
3
: Power supply pins for the LCD driver. Internal resistors provide the voltage level for each pin.
The voltage condition is V
CC
V
1
V
2
V
3
GND.
COM1COM4: Common signal output pins for LCD display.
SEG1SEG32: Segment signal output pins for LCD display.
DTMF Generator
TONER, TONEC, VT
ref
: DTMF signal pins. TONER and TONEC transmit signals for row and column,
respectively. VT
ref
is a reference voltage for DTMF signals. Apply condition V
CC
VT
ref
GND to VT
ref
.
Voltage Comparator
COMP0, COMP1, VC
ref
: COMP0 and COMP1 are analog inputs for the voltage comparator. VC
ref
is a
reference voltage pin that inputs the threshold voltage of the analog input pin.
HD404618 Series
7
Block Diagram
Internal address bus
System control circuit
RAM
(1,184 4 bits)
W (2 bits)
X (4 bits)
SPX (4 bits)
Y (4 bits)
SPY (4 bits)
CA
(1 bit)
ST
(1 bit)
A (4 bits)
B (4 bits)
SP (10 bits)
Instruction
decoder
PC (14 bits)
ROM
(2,048
10 bits)
(4,096
10 bits)
(6,144
10 bits)
(8,192
10 bits)
D port
ALU
CPU
INT
0
INT
1
Timer B
Timer C
TIMO
D
0
D
1
D
2
D
3
D
4
D
5
D
6
D
7
D
8
D
9
D
10
D
12
D
11
D
13
R0 port
R0
0
R0
1
R0
2
R0
3
R1 port
R1
0
R1
1
R1
2
R1
3
R2 port
R2
0
R2
1
R2
2
R2
3
R3 port
R3
0
R3
1
R3
2
R3
3
RESET
TEST
OSC
OSC
X1
X2
V
CC
GND
Timer A
External
interrupt
control
circuit
Internal data bus
Internal data bus
High
current
pins
LCD
controller/
driver
circuit
V
1
V
2
V
3
COM1
COM2
COM3
COM4
SEG1
SEG2
SEG3
SEG31
SEG32
DTMF
generation
circuit
VT
ref
TONER
TONEC
VC
ref
COMP
0
COMP
1
Compa-
rator
Serial
interface
SI
SO
SCK
: Data bus
: Signal lines
1
2
HD404618 Series
8
Memory Map
ROM Memory Map
The ROM memory map is shown in figure 1, and the ROM is described below.
0
15
16
63
64
4095
4096
8191
8192
16383
0
$000F
$0FFF
$1000
$1FFF
$2000
$3FFF
$0010
$003F
$0040
Vector address
Zero-page subroutine
(64 words)
Pattern
(4096 words)
Not used
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$0000
$0000
$0001
$0002
$0003
$0004
$0005
$0006
$0007
$0008
$0009
$000A
$000B
$000C
$000D
$000E
$000F
JMPL instruction
(jump to reset routine)
JMPL instruction
(jump to
INT
routine)
0
JMPL instruction
(jump to timer A routine)
1
JMPL instruction
(jump to timer B routine)
JMPL instruction
(jump to timer C routine)
JMPL instruction
(jump to serial routine)
JMPL instruction
(jump to
INT
routine)
*
HD404612: 2048 words
HD404614: 4096 words
HD404616: 6144 words
HD404618, HD4074618: 8192 words
Program
*
Note:
Figure 1 ROM Memory Map
Vector Address Area ($0000$000F): Reserved for JMPL instructions that branch to the start addresses
of the reset and interrupt routines. After an MCU reset or interrupt execution, the program starts from the
vector address.
Zero-Page Subroutine Area ($0000$003F): Reserved for subroutines. The program branches to a
subroutine in this area in response to the CAL instruction.
Pattern Area ($0000$0FFF): Contains ROM data that can be referenced with the P instruction.
Program Area ($0000$07FF (HD404612), $0000$0FFF (HD404614), $0000$17FF (HD404616),
$0000$1FFF (HD404618, HD4074618)):
Used for program coding.
HD404618 Series
9
RAM Memory Map
The MCU contains a 1,184-digit
4-bit RAM area consisting of a data area and a stack area. In addition,
interrupt control bits and special registers are mapped onto the same RAM memory space outside this area.
The RAM memory map is shown in figure 2, and described below.
Interrupt Control Bits Area ($000$003): Used for interrupt control bits and the bit register (figure 3).
The register flag area consists of LSON, WDON, TGSP, and DTON flags. Both areas can be accessed
only by RAM bit manipulation instructions. In addition, note that the interrupt request flag cannot be set
by software, the RSP bit is used only to reset the stack pointer. Limitations on using the instructions are
shown in figure 4.
Register Flag Area ($020$023): Consist of the LSON, WDON, TGSP, and DTON flags which are bit
registers accessible by RAM bit manipulation instructions.
The WDON flag can only be set, only by the SEM/SEMD instruction.
The TGSP flag can be set and reset by the SEM/SEMD and REM/REMD instructions.
The DTON flag can be set, reset, and tested by the SEM/SEMD, REM/REMD, and TMD instructions.
Note that the DTON flag is active only in subactive mode, and is normally reset in active mode.
Special Function Registers Area ($004$01F, $024$03F): Used as mode or data registers for serial
interface, timer/counters, LCD, and DTMF, and as data control registers for I/O ports. These registers are
classified into three types: write-only, read-only, and read/write as shown in figure 2.
The SEM/REM and SEMD/REMD instructions can be used for the LCD control register (LCR), but RAM
bit manipulation instructions cannot be used for other registers.
LCD Data Area ($050$06F): Used for storing LCD data which is automatically output to LCD segments
as display data. Data 1 lights the corresponding LCD segment; data 0 extinguishes it. This area can be
used as data area.
Data Area ($040$2CF, $100$2CF; Bank 0, 1): The memory registers (MR), which consist of 16 digits
($040$04F), can be accessed by the LAMR and XMRA instructions (see figure 5). In the 464 digits from
$100$2CF, a bank can be selected by the V register (see section on V register).
Stack Area ($3C0$3FF): Used for saving the contents of the program counter (PC), status flag (ST),
and carry flag (CA) at subroutine call (CAL or CALL instruction) and interrupt processing. This area can
be used as a 16-level nesting subroutine stack in which one level requires four digits. The data to be saved
and the save conditions are shown in figure 5.
The program counter is restored by either the RTN or RTNI instruction, but the status and carry flags can
only be restored by the RTNI instruction. Any unused space in this area is used for data storage.
HD404618 Series
10
0
$000
$000
63
64
80
112
959
960
1023
$03F
$040
$050
$070
$100
$3FF
4
5
6
7
0
1
2
3
12
13
14
15
8
9
10
11
16
17
32
35
48
18
19
20
49
50
51
63
$001
$002
$003
$004
$005
$006
$007
$008
$009
$00A
$00B
$00C
$00D
$00E
$00F
$010
$011
$012
$013
$014
$020
$023
$030
$031
$032
$033
$03B
$03C
$03D
$03F
$00A
$00B
$00E
$00F
W
W
R/W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
R
R
R
R
W
R/W
R/W
R/W
R/W
R/W
R/W
$100
$2CF
61
59
60
$3BF
$3C0
$2CF
RAM-mapped registers
Memory registers (MR)
LCD display area (32 digits)
Data (144 digits)
Data (464 digits 2)
V = 0 (bank 0)
V = 1 (bank 1)
Not used
Stack (64 digits)
Interrupt control bits area
Port mode register A (PMRA)
Serial mode register (SMR)
Serial data register lower (SRL)
Serial data register upper (SRU)
Timer mode register A (TMA)
Timer mode register B (TMB)
Timer B (TCBL/TLRL)
(TCBU/TLRU)
Miscellaneous register (MIS)
Timer mode register C (TMC)
Timer C (TCCL/TCRL)
(TCCU/TCRU)
TG mode register (TGM)
TG control register (TGC)
Port mode register B (PMRB)
LCD control register (LCR)
LCD mode register (LMR)
Not used
Register flag area
Not used
Port R0 DCR (DCR0)
Port R1 DCR (DCR1)
Port R2 DCR (DCR2)
Port R3 DCR (DCR3)
Not used
Port D D DCR (DCRB)
Port D D DCR (DCRC)
Port D D DCR (DCRD)
Not used
V register (V-REG)
0
3
4
7
8
9
Data (464 digits)
V = 0 (bank 0)
Data (464 digits)
V = 1 (bank 1)
10
11
14
15
Timer counter B, lower
(TCBL)
Timer counter B, upper
(TCBU)
Timer counter C, lower
(TCCL)
Timer counter C, upper
(TCCU)
Timer load register B, lower
(TLRL)
Timer load register B, upper
(TLRU)
Timer load register C, lower
(TCRL)
Timer load register C, upper
(TCRU)
R: Read only
W: Write only
R/W: Read/write
*
Note: Do not use any area labelled "Not used"
*
The data area has two banks:
V = 0 (bank 0) and V = 1 (bank 1)
Figure 2 RAM Memory Map
HD404618 Series
11
0
1
2
3
Bit 3
Bit 2
Bit 1
Bit 0
IM0
(IM of
INT
)
0
IF0
(IF of
INT
)
0
RSP
(Reset SP bit)
IE
(Interrupt enable flag)
IMTA
(IM of timer A)
IFTA
(IF of timer A)
IM1
(IM of
INT
)
1
IF1
(IF of
INT
)
1
IMTC
(IM of timer C)
IFTC
(IF of timer C)
IMTB
(IM of timer B)
IFTB
(IF of timer B)
Not used
Not used
IMS
(IM of serial)
IFS
(IF of serial)
$000
$001
$002
$003
32
35
DTON
Direct transfer on flag
TGSP
(Tone generator
speed flag)
WDON
(Watchdog on flag)
LSON
(Low speed on flag)
Not Used
$020
$021
$023
IF: Interrupt request flag
IM: Interrupt mask
IE: Interrupt enable flag
SP: Stack pointer
Note: Bits in the interrupt control bits area and register flag area are set by the SEM or SEMD
instruction, reset by the REM or REMD instruction, and tested by the TM or TMD instruction.
Other instructions have no effect.
Figure 3 Configuration of Interrupt Control Bits and Register Flag Areas
IF
RSP
WDON
TGSP
DTON
SEM/SEMD
REM/REMD
TM/TMD
Not executed
Allowed
Allowed
Not executed
Allowed
Inhibited
Allowed
Not executed
Inhibited
Allowed
Allowed
Inhibited
Not executed in active mode
Allowed
Allowed
Used in subactive mode
Note: WDON is always reset in active mode.
DTON is always reset in active mode.
If the TM or TMD instruction is executed for the inhibited bits or non-existing bits,
the value in ST becomes invalid.
Figure 4 Usage Limitations of RAM Bit Manipulation Instructions
HD404618 Series
12
PC PC : Program counter
ST: Status flag
CA: Carry flag
13
0
Memory registers
Stack area
64
$040
960
$3C0
65
$041
66
$042
67
$043
68
$044
69
$045
70
$046
71
$047
72
$048
73
$049
74
$04A
75
$04B
76
$04C
77
$04D
78
$04E
79
$04F
MR (0)
MR (1)
MR (2)
MR (3)
MR (4)
MR (5)
MR (6)
MR (7)
MR (8)
MR (9)
MR (10)
MR (11)
MR (12)
MR (13)
MR (14)
MR (15)
Level 16
Level 15
Level 14
Level 13
Level 12
Level 11
Level 10
Level 9
Level 8
Level 7
Level 6
Level 5
Level 4
Level 3
Level 2
Level 1
1023
$3FF
ST
PC
10
PC
13
PC
12
PC
11
CA
PC
3
PC
9
PC
8
PC
7
PC
6
PC
5
PC
4
PC
2
PC
1
PC
0
Bit 3
Bit 2
Bit 1
Bit 0
$3FC
$3FD
$3FE
$3FF
1022
1023
1020
1021
Figure 5 Configuration of Memory Registers and Stack Area, and Stack Position
HD404618 Series
13
Functional Description
Registers and Flags
The MCU has ten registers and two flags for CPU operations. They are illustrated in figure 6 and described
below.
3
0
3
0
3
0
3
0
3
0
3
0
0
0
0
13
9
5
1
V
B
A
W
X
Y
SPX
SPY
CA
ST
PC
SP
1
1
1
1
Accumulator
B register
V register
W register
X register
Y register
SPX register
SPY register
Carry flag
Status flag
Program counter
Stack pointer
0
0
0
Figure 6 Registers and Flags
Accumulator (A), B Register (B): Four-bit registers used to hold results from the arithmetic logic unit
(ALU) and transfer data between memory, I/O, and other registers.
HD404618 Series
14
V Register (V): Used for RAM address expansion and selecting the bank of RAM addresses $100$2CF
(464 digits). Thus, when accessing locations $100$2CF, specify the value of the V register (V = $0 for
bank 0, V = $1 for bank 1). Locations $000$0FF and $3C0$3FF can be accessed independent of the V
register. The V register is located at RAM address $03F.
W Register (W), X Register (X), Y Register (Y): Two-bit (W) and four-bit (X and Y) registers used for
indirect RAM addressing. The Y register is also used for D-port addressing.
SPX Register (SPX), SPY Register (SPY): Four-bit registers used to supplement the X and Y registers.
Carry Flag (CA): One-bit flag that stores any ALU overflow generated by an arithmetic operation. CA is
affected by the SEC, REC, ROTL, and ROTR instructions. During an interrupt, a carry is pushed onto the
stack and popped from the stack by the RTNI instructionbut not by the RTN instruction.
Status Flag (ST): One-bit flag that latches any overflow generated by an arithmetic or compare
instruction, not-zero decision from the ALU, or result of a bit test. ST is used as a branch condition of the
BR, BRL, CAL, or CALL instruction. The contents of ST remain unchanged until the next arithmetic,
compare, or bit test instruction is executed, but become 1 after the BR, BRL, CAL, or CALL instruction is
read, regardless of whether the instruction is executed or skipped. During an interrupt, the contents of ST
are pushed onto the stack and popped from the stack by the RTNI instruction, but not by the RTN
instruction.
Program Counter (PC): A 14-bit counter that points to the ROM address of the instruction being
executed.
Stack Pointer (SP): Ten-bit pointer that contains the address of the stack area to be used next. The SP is
initialized to $3FF by MCU reset, is decremented by 4 when data is pushed onto the stack, and is
incremented by 4 when data is popped from the stack. Since the top four bits of the SP are fixed at 1111, a
stack of up to 16 levels can be used.
The SP can also be initialized to $3FF in another way: by resetting the RSP bit with the REM or REMD
instruction.
HD404618 Series
15
Reset
The MCU is reset by inputting a high-level voltage to the RESET pin. At power-on or when stop mode is
cancelled, RESET must be high for at least one t
RC
to enable the oscillator to stabilize.
During operation, RESET must be high for at least two instruction cycles.
I/O pins go to high-impedance at power-on.
Initial values after MCU reset are shown in table 1.
Table 1 Initial Values After MCU Reset
Item
Abbr.
Initial Value Contents
Program counter
(PC)
$0000
Indicates program execution
point from start address of ROM
area
Status flag
(ST)
1
Enables conditional branching
Stack pointer
(SP)
$3FF
Stack level 0
V register (bank register)
(V)
0
Bank 0 (memory)
Interrupt flags/mask Interrupt enable flag
(IE)
0
Inhibits all interrupts
Interrupt request flag
(IF)
0
Indicates there is no interrupt
request
Interrupt mask
(IM)
1
Prevents (masks) interrupt
request
I/O
Port data register
(PDR)
All bits 1
Enables output at level 1
Data control register
(DCR)
All bits 0
Turns output buffer off (to high
impedance)
Port mode register A
(PMRA)
0000
Refer to description of port mode
register A
Port mode register B
(PMRB)
0000
Refer to description of port mode
register B
Timer/
counters, serial
interface
Timer mode register A
(TMA)
0000
Refer to description of timer
mode register A
Timer mode register B
(TMB)
0000
Refer to description of timer
mode register B
Timer mode register C
(TMC)
0000
Refer to description of timer
mode register C
Serial mode register
(SMR)
0000
Refer to description of serial
mode register
Prescaler S
$000
--
Prescaler W
$00
--
Timer counter A
(TCA)
$00
--
HD404618 Series
16
Table 1 Initial Values After MCU Reset (cont)
Item
Abbr.
Initial Value Contents
Timer/
counters, serial
interface
Timer counter B
(TCB)
$00
--
Timer counter C
(TCC)
$00
--
Timer load register B
(TLR)
$00
--
Timer load register C
(TCR)
$00
--
Octal counter
000
--
LCD
LCD control register
(LCR)
000
Refer to description of LCD
control register
LCD mode register
(LMR)
0000
Refer to description of LCD duty
cycle/clock control
DTMF generator
Tone generator control
register
(TGC)
000
Refer to description of tone
generator control register
Tone generator mode
register
(TGM)
0000
Refer to description of generator
mode register
Bit registers
Low speed on flag
(LSON)
0
Refer to description of operating
modes
Watchdog timer on flag (WDON)
0
Refer to description of timer C
Tone generator speed
flag
(TGSP)
0
Refer to description of DTMF
generation circuit
Direct transfer on flag
(DTON)
0
Refer to description of operating
modes
Miscellaneous
register
(MIS)
000
--
Item
Abbr.
Status after Cancellation of
Stop Mode by MCU Reset
Status after Cancellation of All
Other Modes by MCU Reset
Carry flag
(CA)
Pre-MCU-reset values are not
guaranteed; values must be
initialized by program
Pre-MCU-reset values are not
guaranteed; values must be
initialized by program
Accumulator
(A)
B register
(B)
W register
(W)
X/SPX register
(X/SPX)
Y/SPY register
(Y/SPY)
Serial data register
(SR)
RAM
Pre-MCU-reset (pre-STOP-
instruction) values are retained
HD404618 Series
17
Interrupts
The MCU has six interrupt sources: two external signals (
INT
0
and
INT
1
), three timer/counters (timers A,
B, and C), and serial interface (serial).
An interrupt request flag (IF), interrupt mask (IM), and vector address are provided for each interrupt
source, and an interrupt enable flag (IE) controls the entire interrupt process.
Interrupt Control Bits and Interrupt Servicing: Locations $000 through $003 in RAM space are
reserved for interrupt control bits which can be accessed by RAM bit manipulation instructions.
The interrupt request flag (IF) cannot be set by software. MCU reset initializes the interrupt enable flag
(IE) and the IF to 0 and the interrupt mask (IM) to 1.
Figure 7 is a block diagram of the interrupt control circuit. Table 2 lists interrupt priorities and vector
addresses, and table 3 lists the interrupt processing conditions for the six interrupt sources.
An interrupt request occurs when the IF is set to 1 and IM to 0. If the IE is 1 at that point, the interrupt is
processed. A priority programmable logic array (PLA) generates the vector address assigned to that
interrupt source.
Figure 8 shows the interrupt processing sequence, and figure 9 shows an interrupt processing flowchart.
After an interrupt is acknowledged, the previous instruction is completed in the first cycle. The IE is reset
in the second cycle, the carry flag, status flag, and program counter values are pushed onto the stack during
the second and third cycles, and the program jumps to the vector address to execute the instruction in the
third cycle.
Program the JMPL instruction at each vector address to branch the program to the start address of the
interrupt program, and reset the IF by a software instruction within the interrupt program.
HD404618 Series
18
IE
IF0
IM0
IF1
IM1
IFTA
IMTA
IFTB
IMTB
IFTC
IMTC
IFS
IMS
$ 000,0
$ 000,2
$ 000,3
$ 001,0
$ 001,1
$ 001,2
$ 001,3
$ 002,0
$ 002,1
$ 002,2
$ 002,3
$ 003,0
$ 003,1
Sequence control
Push PC/CA/ST
Reset IE
Jump to vector
address
Priority control logic
Vector
address
Note: $m, n is at RAM address $m, bit number n.
Figure 7 Block Diagram of Interrupt Control Circuit
Table 2 Vector Addresses and Interrupt Priorities
Reset/Interrupt
Priority
Vector Address
RESET
$0000
INT
0
1
$0002
INT
1
2
$0004
Timer A
3
$0006
Timer B
4
$0008
Timer C
5
$000A
Serial
6
$000C
HD404618 Series
19
Table 3 Interrupt Processing and Activation Conditions
Interrupt Source
Interrupt
Control Bit
INT
0
INT
1
Timer A
Timer B
Timer C
Serial
IE
1
1
1
1
1
1
IF0
IM0
1
0
0
0
0
0
IF1
IM1
*
1
0
0
0
0
IFTA
IMTA
*
*
1
0
0
0
IFTB
IMTB
*
*
*
1
0
0
IFTC
IMTC *
*
*
*
1
0
IFS
IMS
*
*
*
*
*
1
Note: Bits marked by
*
can be either 0 or 1. Their values have no effect on operation.
Instruction cycles
1
2
3
4
5
6
Instruction
execution
*
IE reset
Interrupt
acceptance
Execution of JMPL
instruction at vector address
Execution of
instruction at
start address
of interrupt
routine
Vector address
generation
Note:
*
The stack is accessed and the IE reset after the instruction
is executed, even if it is a two-cycle instruction.
Stacking
Figure 8 Interrupt Processing Sequence
HD404618 Series
20
Power
on
RESET = 1 ?
Reset MCU
Interrupt
request ?
Execute instruction
PC (PC) + 1
PC $0002
PC $0004
PC $0006
PC $0008
PC $000A
PC $000C
IE = 1?
Accept interrupt
IE 0
Stack (PC)
Stack (CA)
Stack (ST)
INT
interrupt ?
0
INT
interrupt ?
1
Timer A
interrupt ?
Timer B
interrupt ?
Timer C
interrupt ?
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
(serial interrupt)
Figure 9 Interrupt Processing Flowchart
HD404618 Series
21
Interrupt Enable Flag (IE: $000, Bit 0): Controls the entire interrupt process. It is reset by the interrupt
processing and set by the RTNI instruction, as shown in table 4.
Table 4 Interrupt Enable Flag
IE
Interrupt Enabled/Disabled
0
Disabled
1
Enabled
External Interrupts (
INT
0
,
INT
1
): Specified by port mode register A (PMRA: $004).
The
INT
1
input can be used as a clock signal input to timer B. Timer B increments at each falling edge of
the
INT
1
input. When using
INT
1
as a timer B external event input, external interrupt mask IM1 must be
set to prevent the
INT
1
interrupt request from being accepted (see table 6).
To detect the edge of
INT
0
or
INT
1
, more than two instruction cycle times are required (2t
cyc
or 2t
subcyc
).
External Interrupt Request Flags (IF0: $000, Bit 2; IF1: $001, Bit 0): Set at the falling edge of the
INT
0
and
INT
1
inputs as shown in table 5.
Table 5 External Interrupt Request Flags
IF0, IF1
Interrupt Request
0
No
1
Yes
External Interrupt Masks (IM0: $000, Bit 3; IM1: $001, Bit 1): Prevent (mask) interrupt requests
caused by the corresponding external interrupt request flags, as shown in table 6.
Table 6 External Interrupt Masks
IM0, IM1
Interrupt Request
0
Enabled
1
Disabled (masked)
Timer A Interrupt Request Flag (IFTA: $001, Bit 2): Set by overflow output from timer A as shown in
table 7.
Table 7 Timer A Interrupt Request Flag
IFTA
Interrupt Request
0
No
1
Yes
HD404618 Series
22
Timer A Interrupt Mask (IMTA: $001, Bit 3): Prevents (masks) an interrupt request caused by the timer
A interrupt request flag, as shown in table 8.
Table 8 Timer A Interrupt Mask
IMTA
Interrupt Request
0
Enabled
1
Disabled (masked)
Timer B Interrupt Request Flag (IFTB: $002, Bit 0): Set by overflow output from timer B as shown in
table 9.
Table 9 Timer B Interrupt Request Flag
IFTB
Interrupt Request
0
No
1
Yes
Timer B Interrupt Mask (IMTB: $002, Bit 1): Prevents (masks) an interrupt request caused by the
timer B interrupt request flag, as shown in table 10.
Table 10 Timer B Interrupt Mask
IMTB
Interrupt Request
0
Enabled
1
Disabled (masked)
Timer C Interrupt Request Flag (IFTC: $002, Bit 2): Set by overflow output from timer C as shown in
table 11.
Table 11 Timer C Interrupt Request Flag
IFTC
Interrupt Request
0
No
1
Yes
Timer C Interrupt Mask (IMTC: $002, Bit 3): Prevents (masks) an interrupt request caused by the timer
C interrupt request flag, as shown in table 12.
HD404618 Series
23
Table 12 Timer C Interrupt Mask
IMTC
Interrupt Request
0
Enabled
1
Disabled (masked)
Serial Interrupt Request Flag (IFS: $003,Bit 0): Set when the octal counter counts the eighth transmit
clock signal or when data transmit is discontinued by resetting the octal counter, as shown in table 13.
Table 13 Serial Interrupt Request Flag
IFS
Interrupt Request
0
No
1
Yes
Serial Interrupt Mask (IMS: $003, Bit 1): Prevents (masks) an interrupt request caused by the serial
interrupt request flag, as shown intable 14.
Table 14 Serial Interrupt Mask
IMS
Interrupt Request
0
Enabled
1
Disabled (masked)
HD404618 Series
24
Operating Modes
The MCU has five operating modes that are specified by how the clock is used. The functions available in
each mode are listed in table 15, and operations are shown in table 16. Transitions between operating
modes are shown in figure 10. Table 17 provides additional information for table 15.
Table 15 Functions Available in Each Operating Mode
Mode Name
Active
Standby
Stop
Watch
Subactive
*
4
Activation
method
Reset
cancellation,
interrupt
request
SBY
instruction
TMA3 = 0,
STOP
instruction
TMA3 = 1,
STOP
instruction
INT
0
or timer
A interrupt
request from
watch mode
Status
System
oscillator
Operating
Operating
Stopped
Stopped
Stopped
Subsystem
oscillator
Operating
Operating
Operating
*
1
Operating
Operating
Instruction
execution
(
CPU
)
Operating
Stopped
Stopped
Stopped
Operating
Peripheral
function
interrupt(
PER
)
Operating
Operating
Stopped
Stopped
Operating
Clock function
interrupt (
CLK
)
Operating
Operating
Stopped
Operating
*
2
Operating
*
2
RAM
Operating
Retained
Retained
Retained
Operating
Registers/
flags
Operating
Retained
Reset
Retained
Operating
I/O
Operating
Retained
High
impedance
*
3
Retained
*
3
Operating
*
3
Cancellation
method
RESET input,
STOP/SBY
instruction
RESET input,
interrupt
request
RESET input RESET input,
INT
0
or timer
A interrupt
request
RESET input,
STOP/SBY
instruction
Notes: 1. To reduce current dissipation, stop all oscillation in external circuits.
2. Refer to the Interrupt Frame section for details.
3. Refer to table 17.
4. Subactive mode is an optional function, specify it on the function option list.
5. In the watch and subactive modes, the MCU requires a 32.768-kHz crystal oscillator.
HD404618 Series
25
System Clock (
CPU
)
Operating
Stopped
Non-time-base peripheral function clock (
PER
)
Operating
Active mode
Standby mode
Subactive mode
Stopped
--
Watch mode (TMA3 = 1)
Stop mode (TMA3 = 0)
Table 16 Operations in Low-Power Dissipation Modes
Function
Stop Mode
Watch Mode
*
3
Standby Mode
Subactive Mode
*
2, 3
CPU
Reset
Retained
Retained
OP
RAM
Retained
Retained
Retained
OP
Timer A
Reset
OP
OP
OP
Timer B
Reset
Stopped
OP
OP
Timer C
Reset
Stopped
OP
OP
Serial interface
Reset
Stopped
*
4
OP
OP
LCD
Reset
OP
OP
OP
DTMF
Reset
Reset
Stopped
Reset
I/O
Reset
*
1
Retained
Retained
OP
Notes: OP indicates operating.
1. Output pins are at high impedance.
2. Subactive mode is an optional function specified on the function option list.
3. In the watch and subactive modes, the MCU requires a 32.768 kHz crystal oscillator.
4. Transmission/reception is activated if a clock is input in external clock mode. (However,
interrupts stop.)
HD404618 Series
26
Reset
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Operating
Operating
Stopped
f
f
cyc
cyc
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Operating
Operating
Stopped
f
f
SUB
cyc
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Operating
Operating
f
f
f
cyc
cyc
cyc
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Operating
Operating
f
f
f
cyc
SUB
cyc
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Stopped
Operating
f
f
f
SUB
SUB
SUB
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Stopped
Operating
Stopped
Stopped
Stopped
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Stopped
Operating
Stopped
f
Stopped
SUB
f :
f :
:
:
:
CPU
CLK
PER
OSC
X
Stopped
Operating
Stopped
f
Stopped
SUB
Standby mode
Stop mode
(TMA3 = 0)
Watch mode
Subactive mode
(TMA3 = 1)
(TMA3 = 1, LSON = 0)
(TMA3 = 1, LSON = 1)
(TMA3 = 0)
SBY (standby)
Interrupt
Timers A, B, C,
Serial,
INT
,
INT
0 1
SBY (standby)
Interrupt
STOP
STOP
INT
,
Timer A
0
INT
,
Timer A
0
STOP
STOP/SBY
(LSON = 1)
1.
2.
3.
4.
f :
f :
f :
f :
:
:
:
LSON:
DTON:
cyc
SUB
OSC
X
Main oscillation frequency
Suboscillation frequency
for time-base
f /4
f /8
System clock
Clock for time-base
Clock for other
peripheral functions
Low speed on flag
Direct transfer on flag
OSC
X
CPU
CLK
PER
Active mode
Timers A, B, C,
Serial,
INT
,
INT
0 1
*
4
*
2
*
3
*
1
Notes:
*
1
Time-base interrupt
STOP/SBY (DTON = 1, LSON = 0)
STOP/SBY (DTON = 0, LSON = 0)
DTON is not affected
Figure 10 MCU Status Transitions
Table 17 I/O Status in Low-Power Dissipation Modes
Output
Input
Standby Mode, Watch Mode
Stop Mode
Active Mode, Subactive Mode
D
0
D
9
Retained
High impedance
Input enabled
D
10
D
13
--
--
Input enabled
R0R3
Retained
High impedance
Input enabled
HD404618 Series
27
Active Mode: The MCU operates according to the clock generated by the system oscillators OSC
1
and
OSC
2
.
Standby Mode: The MCU enters standby mode when the SBY instruction is executed from active mode.
In this mode, the oscillators, interrupts, timer/counters, and serial interface continue to operate, but all
instruction execution-related clocks stop. The stopping of these clocks stops the CPU, retaining all RAM
and register contents and maintaining the current I/O pin status.
Standby mode is terminated by a RESET input or an interrupt request. If it is terminated by RESET input,
the MCU is reset as well. After an interrupt request, the MCU enters active mode and resumes, executing
the next instruction after the SBY instruction. If the interrupt enable flag is 1, that interrupt is then
processed; if it is 0, the interrupt request is left pending and normal instruction execution continues. A
flowchart of operation in standby mode is shown in figure 11.
HD404618 Series
28
Standby
Oscillator: Active
Peripheral clocks:
Active
All other clocks:
Stopped
RESET
= 1 ?
No
Yes
IF0 =
1 ?
No
Yes
IM0 =
0 ?
IF1 =
1 ?
No
Yes
IM1 =
0 ?
IFTA =
1 ?
No
Yes
IMTA =
0 ?
IFTB =
1 ?
No
Yes
IMTB =
0 ?
IFTC =
1 ?
No
Yes
IMTC =
0 ?
IFS =
1 ?
No
Yes
IMS =
0 ?
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
(SBY only)
(SBY only)
(SBY only)
(SBY only)
Watch
Oscillator: Stopped
Sub-oscillator: Active
Peripheral clocks: Stopped
All other clocks: Stopped
Restart
processor clocks
Reset MCU
Execute
next instruction
Accept
interrupt
Execute
next instruction
(active mode)
Restart
processor clocks
No
Yes
IF = 1,
IM = 0, and
IE = 1 ?
Figure 11 MCU Operation Flowchart in Watch and Standby Modes
Stop Mode: The MCU enters stop mode if the STOP instruction is executed in active mode when TMA3 =
0. In this mode, the system oscillator stops, which stops all MCU functions as well.
Stop mode is terminated by a RESET input as shown in figure 12. RESET must be high for at least one t
RC
to stabilize oscillation (refer to the AC Characteristics section). When the MCU restarts after stop mode is
cancelled, all RAM contents are retained, but the accuracy of the contents of the accumulator, B register, W
register, X/SPX register, Y/SPY register, carry flag, and serial data register cannot be guaranteed.
HD404618 Series
29
,
Stop mode
Oscillator
Internal clock
RESET
STOP instruction execution
t > t (stabilization time)
RC
t
res
res
Figure 12 Timing of Stop Mode Cancellation
Watch Mode: The MCU enters watch mode if the STOP instruction is executed in active mode when
TMA3 = 1, or if the STOP or SBY instruc-tion is executed in subactive mode.
Watch mode is terminated by a RESET input or a timer-A/
INT
0
interrupt request. For details of RESET
input, refer to the Stop Mode section. When terminated by a timer-A/
INT
0
interrupt request, the MCU
enters active mode if LSON is 0, or subactive mode if LSON is 1. After an interrupt request is generated,
the time required to enter active mode is t
RC
for a timer A interrupt, and T
X
(where T + t
RC
< T
X
< 2T + t
RC
)
for an
INT
0
interrupt, as shown in figure 13.
Operation during mode transition is the same as that at standby mode cancellation (figure 12).
Active mode
Watch mode
Active mode
Oscillation
stabilization period
Interrupt strobe
INT
Interrupt request
generation
(During the transition
from watch mode to
active mode only)
0
T
T
t
RC
Tx
T = 2
t
RC
: Interrupt frame length
t
RC
: Oscillation stabilization period
Figure 13 Interrupt Frame
Subactive Mode: The CPU operates with a clock generated by the X1 and X2 oscillation circuits.
Functions that can operate in subactive mode are listed in table 16. When the STOP or SBY instruction is
executed in subactive mode, the MCU enters either watch or active mode, depending on the statuses of
HD404618 Series
30
LSON and DTON. The DTON flag can only be set in subactive mode; it is automatically reset after a
transition to active mode.
Subactive mode is an optional function that the user must specify on the function option list.
Interrupt Frame: In watch and subactive modes,
CLK
is supplied for timer A and the
I NT
0
circuit.
Prescaler W and timer A operate as time bases to generate interrupt frame timing. Three interrupt frame
cycles (T) can be selected by the settings of the miscellaneous register, as shown in figure 14.
In watch and subactive modes, timer A and
INT
0
interrupts are generated in synchronism with the interrupt
frame. An interrupt request is generated at the interrupt strobe timing, except when the MCU enters active
mode from watch mode. The
INT
0
falling edge is acknowledged regardless of the interrupt frame, but the
interrupt is executed simultaneously with the next interrupt strobe. Timer A generates an overflow and
interrupt request at the timing of an interrupt strobe.
t
RC
MIS: $00C
MIS1
MIS0
MIS2
Refer to
table 20
t selection
RC
MIS
Bit 1
Bit 0
T
0
0
15.625 ms
0
0
1
1
1
0.24414 ms
62.5 ms
31.25 ms
0.24414 ms
7.8125 ms
0.12207 ms
*
2
*
1
Not used
400/800-kHz
ceramic oscillator
--
External clock input
Oscillation circuit
condition
*
1
Notes: 1.
2.
The value of t applies only when using a 32.768-kHz oscillator.
Only direct transfer.
RC
1
Figure 14 Miscellaneous Register
Direct Transfer: By controlling the DTON, the MCU would be placed directly from subactive to active
mode. The detailed procedure is as follows:
Set the DTON flag in subactive mode while LSON = 0.
Execute the STOP or SBY instruction.
After the oscillation stabilization time (a fixed value), the MCU will move automatically from subactive
to active mode.
Note that DTON ($020, bit 3) is valid only in subactive mode. When the MCU is in active mode, this flag
is always at reset.
The transition time (t
D
) from subactive to active mode is t
RC
< t
D
< T + t
RC
.
HD404618 Series
31
Subactive mode
Interrupt
strobe
Direct transfer
timing
Internal
execution
time
Oscillation
stabilization
time
Active mode
T
t
RC
T: Interrupt frame length
t : Oscillation stabilization period
RC
STOP/SBY
execution
(LSON = 0, DTON = 1)
(< T)
Figure 15 Direct Transfer Timing
MCU Operating Sequence: The MCU operates in the sequence shown in figures 16 to 18. It is reset by
an asynchronous RESET input, regardless of its state.
The low-power mode operation sequence is shown in figure 18. With the IE flag cleared and an interrupt
flag set together with its interrupt mask cleared, if a STOP/SBY instruction is executed, the instruction is
cancelled (regarded as an NOP) and the following instruction is executed. Before executing a STOP/SBY
instruction, make sure all interrupt flags are cleared or all interrupts are masked.
Power on
RESET = 1 ?
Reset
MCU
MCU
operation
cycle
No
Yes
Figure 16 MCU Operating Sequence (power on)
HD404618 Series
32
MCU operation
cycle
IF = 1 ?
Instruction
execution
SBY/STOP
instruction ?
PC next
location
PC vector
address
Low-power mode
operation cycle
IE ;
Stack (PC),
(CA),
(ST)
IM = 0 and
IE = 1 ?
Yes
No
No
Yes
Yes
No
Interrupt request flag
Interrupt mask
Interrupt enable flag
0
IF:
IM:
IE:
Program counter
Carry flag
Status flag
PC:
CA:
ST:
Figure 17 MCU Operating Sequence (MCU operation cycle)
HD404618 Series
33
Low-power mode
operation cycle
IF = 1
IM = 0 ?
Hardware NOP
execution
PC next
Iocation
MCU operation
cycle
Standby/watch
mode
IF = 1
IM = 0 ?
Hardware NOP
execution
PC next
Iocation
Instruction
execution
Stop mode
No
Yes
No
Yes
For IF and IM operation, refer to figure 12.
Figure 18 MCU Operating Sequence (low-power mode operation)
Notes on Use:
In subactive mode, the timer A interrupt request or the external interrupt request (
INT
0
) occurs in
synchronism with the interrupt strobe.
If the STOP or SBY instruction is executed at the same time with the interrupt strobe, these interrupt
requests will be cancelled and the corresponding interrupt request flags (IFTA, IF0) will not be set.
In subactive mode, do not use the STOP or SBY instruction at the time of the interrupt strobe.
HD404618 Series
34
When the MCU is in watch mode or subactive mode, if the high level period before the falling edge of
INT
0
is shorter than the interrupt frame,
INT
0
is not detected. Also, if the low level period after the
falling edge of
INT
0
is shorter than the interrupt frame,
INT
0
is not detected.
Edge detection is shown in figure 19. The level of the
INT
0
signal is sampled by a sampling clock.
When this sampled value changes to low from high, a falling edge is detected.
In figure 20, the level of the
INT
0
signal is sampled by an interrupt frame. In (a) the sampled value is
low at point A, and also low at point B. Therefore, a falling edge is not detected. In (b), the sampled
value is high at point A, and also high at point B. A falling edge is not detected in this case either.
When the MCU is in watch mode or subactive mode, keep the high level and low level period of
INT
0
longer than interrupt frame.
High
Low
INT
Sampling
0
Low
Figure 19 Edge Detection
A: Low
B: Low
INT
Interrupt
frame
0
A: High
B: High
INT
Interrupt
frame
0
(a) High level period
(b) Low level period
Figure 20 Sampling Example
HD404618 Series
35
Internal Oscillator Circuit
Figure 21 shows a block diagram of the internal oscillator circuit. A ceramic oscillator can be connected to
OSC
1
and OSC
2
, and a 32.768-kHz crystal oscillator can be connected to X1 and X2. The system oscillator
can also be operated by an external clock.
f
OSC
X2
X1
Subsystem
oscillator
Divider
(1/4)
Divider
(1/8)
Mode
control
circuit
Timing
generator
OSC
f
X
cyc
f
SUB
f
Timing
generator
System clock
( )
CPU
System clock
( )
PER
Timer-base
clock ( )
CLK
OSC
System
oscillator
1
2
Figure 21 Internal Oscillator Circuit
$
&
'
,
-
D
0
RESET
OSC
2
OSC
1
V
CC
VT
ref
COMP
1
/D
13
TEST
X1
X2
GND
SCK
/R0
0
GND
Figure 22 Layout of Crystal and Ceramic Oscillators
HD404618 Series
36
Table 18 Oscillator Circuit Examples
Circuit Configuration
Circuit Constants
External clock operation
(OSC
1
, OSC
2
)
External
oscillator
OSC
Open
1
OSC
2
Ceramic oscillator
(OSC
1
, OSC
2
)
OSC
2
C
1
2
C
OSC
1
R
f
Ceramic
GND
Ceramic oscillator: CSB400P22,
CSB400P (Murata)
R
f
= 1 M
20%
C
1
= C
2
= 220 pF
5%
Ceramic oscillator: CSB800J122,
CSB800J(Murata)
R
f
= 1 M
20%
C
1
= C
2
= 220 pF
5%
Crystal oscillator
X1
C
1
2
C
X2
Crystal
GND
L
S
C R
S
C
0
Crystal: 32.768 kHz: MX38T
(Nippon Denpa Kogyo)
R
s
= 14 k
C
0
= 1.5 pF
C
1
= 20 pF
20%
C
2
= 20 pF
20%
Notes: 1. The circuit constants given above are recommended values provided by the oscillator
manufacturer. Since they may be affected by stray capacitances from the oscillator or board,
consult the crystal or ceramic oscillator manufacturer to determine the actual circuit parameters
required.
2. Wiring between the OSC
1
/OSC
2
pins (X1, X2 pins) and other elements must be as short as
possible, and must not cross other wiring. Refer to the recommended layout of the crystal and
ceramic oscillator in figure 22.
3. If a 32.768-kHz crystal oscillator is not used, fix the X1 pin to V
CC
and leave the X2 pin open.
HD404618 Series
37
Input/Output
The MCU provides 26 input/output pins and 4 input pins, including 10 high-current pins (15 mA, max.). A
program-controlled pull-up MOS transistor is provided for each input/output pin.
The output buffer is turned on and off by the data control register (DCR) during input through an
input/output pin.
I/O pin circuit types are shown in table 19.
D Ports (D
0
D
13
): Consist of ten 1-bit input/output pins and four input pins. Pins D
0
D
9
are high-current
I/O pins (15 mA, max.). The sum current of the pins can go up to 100 mA. These pins are set by the SED
and SEDD instructions, reset by the RED and REDD instructions, and tested by the TD and TDD
instructions. Output data is stored in the port data register.
The on/off status of the output buffer is controlled by D port data control registers (DCRB, DCRC, and
DCRD) that are mapped to the memory address area. Pins D
10
D
13
are input-only pins.
Two operating modes are available to pins D
12
and D
13
: digital input mode and analog input mode. The
operating modes are set by bits 0 and 1 of port mode register B (PMRB). In the digital input mode, these
pins can be used as input pins with the same input characteristics as the I/O pins. In the analog input mode,
the result of a comparison with the reference voltage can be read as input data. The reference voltage is
input by the D
11
/VC
ref
pin.
R Ports: Consist of sixteen 4-bit I/O ports. Data is input to these ports by the LAR and LBR instructions
and output from them by the LRA and LRB instructions.
The on/off status of the output buffers of the R ports are controlled by R port data control registers (DCR0
DCR3) that are mapped to memory addresses.
Pins R0
0
, R0
1
, and R0
2
are multiplexed with pins
SCK, SI, and SO, respectively.
Pins R3
1
, R3
2
, and R3
3
are multiplexed with TIMO,
INT
0
, and
INT
1
, respectively. Refer to figure 24.
Pull-Up MOS Transistor Control: A program-controlled pull-up MOS transistor is provided for each
input/output pin.
The on/off status of all these transistors is controlled by bit 3 of port mode register B (PMRB), and the
on/off status of an individual transistor can also be controlled by the port data register (PDR) of the
corresponding pin. This enables on/off control of each individual pin. Refer to table 20.
The on/off status of each transistor and the peripheral function mode of each pin can be set independently.
How to Deal with Unused I/O Pins: I/O pins that are not needed by the user system must be connected to
V
CC
to prevent LSI malfunctions due to noise. These pins must either be pulled up to V
CC
by their pull-up
transistors or by resistors of about 100 k
.
HD404618 Series
38
Table 19 Circuit Configurations of I/O Pins
I/O Pin Type
Circuit
Applicable Pins
Common I/O pin
(with pull-up MOS
transistor)
V
CC
V
CC
Input control signal
Input data
Output data
PDR
DCR
Pull-up control signal
D
0
D
9
R0
0
R0
3
R1
0
R1
3
R2
0
R2
3
R3
0
R3
3
V
CC
V
CC
SCK
Output data
SCK
(internal)
DCR
Pull-up control signal
SCK
Output pin (with
pull-up MOS
transistor)
V
CC
V
CC
Output data
SO or TIMO
DCR
Pull-up control signal
SO, TIMO
Input pin
V
CC
PDR
Pull-up control signal
INT
0
,
INT
1
SI
Input control signal
Input data
D
10
D
11
/VC
ref
VC
ref
+
Analog input
Input control
Input data
Mode select signal
D
12
/COMP
0
D
13
/COMP
1
(multiplexed with
analog inputs)
Note: Refer to table 20, note 3 concerning R0
2
/SO.
HD404618 Series
39
MPX
Pin
Comparator
+
VC
ref
Mode
register
Internal bus
Figure 23 Configuration of D
12
and D
13
HD404618 Series
40
Port mode register A: $004 (PMRA)
3
2
1
0
R0 /SO pin mode selection
2
R0 /SI pin mode selection
1
R3 /
INT
pin mode selection
2
R3 /
INT
pin mode selection
3
0
1
Port
selection
Bit 3
0
1
R3
INT
3
PMRA
1
Bit 2
PMRA
0
1
R3
INT
2
0
Port
selection
Bit 1
PMRA
0
1
R0
SI
1
Port
selection
Bit 0
PMRA
0
1
R0
SO
2
Port
selection
Pull-up
MOS
on/off
Bit 3
0
1
Off
On
PMRB
Bit 2
PMRB
0
1
R3
TIMO
1
Port
selection
Bit 1
PMRB
0
1
D
COMP
1
13
Port
selection
Bit 0
PMRB
0
1
D
COMP
0
12
Port
selection
D /COMP0 pin mode selection
12
13
1
0
3
2
1
Port mode register B: $012 (PMRB)
D /COMP1 pin mode selection
R3 /TIMO pin mode selection
Pull-up MOS on/off selection
Port
selection
Bit 3
0
1
R0
SCK
0
SMR
Serial mode register: $005 (SMR)
R0 /
SCK
pin mode selection
0
3
2
1
0
Figure 24 I/O Switching Mode Registers
HD404618 Series
41
Table 20 Programmable I/O Circuits
PMRB Bit 3 (PMRB3)
0
1
DCR
0
1
0
1
PDR
0
1
0
1
0
1
0
1
CMOS Buffer
PMOS (A)
--
--
--
On
--
--
--
On
NMOS (B)
--
--
On
--
--
--
On
--
Pull-up MOS Transistor
--
--
--
--
--
On
--
On
Notes: 1. --: Off
2. Various I/O methods can be selected by different combinations of settings of the above mode
registers (PMRB3, DCR, PDR).
3. The PMOS (A) transistor of the R1
2
/SO pin can be turned off by setting bit 2 of the miscellaneous
register (MIS) to 1.
MIS
Bit 2
R0
2
/SO Pin
PMOS (A)
0
On
1
Off
4. The relationships between DCRs and pins are as shown below.
DCR
Bit 3
Bit 2
Bit 1
Bit 0
DCR0
R0
3
R0
2
R0
1
R0
0
DCR1
R1
3
R1
2
R1
1
R1
0
DCR2
R2
3
R2
2
R2
1
R2
0
DCR3
R3
3
R3
2
R3
1
R3
0
DCRB
D
3
D
2
D
1
D
0
DCRC
D
7
D
6
D
5
D
4
DCRD
--
--
D
9
D
8
HD404618 Series
42
PMRB3
Input control signal
V
CC
Pull-up
MOS
transistor
DCR
PDR
Input data
NMOS (B)
PMOS (A)
V
CC
Figure 25 I/O Buffer Configuration
HD404618 Series
43
Timers
The MCU has two prescalers (S and W) and three timer/counters (A, B, and C). Figures 26, 27 and 28
show their diagrams.
Prescaler S: Eleven-bit counter that inputs the system clock signal. After being initialized to $000 by
MCU reset, prescaler S divides the system clock. Prescaler S keeps counting, except at MCU reset and in
the stop and watch modes. Of the prescaler S outputs, timer A input clock, timer B input clock, timer C
input clock, and serial interface transmit clock are selected by timer mode register A (TMA), timer mode
register B (TMB), timer mode register C (TMC), and the serial mode register (SMR), respectively.
Prescaler W: Five-bit counter that inputs the X1 input clock signal divided by eight. Prescaler W output
can be selected as a timer A input clock by timer mode register A (TMA).
Timer A: Eight-bit timer that can be used as a clock time-base (figure 26). It is initialized to $00 and
incremented at each clock input. If an input clock is applied to timer A after it has reached $FF, an
overflow that sets the timer A interrupt request flag (IFTA: $001, bit 2) is generated, and timer A restarts
from $00.
Timer A is used to generate regular interrupts (every 256 clocks) for measuring times between events. It
can also be used as a clock time-base when bit 3 of timer mode register A (TMA) is set to 1. The timer is
driven by the 32-kHz oscillator clock frequency divided by prescaler W, and the clock input to timer A is
controlled by TMA. In this case, prescaler W and timer A can be initialized to $00 by software.
1/4
1/2
32.768-kHz
oscillator
System
clock
Prescaler W
(PSW)
Selector
Selector
Prescaler S (PSS)
Selector
Internal data bus
Timer A interrupt
request flag
(IFTA)
Clock
Overflow
Timer
counter A
(TCA)
Timer mode
register A
(TMA)
3
2 f
SUB
1/2 t
subcyc
(t
subcyc
)
PER
2
4
8
32
128
512
1024
2048
2
8
16
32
f
SUB
Figure 26 Timer A Block Diagram
HD404618 Series
44
Timer B (TCBL and TLRL: $00A, TCBU and TLRU: $00B): Eight-bit write-only timer load register
(TLRL and TLRU) and read-only timer counter (TCBL and TCBU) located at the same addresses. The
eight-bit configuration consists of lower and upper 4-bit digits located at sequential addresses. A block
diagram of timer B is shown in figure 27.
Timer counter B is initialized by writing to timer load register B (TLR). In this case, the lower digit must
be written to first. The contents of TLR are loaded into the timer counter at the same time the upper digit is
written to, initializing the timer counter. TLR is initialized to $00 by MCU reset.
The count of timer B is obtained by reading timer counter B. In this case, the upper digit must be read first;
the count is latched when the upper digit is read.
An auto-reload function, input clock source, and prescaler division ratio of timer B depend on the state of
timer mode register B (TMB). When an external event input is used as the input clock source of TMB, the
R3
3
/
INT
1
pin must be set to
INT
1
by setting port mode register A (PMRA: $004).
Timer B is initialized to the value set in TMB by software, and is then incremented by one each clock
input. If an input is applied to timer B after it has reached $FF, an overflow is generated. In this case, if
the auto-reload function is enabled, timer B is initialized to its initial value; if auto-reload is disabled, the
timer is initialized to $00. The overflow sets the timer B interrupt request flag (IFTB: $002, bit 0).
HD404618 Series
45
System
clock
INT
1
Selector
Prescaler S (PSS)
Clock
Timer counter register BU (TCBU)
Timer counter
register BL
(TCBL)
Timer counter B
(TCB)
Timer load
register BU
(TLRU)
Timer load
register BL
(TLRL)
Timer mode
register B
(TMB)
Timer B interrupt
request flag
(IFTB)
f
cyc
/f
SUB
(t
cyc
/t
subcyc
)
3
Internal data bus
2
4
8
32
128
512
2048
Free-running
control
Overflow
Figure 27 Timer B Block Diagram
Timer C (TCCL and TCRL: $00E, TCCU and TCRU: $00F): Eight-bit write-only timer load register
(TCRL and TCRU) and read-only timer counter (TCCL and TCCU) located at the same addresses. The
eight-bit configuration consists of lower and upper 4-bit digits located at sequential addresses. The
operation of timer C is basically the same as that of timer B.
The auto-reload function and prescaler division ratio of timer C depend on the state of timer mode register
C (TMC). Timer C is initialized to the value set in TMC by software, and is then incremented by one at
each clock input. If an input is applied to timer C after it has reached $FF, an overflow is generated. In
this case, if the auto-reload function is enabled, timer C is initialized to its initial value; if auto-reload is
disabled, the timer is initialized to $00. The overflow sets the timer C interrupt request flag (IFTC: $002,
bit 2).
Timer C also functions as a watchdog timer. If a program routine runs out of control and an overflow is
generated while the watchdog on (WDON) flag is set, the MCU is reset. This error can be detected by
having the program control timer C reset before timer C reaches $FF.
The WDON can only have 1 written to it ; it is cleared to 0 only by MCU reset.
Timer Mode Register A (TMA: $008): Four-bit write-only register that controls timer A as shown in
table 21.
HD404618 Series
46
Watchdog on
flag (WDON)
System
reset signal
Timer C interrupt
request flag
(IFTC)
Timer output
control logic
Timer counter register CU (TCCU)
Timer counter
register CL
(TCCL)
Clock
Timer counter C
(TCC)
Selector
System
clock
Prescaler S (PSS)
Overflow
Internal data bus
Timer load
register CU
(TCRU)
Timer load
register CL
(TCRL)
Timer mode
register C
(TMC)
Free-running
/Reload control
Watchdog timer
control logic
TIMO
2
4
8
32
128
512
1024
2048
3
f
cyc
/f
SUB
(t
cyc
/t
subcyc
)
Figure 28 Timer C Block Diagram
HD404618 Series
47
Table 21 Timer Mode Register A
TMA
Bit 3
Bit 2
Bit 1
Bit 0
Source Prescaler, Input Clock Period,
Operating Mode
0
0
0
0
PSS, 2048 t
cyc
Timer A mode
1
PSS, 1024 t
cyc
1
0
PSS, 512 t
cyc
1
PSS, 128 t
cyc
1
0
0
PSS, 32 t
cyc
1
PSS, 8 t
cyc
1
0
PSS, 4 t
cyc
1
PSS, 2 t
cyc
1
0
0
0
PSW, 32 t
subcyc
Time-base mode
1
PSW, 16 t
subcyc
1
0
PSW, 8 t
subcyc
1
PSW, 2 t
subcyc
1
0
0
PSW, 1/2 t
subcyc
1
Not used
1
0
PSW, TCA reset
1
Notes: 1. t
subcyc
= 244.14
s (when 32.768-kHz crystal oscillator is used)
2. Timer counter overflow output period(s) = input clock period(s)
256
3. If PSW or TCA reset is selected while the LCD is operating, LCD operation halts (power switch
goes off).
When LCD is connected for display, the PSW and TCA reset periods must be set in the program
to the minimum.
4. In time base mode, the timer counter overflow output cycle must be greater than half of the
interrupt frame period (T/2 = t
RC
).
If 1/2 t
subcyc
is selected, t
RC
must be 7.8125 ms ((MIS1, MIS0) = (0, 1), see figure 14).
5. The division ratio must not be modified during time-base mode operation, otherwise an overflow
cycle error will occur.
HD404618 Series
48
T (TCR + 1)
T 256
T
T (256 TCR)
TMC3 = 0
Period of clock input to the counter (table 23)
Value of timer load register C (0255)
Note: This waveform is always fixed low
when TCR = $FF.
TMC3 = 1
T:
TCR:
Figure 29 Variable-Duty Pulse Output Waveform
Timer Mode Register B (TMB: $009): Four-bit write-only register that selects the auto-reload function,
the prescaler division ratio, and input clock source as shown in table 22. Timer mode register B is
initialized to $0 by MCU reset.
Writing to this register is valid from the second instruction execution cycle. Timer B initialization set by
writing to TMB must be done after a mode change becomes valid.
Table 22 Timer Mode Register B
TMB
Bit 3
Auto-Reload Function
0
Disabled
1
Enabled
TMB
Bit 2
Bit 1
Bit 0
Prescaler Division Ratio, Clock Input Source
0
0
0
2048
0
0
1
512
0
1
0
128
0
1
1
32
1
0
0
8
1
0
1
4
1
1
0
2
1
1
1
INT
1
(external event input)
HD404618 Series
49
Timer Mode Register C (TMC: $00D): Four-bit write-only register that selects the auto-reload function
and prescaler division ratio as shown in table 23. Timer mode register C is initialized to $0 by MCU reset.
Writing to this register is valid from the second instruction execution cycle. Timer C initialization set by
writing to TMC must be done after a mode change becomes valid.
Table 23 Timer Mode Register C
TMC
Bit 3
Auto-Reload Function
0
Disabled
1
Enabled
TMC
Bit 2
Bit 1
Bit 0
Prescaler Division Ratio, Clock Input Source
0
0
0
2048
0
0
1
1024
0
1
0
512
0
1
1
128
1
0
0
32
1
0
1
8
1
1
0
4
1
1
1
2
HD404618 Series
50
Note on Use
When using the timer output as PWM output, note the following point. From the update of the timer write
register untill the occurrence of the overflow interrupt, the PWM output differs from the period and duty
settings, as shown in table 24. The PWM output should therefore not be used until after the overflow
interrupt following the update of the timer write register. After the overflow, the PWM output will have the
set period and duty cycle.
Table 24 PWM Output Following Update of Timer Write Register
PWM Output
Mode
Timer Load Register is Updated during
High PWM Output
Timer Load Register is Updated during
Low PWM Output
Free running
Timer load
register
updated to
value N
Interrupt
request
Timer load
register
updated to
value N
Interrupt
request
T
(255 N) T
(N + 1)
T
(N' + 1)
T
(255 N)
T
(N + 1)
Reload
Timer load
register
updated to
value N
Interrupt
request
Timer load
register
updated to
value N
Interrupt
request
T
T
(255 N)
T
T
T
(255 N)
T
HD404618 Series
51
Serial Interface
The MCU has a clock-synchronous serial interface which transmits and receives 8-bit data.
The serial interface consists of a serial data register (SR), serial mode register (SMR), port mode register A
(PMRA), octal counter, and multiplexers (see figure 30). The R0
0
/
SCK pin and the transmit clock are
controlled by writing to the SMR. The transmit clock shifts the contents of the SR, which can be read and
written to by software.
The serial interface is activated by the STS instruction. The octal counter is reset to 000 by this instruction,
starts counting at the falling edge of the transmit clock (
SCK), and it increments at the rising edge of the
clock. A serial interrupt request flag is set when the eighth transmit clock signal is input (the serial
interface is reset) or when serial transmission is discontinued (the octal counter is reset).
Internal data bus
Port mode
register A
(PMRA)
SCK
Selector
System
clock
f
cyc
/f
sub
(t
cyc
/t
subcyc
)
Prescaler S (PSS)
I/O
control
logic
3
Serial mode
register
(SMR)
Clock
Serial data
register (SR)
Serial interrupt
request flag
(IFS)
Selector
1/2
SI
SO
Octal
counter (OC)
I/O
control
logic
Transfer
control
signal
2
8
32
128
512
2048
Figure 30 Serial Interface Block Diagram
Serial Mode Register (SMR: $005): Four-bit write-only register that controls the R0
0
/
SCK pin, prescaler
division ratio, and transmit clock source (table 25 and figure 31). Writing to this register initializes the
serial interface.
HD404618 Series
52
A write signal input to the serial mode register discontinues the input of the transmit clock to the serial data
register and octal counter. Therefore, if a write is performed during data transmission, the octal counter is
reset to 000 to stop transmission, and at the same time, the serial interrupt request flag is set.
Write operations are valid from the second instruction execution cycle, so the STS instruction must be
executed after at least two cycles have been executed. The serial mode register is initialized to $0 by MCU
reset.
Table 25 Serial Mode Register
SMR
Bit 3
R0
0
/
SCK
Pin
0
R0
0
port input/output pin
1
SCK
input/output pin
SMR
Transmit Clock
Bit 2
Bit 1
Bit 0
R0
0
/
SCK
Pin
Clock Source
Prescaler
Division Ratio
System Clock
Division Ratio
0
0
0
SCK
output
Prescaler
2048
4096
0
0
1
SCK
output
Prescaler
512
1024
0
1
0
SCK
output
Prescaler
128
256
0
1
1
SCK
output
Prescaler
32
64
1
0
0
SCK
output
Prescaler
8
16
1
0
1
SCK
output
Prescaler
2
4
1
1
0
SCK
output
System clock
--
1
1
1
1
SCK
input
External clock
--
--
PMRA3 PMRA2 PMRA1
PMRA: $004
SMR3
SMR2
SMR1
SMR0
SMR: $005
R0 /SO pin mode selection
Transmit clock selection
R0 /
SCK
pin mode selection
0
R0 /SI pin mode selection
2
1
PMRA0
Figure 31 Configurations and Functions of the Mode Registers
HD404618 Series
53
Serial Data Register (SRL: $006, SRU: $007): Eight-bit read/write register separated into upper and
lower digits located at sequential addresses.
Data in this register is output from the SO pin, LSB first, in synchronism with the falling edge of the
transmit clock, and data is input LSB first through the SI pin at the rising edge of the transmit clock.
Input/output timing is shown in figure 32.
Data cannot be read or written during serial data transmission. If a read/write occurs during transmission,
the accuracy of the resultant data cannot be guaranteed.
LSB
MSB
1
2
3
4
5
6
7
8
Transmit
clock
Serial
output
data
Serial input
data
latch timing
Figure 32 Serial Interface Timing
Selecting and Changing Operating Mode: Table 26 lists the serial interface operating modes. To select
an operating mode, use one of these combinations of PMR and SMR settings; to change the operating
mode, always initialize the serial interface internally by writing to the SMR.
Table 26 Serial Interface Operating Modes
SMR
PMRA
Bit 3
Bit 1
Bit 0
Operating Mode
1
0
0
Continuous clock output mode
1
0
1
Transmit mode
1
1
0
Receive mode
1
1
1
Transmit/receive mode
Serial Interface Operation: Three operating modes are provided for the serial interface; transitions
between them are shown in figure 33.
In STS waiting state, the serial interface is initialized and the transmit clock is ignored. If the STS
instruction is then executed, the serial interface enters transmit clock wait state.
In transmit clock wait state, input of the transmit clock increments the octal counter, shifts the serial clock
register, and activates serial transmission. However, note that if clock output mode is selected, the transmit
clock is continuously output but data is not transmitted.
HD404618 Series
54
During transmission, the input of eight clocks or the execution of the STS instruction sets the octal counter
to 000, and the serial interface enters transmit clock wait state. If the state changes from transmit to another
state, the serial interrupt request flag is set by the octal counter reaching 000.
octal counter = 000
transmit clock disabled
STS instruction wait state
Transmit clock
8 transmit clocks (external clock)
STS instruction
(IFS 1)
(octal counter = 000)
Transmit clock wait state
Transfer state
(octal counter 000)
SMR write
STS instruction
SMR write
8 transmit clocks (internal
clock)
(IFS 1)
(IFS 1)
Figure 33 Serial Interface Mode Transitions
In this state, if the internal clock has been selected, the transmit clock is output in answer to the execution
of the STS instruction, but serial transmission is inhibited after the eighth clock is output.
If port mode register A (PMRA) is written to in transmit clock wait state or during transmission, the serial
mode register (SMR) must be written to, to initialize the serial interface. The serial interface then enters
STS wait state.
If the serial interface shifts from transfer state to another state, the octal counter returns to 000, setting the
serial interrupt request flag.
Transmit Clock Error Detection: The serial interface will malfunction if a spurious pulse caused by
external noise conflicts with a normal transmit clock during transmission. A transmit clock error of this
type can be detected as shown in figure 34.
If more than eight transmit clocks are input in transmit clock wait state, the serial interface state changes to
transfer, transmit clock wait, then back to transfer.
If the serial interface is set to STS wait state by writing data to the SMR after the serial interrupt request
flag has been reset, the flag is set again.
HD404618 Series
55
Transmission completion
(IFS 1)
Interrupts
inhibited
IFS 0
SMR write
IFS = 1 ?
Normal termination
Transmit clock
error processing
No
Yes
Figure 34 Transmit Clock Error Detection
Note on Use: The serial interrupt request flag might not be set if the status is changed from transfer by the
execution of an SMR write or STS instruction during the first period that the transmit clock is low. To
prevent this, program a check that the SCK pin is at 1 (by executing an input instruction for the R1 port)
before the execution of an SMR write or STS instruction, to ensure that the serial interrupt request flag is
set.
HD404618 Series
56
Liquid Crystal Display (LCD)
The MCU has an LCD controller and driver which drive 4 common signal pins and 32 segment signal pins.
The controller consists of a RAM area in which display data is stored, a display control register (LCR), and
a duty/clock control register (LMR), as shown in figure 37.
Four duties and the LCD clock are program-controllable, and a built-in dual-port RAM ensures that display
data can be automatically transmitted to the segment signal pins without program intervention. If a 32-kHz
oscillation clock is selected as the LCD clock source, the LCD can be used even in watch mode, in which
the system clock stops.
V
CC
Power switch
V
1
V
2
V
3
GND
LCD
power
control
circuit
LCD
common
driver
Display on/off
Display
area
LCD duty/clock
control
register
(LMR: $014)
(Dual-port
RAM)
LCD
control
register
(LCR: $013)
LCD
segment
driver
LCD
clock
$050
$06F
RAM area
Duty cycle selection
Clock selection
2
2
3
1
LCD
clock
SEG32
SEG2
SEG1
COM4
COM3
COM2
COM1
Divided system clock
output (CL1CL3)
Divided 32-kHz clock
output (CL0)
LCD: Liquid crystal display
1
2
Figure 35 Liquid Crystal Display Block Diagram
LCD Data Area and Segment Data ($050 $06F): Figure 36 shows the configuration of LCD RAM
area. Each bit of the storage area corresponds to one of four types of duties. If data is written to an area
corresponding to a certain duty cycle, it is automatically output to the corresponding segments as display
data.
HD404618 Series
57
Bit 3
Bit 2
Bit 1
Bit 0
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
$050
$051
$052
$053
$054
$055
$056
$057
$058
$059
$05A
$05B
$05C
$05D
$05E
$05F
COM4
COM3
COM2
COM1
SEG1
SEG2
SEG3
SEG4
SEG5
SEG6
SEG7
SEG8
SEG9
SEG10
SEG11
SEG12
SEG13
SEG14
SEG15
SEG16
SEG1
SEG2
SEG3
SEG4
SEG5
SEG6
SEG7
SEG8
SEG9
SEG10
SEG11
SEG12
SEG13
SEG14
SEG15
SEG16
SEG1
SEG2
SEG3
SEG4
SEG5
SEG6
SEG7
SEG8
SEG9
SEG10
SEG11
SEG12
SEG13
SEG14
SEG15
SEG16
SEG1
SEG2
SEG3
SEG4
SEG5
SEG6
SEG7
SEG8
SEG9
SEG10
SEG11
SEG12
SEG13
SEG14
SEG15
SEG16
Bit 3
Bit 2
Bit 1
Bit 0
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
$060
$061
$062
$063
$064
$065
$066
$067
$068
$069
$06A
$06B
$06C
$06D
$06E
$06F
COM4
COM3
COM2
COM1
SEG17
SEG18
SEG19
SEG20
SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG17
SEG18
SEG19
SEG20
SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG17
SEG18
SEG19
SEG20
SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG17
SEG18
SEG19
SEG20
SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
Figure 36 Configuration of LCD RAM Area
LCD Control Register (LCR: $013): Three-bit write-only register which controls LCD blanking, the
turning on and off of the LCD's power supply division resistor, and display in watch and subactive modes
(see table 27).
Blank/display
Blank:
Segment signals are turned off regardless of LCD RAM data setting.
Display: LCD RAM data is output as segment signals.
Power switch on/off
Off: The power switch is off.
On: The power switch is on and V
1
is V
CC
.
Watch/subactive mode display
Off: In watch and subactive modes, all common and segment pins are grounded and the liquid crystal
power switch is turned off.
On: In watch and subactive modes, LCD RAM data is output as segment signals.
HD404618 Series
58
Table 27 LCD Control Register
LCR
LCR
LCR
Bit 2
Display in
Watch Mode or
Subactive Mode Bit 1
Power Switch
On/Off
Bit 0
Blank/Display
0
Off
0
Off
0
Blank
1
On
1
On
1
Display
Note:
When using an LCD in watch mode or subactive mode, use the divided output of a 32-kHz oscillator
as the LCD clock and set bit 2 of the LCR to 1. If using the divided output of the system clock as the
LCD clock, always set bit 2 of the LCR to 0.
LCD Duty/Clock Control Register (LMR: $014): Four-bit write-only register which selects the display
duty and LCD clock source, as shown in table 28.
Table 28 LCD Duty/Clock Control Register
LMR
Bit 3
Bit 2
Bit 1
Bit 0
Duty Selection/Input Clock Selection
--
--
0
0
1/4 duty cycle
--
--
0
1
1/3 duty cycle
--
--
1
0
1/2 duty cycle
--
--
1
1
Static
0
0
--
--
CL0 (32.768/64 kHz when using 32.768-kHz oscillator)
0
1
--
--
CL1 (f
cyc
/256)
1
0
--
--
CL2 (f
cyc
/2048)
1
1
--
--
CL3 (refer to table 29)
Note: f
cyc
is the divided system clock output.
HD404618 Series
59
2
1
0
LCD control register: $013 (LCR)
Blank/display
Power switch on/off
(not used)
Display on/off in watch mode
Duty cycle
Input clock
3
2
1
0
LCD duty/clock control register: $014 (LMR)
Figure 37 LCD Control and LCD Mode Registers
HD404618 Series
60
Table 29 LCD Frame Periods for Different Duties
Static Duty
LMR
Instruction
cycle time
Bit 3
0
Bit 2
0
Bit 3
0
Bit 2
1
Bit 3
1
Bit 2
0
Bit 3
1
Bit 2
1
CL0
CL1
CL2
CL3
*
10
s
512 Hz
390.6 Hz
48.8 Hz
24.4 Hz/64 Hz
5
s
512 Hz
781.2 Hz
97.6 Hz
48.8 Hz/64 Hz
1/2 Duty
LMR
Instruction
cycle time
Bit 3
0
Bit 2
0
Bit 3
0
Bit 2
1
Bit 3
1
Bit 2
0
Bit 3
1
Bit 2
1
CL0
CL1
CL2
CL3
*
10
s
256 Hz
195.3 Hz
24.4 Hz
12.2 Hz/32 Hz
5
s
256 Hz
390.6 Hz
48.8 Hz
24.4 Hz/32 Hz
1/3 Duty
LMR
Instruction
cycle time
Bit 3
0
Bit 2
0
Bit 3
0
Bit 2
1
Bit 3
1
Bit 2
0
Bit 3
1
Bit 2
1
CL0
CL1
CL2
CL3
*
10
s
170.6 Hz
130.2 Hz
16.3 Hz
8.1 Hz/21.3 Hz
5
s
170.6 Hz
260.4 Hz
32.6 Hz
16.2 Hz/21.3 Hz
1/4 Duty
LMR
Instruction
cycle time
Bit 3
0
Bit 2
0
Bit 3
0
Bit 2
1
Bit 3
1
Bit 2
0
Bit 3
1
Bit 2
1
CL0
CL1
CL2
CL3
*
10
s
128 Hz
97.7 Hz
12.2 Hz
6.1 Hz/16 Hz
5
s
128 Hz
195.4 Hz
24.4 Hz
12.2 Hz/16 Hz
Note:
*
The division ratio depends on the value of bit 3 of timer mode register A (TMA3): The first value is
for TMA3 = 0 and the second is for TMA3 = 1.
When TMA3 = 0, CL3 = f
cyc
duty cycle/4096.
When TMA3 = 1, CL3 = 32.768 kHz
duty cycle/512
HD404618 Series
61
Large Liquid-Crystal Panel Drive and V
LCD
: To drive a large-capacity LCD, decrease the resistance of
the built-in division resistors by attaching external resistors in parallel, as shown in figure 38.
The size of these resistors cannot be simply calculated from the LCD load capacitance because the matrix
configuration of the LCD complicates the paths of charge/discharge currents flowing through the
capacitors. The resistance will also vary with lighting conditions. This size must be determined by trial
and error, taking into account the power dissipation of the device using the LCD, but a resistance of 1 to 10
k
would usually be suitable. (Another effective method is to attach capacitors of 0.1 to 0.3
F.)
Always turn off the power switch (set bit 1 of the LCR to 0) before changing the liquid crystal drive
voltage (V
LCD
).
32
2
3
4
32
32
32
V
CC
V
2
V
3
GND
V
1
COM1
SEG1
to
SEG32
V
CC
V
2
V
3
GND
V
1
COM1
COM2
SEG1
to
SEG32
V
CC
V
2
V
3
GND
V
1
COM1
to
COM3
SEG1
to
SEG32
V
CC
V
2
V
3
GND
V
1
COM1
to
COM4
SEG1
to
SEG32
V
CC
V
LCD
V
CC
V
LCD
V
CC
V
LCD
V
CC
V
LCD
R
R
R
V (V )
CC 1
V
2
V
3
GND
R
R
R
V (V )
CC 1
V
2
V
3
GND
C
C
C
C = 0.1 to 0.3
F
4-digit LCD
with sign
.
8-digit LCD
10-digit LCD
with sign
16-digit LCD
.
.
.
Static drive
1/2 duty cycle, 1/2 bias drive
1/3 duty cycle, 1/3 bias drive
1/4 duty cycle, 1/3 bias drive
V
V
GND
CC
LCD
Figure 38 LCD Connection Examples
HD404618 Series
62
DTMF Generation Circuit
The MCU has a dual-tone multifrequency (DTMF) generation circuit.
The DTMF signal consists of two sine waves to access the switching system.
Figure 39 shows the DTMF keypad and frequencies. Pressing a key generates a tone corresponding to its
frequency. Figure 40 shows a block diagram of the DTMF circuit.
The MCU uses an oscillation frequency reduced to 400 kHz, an eighth of the conventionally used
frequency, for low-power consumption. This, however, causes a potential frequency deviation. The MCU
provides transformed programmable dividers in addition to sine wave counters and a control register to
reduce frequency deviation.
The DTMF generation circuit is controlled by the following three registers.
1
4
7
*
2
5
8
0
3
6
9
#
A
B
C
D
R1 (697 Hz)
R2 (770 Hz)
R3 (852 Hz)
R4 (941 Hz)
C1 (1209 Hz)
C2 (1336 Hz)
C3 (1477 Hz)
C4 (1633 Hz)
Figure 39 DTMF Keypad and Frequencies
HD404618 Series
63
400 kHz (selected at TGSP reset)
800 kHz
TGSP
flag
TONER
VT
ref
TONEC
Sine wave
counter D/A
Transformed
programmable
divider
Transformed
programmable
divider
Sine wave
counter D/A
DTMF
register
Feedback
Feedback
Figure 40 DTMF Circuit Block Diagram
Tone Generator Mode Register (TGM: $010): Four-bit write-only register which controls output
frequencies (see table 30). It is cleared to $0 by MCU reset.
Table 30 Tone Generator Mode Register
TGM
Bit 3
Bit 2
Bit 1
Bit 0
Output Frequencies
Option
(TONER output
is not affected)
0
0
f
R1
(697 Hz)
Output through
TONER pin
0
1
f
R2
(770 Hz)
1
0
f
R3
(852 Hz)
1
1
f
R4
(941 Hz)
0
0
Option
(TONEC output is not affected)
f
C1
(1,209 Hz)
Output through
TONEC pin
0
1
f
C2
(1,336 Hz)
1
0
f
C3
(1,477 Hz)
1
1
f
C4
(1,633 Hz)
Tone Generator Control Register (TGC: $011): Three-bit write-only register which controls the start
and stop of DTMF signal output (see table 31). It is cleared to $0 by MCU reset.
HD404618 Series
64
Table 31 Tone Generator Control Register
TGC
Bit 1
DTMF Enable Bit
0
DTMF disabled
1
DTMF enabled
TGC
Bit 2
TONER Output Control (row)
0
Stopped
1
TONER output (active)
TGC
Bit 3
TONEC Output Control (column)
0
Stopped
1
TONEC output (active)
Tone Generator Speed Flag (TGSP: $020,Bit 2): One-bit register which can be set and reset by the
SEM/REM and SEMD/REMD instructions. The DTMF generation circuit generates output frequencies
with a 400-kHz clock (table 30). With an 800-kHz clock, the DTMF generation circuit generates these
same frequencies by pulling the TGSP flag high.
DTMF Output: The sine waves of the row-group and column-group are individually converted from
digital to analog in the D/A conversion circuit, which provides high-precision ladder resistance. The
DTMF output pins, TONER and TONEC, transmit the sine waves of the row-group and column-group,
respectively. Figure 41 shows thetone output equivalent circuit. Figure 42 shows the output waveform.
One cycle of this wave consists of 32 time slots, making the output waveform stable with little distortion.
Table 32 lists the frequency deviation of the MCU from standard DTMF signals.
VT
ref
GND
Switch control
TONER
TONEC
Figure 41 Tone Output Equivalent Circuit
HD404618 Series
65
VT
ref
GND
Time slots
1 2 3 4 5 6 7 8 9 10
12
11
13 14 15 16
18 19
17
20 21 22 23 24 25 26 27 28 29 30 31 32
Figure 42 Waveform of Tone Output
Table 32 Frequency Deviation of the MCU from Standard DTMF Signals
Standard
DTMF (Hz)
MCU (Hz)
Deviation from
Standard (%)
R1
697
694.44
0.37
R2
770
769.23
0.10
R3
852
851.06
0.11
R4
941
938.97
0.22
C1
1,209
1,212.12
0.26
C2
1,336
1,333.33
0.20
C3
1,477
1,481.48
0.30
C4
1,633
1,639.34
0.39
Note:
This frequency deviation value does not include the frequency deviation due to the oscillator
element. Also note that in this case the ratio of the high level and low level widths in the oscillator
waveform due to the oscillator element will be 50% : 50%.
HD404618 Series
66
Programmable ROM
The HD4074618 is a ZTAT
TM
microcomputer with built-in PROM that can be programmed in PROM
mode.
PROM Mode Pin Description
Pin Number
MCU Mode
PROM Mode
Pin Number
MCU Mode
PROM
Mode
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
Pin
Name
I/O
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
Pin
Name
I/O
1
79
D
2
I/O
O
2
I/O
28
26
R2
3
I/O
A
12
I
2
80
D
3
I/O
O
3
I/O
29
27
R3
0
I/O
A
13
I
3
1
D
4
I/O
O
4
I/O
30
28
R3
1
/TIMO I/O
A
14
I
4
2
D
5
I/O
O
5
I/O
31
29
R3
2
/
INT
0
I/O
CE
I
5
3
D
6
I/O
O
6
I/O
32
30
R3
3
/
INT
1
I/O
OE
I
6
4
D
7
I/O
O
7
I/O
33
31
SEG1
O
7
5
D
8
I/O
34
32
SEG2
O
8
6
D
9
I/O
35
33
SEG3
O
9
7
D
10
I
V
PP
36
34
SEG4
O
10
8
D
11
/VC
ref
I
A
9
I
37
35
SEG5
O
11
9
D
12
/COMP
0
I
M0
I
38
36
SEG6
O
12
10
D
13
/COMP
1
I
M1
I
39
37
SEG7
O
13
11
TEST
I
TEST
I
40
38
SEG8
O
14
12
X1
I
GND
41
39
SEG9
O
15
13
X2
O
42
40
SEG10
O
16
14
GND
GND
43
41
SEG11
O
17
15
R0
0
/
SCK
I/O
A
1
I
44
42
SEG12
O
18
16
R0
1
/SI
I/O
A
2
I
45
43
SEG13
O
19
17
R0
2
/SO
I/O
A
3
I
46
44
SEG14
O
20
18
R0
3
I/O
A
4
I
47
45
SEG15
O
21
19
R1
0
I/O
A
5
I
48
46
SEG16
O
22
20
R1
1
I/O
A
6
I
49
47
SEG17
O
23
21
R1
2
I/O
A
7
I
50
48
SEG18
O
24
22
R1
3
I/O
A
8
I
51
49
SEG19
O
25
23
R2
0
I/O
A
0
I
52
50
SEG20
O
26
24
R2
1
I/O
A
10
I
53
51
SEG21
O
27
25
R2
2
I/O
A
11
I
54
52
SEG22
O
HD404618 Series
67
Pin Number
MCU Mode
PROM Mode
Pin Number
MCU Mode
PROM Mode
FP-80B
FP-80A,
TFP-80
Pin Name
I/O
Pin
Name
I/O
FP-80B
FP-80A,
TFP-80
Pin
Name
I/O
Pin
Name
I/O
55
53
SEG23
O
68
66
COM4
O
56
54
SEG24
O
69
67
V
1
57
55
SEG25
O
70
68
V
2
58
56
SEG26
O
71
69
V
3
V
CC
59
57
SEG27
O
72
70
TONEC O
60
58
SEG28
O
73
71
TONER O
61
59
SEG29
O
74
72
VT
ref
V
CC
62
60
SEG30
O
75
73
V
CC
V
CC
63
61
SEG31
O
76
74
OSC
1
I
V
CC
64
62
SEG32
O
77
75
OSC
2
O
65
63
COM1
O
78
76
RESET I
RESET
I
66
64
COM2
O
79
77
D
0
I/O
O
0
I/O
67
65
COM3
O
80
78
D
1
I/O
O
1
I/O
HD404618 Series
68
Programming the Built-in PROM
The MCU's built-in PROM is programmed in PROM mode which is set by pulling
TEST, M
0
, and
M
1
low,
and RESET high, as shown in figure 43. In PROM mode, the MCU does not operate, but it can be
programmed in the same way as any other commercial 27256 EPROM using a standard PROM
programmer and a 80-to-28-pin socket adaptor. Recommended PROM programmers and socket adapters
are listed in table 34.
Since an HMCS400-series instruction is ten bits long, the HMCS400-series MCU has a built-in conversion
circuit to enable use of a general-purpose PROM programmer. This circuit splits each instruction into a
lower 5 bits and an upper 5 bits that are read from or written to consecutive addresse. This means that if,
for example, 8 kwords of built-in PROM are to be programmed by a general-purpose PROM programmer,
a 16-kbyte address space ($0000$3FFF) must be specified.
Programming and Verification: The built-in PROM of the MCU can be programmed at high-speed
programming sequence without risk of voltage stress or damage to data reliability.
For details of PROM programming, refer to the notes on PROM Programming section.
Warnings
1. Always specify addresses $0000 to $3FFF when programming with a PROM programmer. If address
$4000 or higher is accessed, the PROM may not be programmed or verified correctly. Set all data in
unused addresses to $FF.
Note that the plastic-package version cannot be erased and reprogrammed.
2. Make sure that the PROM programmer, socket adapter, and LSI are aligned correctly (their pin 1
positions match), otherwise overcurrents may damage the LSI. Before starting programming, make
sure that the LSI is firmly fixed in the socket adapter and the socket adapter is firmly fixed onto the
programmer.
3. PROM programmers have two voltages (V
pp
): 12.5 V and 21 V. Remember that ZTAT
TM
devices
require a V
PP
of 12.5 V--the 21-V setting will damage them. 12.5 V is the Intel's 27256 setting.
Table 33 PROM Mode Selection
Pin
Mode
CE
OE
V
PP
O
0
O
7
Programming
Low
High
V
PP
Data input
Verification
High
Low
V
PP
Data output
Programming inhibition
High
High
V
PP
High impedance
HD404618 Series
69
Table 34 Recommended PROM Programmers and Socket Adapters
PROM Programmer
Socket Adapter
Manufacturer
Model Name
Manufacturer
Model Name
Package
DATA I/O Corp.
121B
29B
Hitachi
HS460ESF01H
FP-80B
HS460ESH01H
FP-80A
HS461EST01H
TFP-80
AVAL Corp.
PKW-1000
Hitachi
HS460ESF01H
FP-80B
HS460ESH01H
FP-80A
HS461EST01H
TFP-80
O O
0
7
A A
0
14
Address
A to A
0
14
Data
O to O
0
7
OE
CE
OE
CE
GND
D /V
10
PP
V
CC
V
CC
V
PP
RESET
TEST
M
M
V
CC
OSC
1
VT
ref
V
3
X1
0
1
V
CC
Figure 43 Connections for PROM Mode
HD404618 Series
70
Addressing Modes
RAM Addressing Modes
The MCU has three RAM addressing modes, as shown in figure 44 and described below.
Register Indirect Addressing Mode: The contents of the W, X, and Y registers (10 bits in total) are used
as a RAM address.
Direct Addressing Mode: A direct addressing instruction consists of two words. The first word contains
the opcode, and the contents of the second word (10 bits) are used as a RAM address.
Memory Register Addressing Mode: The memory registers (MR), consisting of 16 digits from $040 to
$04F, are accessed with the LAMR and XMRA instructions.
AP
9
AP
8
AP
7
AP
6
AP
5
AP
4
AP
3
AP
2
AP
1
AP
0
W
1
W
0
X
3
X
2
X
1
X
0
Y
3
Y
2
Y
1
Y
0
W register
X register
Y register
RAM address
Register Indirect Addressing
AP
9
AP
8
AP
7
AP
6
AP
5
AP
4
AP
3
AP
2
AP
1
AP
0
RAM address
Direct Addressing
d
9
d
8
d
7
d
6
d
5
d
4
d
3
d
2
d
1
d
0
2nd word of instruction
Opcode
1st word of instruction
AP
9
AP
8
AP
7
AP
AP
5
AP
4
AP
3
AP
2
AP
1
AP
0
RAM address
Memory Register Addressing
m
3
m
2
m
1
m
0
Opcode
Instruction
0
0
0
1
0
0
6
Figure 44 RAM Addressing Modes
HD404618 Series
71
ROM Addressing Modes and the P Instruction
The MCU has four ROM addressing modes, as shown in figure 45 and described below.
Direct Addressing Mode: A program can branch to any address in the ROM memory space by executing
the JMPL, BRL, or CALL instruction. Each of these instructions replaces the 14 program counter bits
(PC
13
PC
0
) with 14-bit immediate data.
Current Page Addressing Mode: The MCU has 32 pages of ROM with 256 words per page. A program
can branch to any address in the current page by executing the BR instruction. This instruction replaces the
eight low-order bits of the program counter (PC
7
PC
0
) with eight-bit immediate data. If the BR instruction
is on a page boundary (address 256n + 255), executing that instruction transfers the PC contents to the next
physical page, as shown in figure 46. This means that the execution of the BR instruction on a page
boundary will make the program branch to the next page.
Note that the HMCS400-series cross macro-assembler has an automatic paging feature for ROM pages.
Zero-Page Addressing Mode: A program can branch to the zero-page subroutine area located at $000
$003F by executing the CAL instruction. When the CAL instruction is executed, 6 bits of immediate data
are placed in the six low-order bits of the program counter (PC
5
PC
0
), and 0s are placed in the eight high-
order bits (PC
13
PC
6
).
Table Data Addressing Mode: A program can branch to an address determined by the contents of four-
bit immediate data, the accumulator, and the B register by executing the TBR instruction.
P Instruction: ROM data addressed in table data addressing mode can be referenced with the P instruction
as shown in figure 47. If bit 8 of the ROM data is 1, eight bits of ROM data are written to the accumulator
and the B register. If bit 9 is 1, eight bits of ROM data are written to the R1 and R2 port output registers.
If both bits 8 and 9 are 1, ROM data is written to the accumulator and the B register, and also to the R1 and
R2 port output registers at the same time.
The P instruction has no effect on the program counter.
HD404618 Series
72
d
9
d
8
d
7
d
6
d
5
d
4
d
3
d
2
d
1
d
0
2nd word of instruction
Opcode
1st word of instruction
p
0
p
1
p
2
p
3
[JMPL]
[BRL]
[CALL]
PC
9
PC
8
PC
7
PC
6
PC
5
PC
4
PC
3
PC
2
PC
1
PC
0
PC
PC
PC
PC
10
11
12
13
Program counter
Direct Addressing
Zero Page Addressing
a
5
a
4
a
3
a
2
a
1
a
0
Instruction
[CAL]
Opcode
PC
9
8
PC
7
6
PC
5
4
PC
3
PC
1
PC
0
PC
PC
10
11
12
13
Program counter
0
0
0
0
0
0
0
0
PC
PC
PC
PC
PC
PC
2
B
1
B
0
A
3
A
2
A
1
A
0
Accumulator
Program counter
Table Data Addressing
PC
9
PC
8
PC
7
PC
6
PC
5
PC
4
PC
3
PC
2
PC
1
PC
0
PC
PC
PC
10
11
12
13
B
2
B
3
B register
P
3
P
0
[TBR]
Instruction
Opcode
0
0
P
2
P
1
PC
Opcode
b
7
b
6
b
5
b
4
b
3
b
2
b
1
b
0
Instruction
PC
9
0
PC
PC
PC
11
12
13
Program counter
Current Page Addressing
[BR]
PC
10
7
PC
6
PC
5
PC
4
PC
3
PC
2
PC
1
PC
PC
8
PC
Figure 45 ROM Addressing Modes
HD404618 Series
73
BR AAA
AAA NOP
256 (n 1) + 255
256 n
BR AAA
BR BBB
256 n + 254
256 n + 255
256 (n + 1)
BBB NOP
Figure 46 Page Boundary between BR Instruction and Branch Destination
HD404618 Series
74
B
1
B
0
A
3
A
2
A
1
A
0
Accumulator
Referred ROM address
Address Specification
RA
9
RA
8
RA
7
RA
6
RA
5
RA
4
RA
3
RA
2
RA
1
RA
0
RA
RA
RA
10
11
12
13
B
2
B
3
B register
0
0
p
3
p
0
[P]
Instruction
Opcode
p
2
p
1
RA
RO
9
RO
0
RO
8
RO
7
RO
6
RO
5
RO
4
RO
3
RO
2
RO
1
B
B
B
B
A
A
A
A
3
2
1
0
3
2
1
0
If RO = 1
8
Accumulator, B register
ROM data
Pattern Output
RO
9
ROM data
R2
3
2
1
0
3
2
1
0
If RO = 1
9
Output registers R1, R2
R2
R2
R2
R1
R1
R1
R1
RO
0
RO
8
RO
7
RO
6
RO
5
RO
4
RO
3
RO
2
RO
1
Figure 47 P Instruction
HD404618 Series
75
Absolute Maximum Ratings
Item
Symbol
Value
Unit
Notes
Supply voltage
V
CC
0.3 to +7.0
V
Programming voltage
V
PP
0.3 to +14.0
V
1
Pin voltage
V
T
0.3 to (V
CC
+ 0.3)
V
Total permissible input current
I
O
100
mA
2
Total permissible output current
I
O
50
mA
3
Maximum input current
I
O
4
mA
4, 5
30
mA
4, 6
Maximum output current
I
O
4
mA
7, 8
Operating temperature
T
opr
20 to +75
C
Storage temperature
T
stg
55 to +125
C
Notes: Permanent damage may occur if these absolute maximum ratings are exceeded. Normal operation
must be under the conditions stated in the electrical characteristics tables. If these conditions are
exceeded, the LSI may malfunction or its reliability may be affected.
1. D
10
(V
PP
) of the HD4074618.
2. Total permissible input current is the total of input currents simultaneously flowing in from all the
I/O pins to GND.
3. Total permissible output current is the total of output currents simultaneously flowing out from V
CC
to all I/O pins.
4. The maximum input current is the maximum current flowing from any I/O pin to ground.
5. Applies to R0R3
6. Applies to D
0
D
9
7. The maximum output current is the maximum current flowing from V
CC
to any I/O pin.
8. Applies to D
0
D
9
, R0R3
HD404618 Series
76
Electrical Characteristics (Please inquire about the characteristics of HD404612,
HD404614, HD404616, and HD404618 at V
CC
= 2.2 V)
DC Characteristics (HD404612, HD404614, HD404616, HD404618: V
C C
= 2.7 V to 6.0 V;
HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0.0 V, T
a
= 20 to +75
C, unless otherwise specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Unit
Test
Condition
Notes
Input high
voltage
V
IH
RESET,
SCK
,
INT
0
,
INT
1
0.9V
CC
V
CC
+ 0.3
V
OSC
1
V
CC
0.3
V
CC
+ 0.3
V
External clock
operation
SI
0.9V
CC
V
CC
+ 0.3
V
Input low
voltage
V
IL
RESET,
SCK
,
INT
0
,
INT
1
0.3
0.1V
CC
V
OSC
1
0.3
0.3
V
External clock
operation
SI
0.3
0.1V
CC
V
Output high
voltage
V
OH
SCK
, TIMO, SO
V
CC
1.0
V
I
OH
= 0.5 mA
Output low
voltage
V
OL
SCK
, TIMO, SO
0.4
V
I
OL
= 0.4 mA
I/O leakage
current
|I
IL
|
RESET,
SCK
,
INT
0
,
INT
1
,
SI,
SO, TIMO, OSC
1
1
A
V
in
= 0 to V
CC
1
Stop mode
retaining
voltage
V
STOP
V
CC
2
V
No 32-kHz
oscillator
7
Current
dissipation in
I
CC1
V
CC
400
1000
A
V
CC
= 3 V
f
OSC
= 400 kHz
2
active mode
I
CC2
V
CC
500
1500
A
V
CC
= 3 V
DTMF: active
f
OSC
= 400 kHz
3
I
CC3
V
CC
1
2
mA
V
CC
= 3 V
f
OSC
= 400 kHz
D
12
, D
13
analog input
mode
4
Current
dissipation in
standby
mode
I
SBY
V
CC
200
500
A
V
CC
= 3 V
LCD on
f
OSC
= 400 kHz
5
Current
dissipation in
stop mode
I
STOP
V
CC
1
10
A
V
CC
= 3 V
No 32-kHz
oscillator
HD404618 Series
77
Item
Symbol
Pin(s)
Min
Typ
Max
Unit
Test
Condition
Notes
Current
dissipation in
subactive
mode
I
SUB
V
CC
50
100
A
V
CC
= 3 V
LCD on
35
70
A
6
Current
dissipation in
watch mode
(1)
I
WTC1
V
CC
5
15
A
V
CC
= 3 V
LCD off
Current
dissipation in
watch mode
(2)
I
WTC2
V
CC
15
35
A
V
CC
= 3 V
LCD on
Comparator
input
reference
voltage
scope
VC
ref
VC
ref
0
--
V
CC
1.2
V
Notes: 1. Output buffer current is excluded.
2. I
CC
is the source current when no I/O current is flowing while the MCU is in reset state.
Test conditions:
MCU: Reset
Pins: RESET,
TEST
at V
CC
3. I
SBY
is the source current when no I/O current is flowing while the MCU timer is in operation.
Test conditions:
D
12
, D
13
in digital input mode
DTMF in operation (excludes current flowing from VT
ref
to GND)
4. Pins D
12
and D
13
are in analog input mode and I/O current is not flowing.
Test conditions:
VC
ref
/D
11
, COMP0/D
12
, COMP1/D
13
at GND
DTMF stopped
5. Timer is in operation and I/O current is not flowing.
Test conditions:
MCU:
I/O in reset state
Serial interface stopped
D
12
, D
13
in digital input mode
DTMF stopped
Stanby mode
Pins :
RESET at GND
TEST
at V
CC
6. Applies only to HD404612, HD404614, HD404616, and HD404618.
7. RAM data retention.
HD404618 Series
78
I/O Characteristics for Standard Pins (HD404612, HD404614, HD404616, HD404618: V
CC
= 2.7 V to
6.0 V; HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0.0 V, T
a
= 20 to +75
C, unless otherwise specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Test Conditions
Unit Notes
Input high
voltage
V
IH
D
10
D
13
,
R0 R3
0.7V
CC
--
V
CC
+ 0.3
V
Input low
voltage
V
IL
D
10
D
13
,
R0R3
0.3
--
0.3V
CC
V
Output high
voltage
V
OH
R0R3
V
CC
1.0 --
--
I
OH
= 0.5 mA
V
Pull-up MOS
current
I
PU
R0R3
5
40
90
V
CC
= 3 V,
V
in
= 0 V
A
Output low
voltage
V
OL
R0R3
--
--
0.4
I
OL
= 0.4 mA
V
I/O leakage
current
|I
IL
|
D
11
to D
13
,
R0 to R3
--
--
1
HD404612,
HD404614
HD404616,
HD404618:
V
in
= 0 V to V
CC
A
1
D
10
--
--
20
HD4074618:
V
in
= 0 V to V
CC
A
2
Input high
voltage
V
IHA
D
12
, D
13
(analog
compare mode)
VC
ref
+
0.1
--
--
V
Input low
voltage
V
ILA
D
12
, D
13
(analog
compare mode)
--
--
VC
ref
0.1
V
Note: 1. Output buffer current is excluded.
2. The Max value for the HD404618, HD404616, HD404614, and HD404612 is 1
A.
HD404618 Series
79
I/O Characteristics for High-Current Pins (HD404612, HD404614, HD404616, HD404618: V
CC
= 2.7
V to 6.0 V; HD4074618: V
C C
= 3.0 V to 5.5 V, GND = 0 V, T
a
= 20 to +75
C, unless otherwise
specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Test Conditions Unit
Notes
Input high
voltage
V
IH
D
0
D
9
0.7V
CC
--
V
CC
+ 0.3
V
Input low
voltage
V
IL
D
0
D
9
0.3
--
0.3V
CC
V
Output high
voltage
V
OH
D
0
D
9
V
CC
1.0 --
I
OH
= 0.5 mA
V
Pull-up MOS
current
I
PU
D
0
D
9
5
40
90
V
CC
= 3 V,
V
in
= 0 V
A
Output low
voltage
V
OL
D
0
D
9
--
--
2.0
I
OL
= 15 mA
V
CC
= 4.5 V to 6 V
V
--
--
0.4
I
OL
= 0.4 mA
V
I/O leakage
current
|I
IL
|
D
0
D
9
--
--
1
V
in
= 0 to V
CC
A
1
Note: 1. Output buffer current is excluded.
LCD Circuit Characteristics (HD404612, HD404614, HD404616, HD404618: V
CC
= 2.7 V to 6.0 V;
HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0 V, T
a
= 20 to +75
C, unless otherwise specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Test Condition
Unit
Notes
Segment driver
voltage drop
V
ds
SEG1
SEG32
--
--
0.6
I
d
= 3
A
V
1
Common driver
voltage drop
V
dc
COM1
COM4
--
--
0.3
I
d
= 3
A
V
1
LCD power
supply division
resistor
R
Well
100
300
900
Between V
1
and GND
k
LCD voltage
V
LCD
V
1
2.7
--
V
CC
HD404612, HD404614,
HD404616, HD404618
V
2
3.0
--
V
CC
HD4074618
V
2
Notes: 1. V
DS
and V
DC
are the voltage drops from power supply pins V
1
, V
2
, and V
3
, and GND to each
segment pin and each common pin.
2. When V
LCD
is supplied from an external source, the following relations must be retained:
V
CC
V
1
V
2
V
3
GND
HD404618 Series
80
DTMF Characteristics (HD404612, HD404614, HD404616, HD404618: V
C C
= 2.7 V to 6.0 V;
HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0 V, T
a
= 20 to +75
C, unless otherwise specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Test Conditions
Unit
Notes
Tone output
voltage (1)
V
OR
TONER
500
660
--
VT
ref
GND = 2.0 V,
R
L
= 100 k
mV
rms
1
Tone output
voltage (2)
V
OC
TONEC
520
690
--
VT
ref
GND = 2.0 V,
R
L
= 100 k
mV
rms
1
Tone output
distortion
%DIS
--
3
7
Short circuit between
TONER and TONEC,
R
L
= 100 k
%
2
Tone output
ratio
dB
CR
--
2.5
--
Short circuit between
TONER and TONEC,
R
L
= 100 k
dB
2
Notes: 1. See figure 48.
2. See figure 49.
HD404618 Series
81
AC Characteristics (HD404612, HD404614, HD404616, HD404618: V
C C
= 2.7 V to 6.0 V;
HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0 V, T
a
= 20 to +75
C, unless otherwise specified)
Item
Symbol
Pin(s)
Min
Typ
Max
Test Condition
Unit
Notes
Clock
oscillation
frequency
f
OSC
OSC
1
,
OSC
2
--
400
--
1/4 division
kHz
--
800
--
kHz
X1, X2
--
32.768
--
kHz
Instruction
cycle time
t
cyc
--
10
--
f
OSC
/ f
CP
= 400 kHz
s
--
5
--
f
OSC
/ f
CP
= 800 kHz
s
Oscillator
stabilization
time
t
RC
OSC
1
,
OSC
2
--
--
7.5
f
OSC
= 400 kHz
ms
1
--
--
7.5
f
OSC
= 800 kHz
ms
1
X1, X2
--
--
3
T
a
= 10 to +60
C
s
2
External
clock
frequency
f
CP
OSC
1
--
400
--
kHz
--
800
--
kHz
External
clock high
width
t
CPH
OSC
1
1100
--
--
f
CP
= 400 kHz
ns
3
550
--
--
f
CP
= 800 kHz
ns
3
External
clock low
width
t
CPL
OSC
1
1100
--
--
f
CP
= 400 kHz
ns
3
550
--
--
f
CP
= 800 kHz
ns
3
External
clock rise
time
t
CPr
OSC
1
--
--
150
f
CP
= 400 kHz
ns
3
--
--
75
f
CP
= 800 kHz
ns
3
External
clock fall time
t
CPf
OSC
1
--
--
150
f
CP
= 400 kHz
ns
3
--
--
75
f
CP
= 800 kHz
ns
3
INT
0
high
width
t
IH
INT
0
2
--
--
t
cyc
/
t
subcyc
4, 6
INT
0
low
width
t
IL
INT
0
2
--
--
t
cyc
/
t
subcyc
4, 6
INT
1
high
width
t
IH
INT
1
2
--
--
t
cyc
4
HD404618 Series
82
Item
Symbol
Pin(s)
Min
Typ
Max
Test Condition
Unit
Notes
INT
1
low
width
t
IL
INT
1
2
--
--
t
cyc
4
RESET high
width
t
RSTH
RESET
2
--
--
t
cyc
5
Input
capacitance
C
in
D
10
--
--
90
HD4074618:
f = 1 MHz,
V
in
= 0 V
pF
8
All pins
except D
10
--
--
15
f = 1 MHz,
V
in
= 0 V
pF
RESET fall
time
t
RSTf
--
--
20
ms
5
Analog
comparator
stabilization
time
t
CSTB
D
12
, D
13
(analog input
mode)
--
--
2
t
cyc
7
Notes: 1. The oscillation stabilization time is the period required for the oscillator to stabilize after V
CC
reaches 2.7 V (3.0 V for HD4074618) at power-on or after RESET input goes high after stop
mode is cancelled. At power-on or when stop mode is cancelled, RESET must remain high for
at least t
RC
to ensure the oscillation stabilization time. Since t
RC
depends on the ceramic
oscillator's circuit constant and stray capacitance, contact the manufacturer when designing a
reset circuit.
2. The oscillation stabilization time is the period required for the oscillator to stabilize after V
CC
reaches 2.7 V (3.0 V for HD4074618) at power-on. The oscillation stabilization time (t
RC
) must be
ensured. If using a crystal oscillator, contact the manufacturer to determine what oscillation
stabilization time is required, since it depends on the circuit constants and stray capacitances.
3. See figure 50.
4. See figure 51. The unit t
cyc
applies when the MCU is in standby mode or active mode.
5. See figure 52.
6. The unit t
subcyc
applies when the MCU is in watch mode or subactive mode.
t
subcyc
= 244.14
s (32.768-kHz crystal oscillator)
7. The analog comparator stabilization time is the period required for the oscillator to stabilize and
for correct data to be read after D
12
/D
13
is input to enter analog input mode.
8. The Max value for the HD404618, HD404616, HD404614, and HD404612 is 15pF.
HD404618 Series
83
Serial Interface Timing Characteristics (HD404612, HD404614, HD404616, HD404618: V
CC
= 2.7 V
to 6.0 V; HD4074618: V
CC
= 3.0 V to 5.5 V, GND = 0 V, T
a
= 20 to +75
C, unless otherwise specified)
During Transmit Clock Output
Item
Symbol
Pin(s)
Min
Typ
Max
Test Condition Unit
Notes
Transmit clock
cycle time
t
Scyc
SCK
1
--
--
Load shown in
figure 54
t
cyc
/t
subcyc
1, 3
Transmit clock
high width
t
SCKH
SCK
0.5
--
--
Load shown in
figure 54
t
Scyc
1
Transmit clock
low width
t
SCKL
SCK
0.5
--
--
Load shown in
figure 54
t
Scyc
1
Transmit clock
rise time
t
SCKr
SCK
--
--
200
Load shown in
figure 54
ns
1
Transmit clock
fall time
t
SCKf
SCK
--
--
200
Load shown in
figure 54
ns
1
Serial output
data delay time
t
DSO
SO
--
--
500
Load shown in
figure 54
ns
1
Serial input data
setup time
t
SSI
SI
300
--
--
ns
1
Serial input data
hold time
t
HSI
SI
300
--
--
ns
1
HD404618 Series
84
During Transmit Clock Input
Item
Symbol
Pin(s)
Min
Typ
Max
Test Condition Unit
Notes
Transmit clock
cycle time
t
Scyc
SCK
1
--
--
t
cyc
/t
subcyc
1, 3
Transmit clock
high width
t
SCKH
SCK
0.5
--
--
t
Scyc
1
Transmit clock
low width
t
SCKL
SCK
0.5
--
--
t
Scyc
1
Transmit clock
rise time
t
SCKr
SCK
--
--
200
ns
1
Transmit clock
fall time
t
SCKf
SCK
--
--
200
ns
1
Serial output
data delay time
t
DSO
SO
--
--
500
Load shown in
figure 54
ns
1
Serial input data
setup time
t
SSI
SI
300
--
--
ns
1
Serial input data
hold time
t
HSI
SI
300
--
--
ns
1
Transmit clock
completion
detect time
t
SCKHD
SCK
1
--
--
t
cyc
/t
subcyc
1, 2, 3
Notes: 1. See figure 53.
2. The transmit clock completion detect time is the high level period after eight transmit clock
pulses have been input. The serial interrupt request flag is not set if the next transmit clock is
input before the transmit clock completion detect time has passed.
3. The unit t
subcyc
applies when the MCU is in subactive mode.
t
subcyc
= 244.14
s (32.768-kHz crystal oscillator)
TONEC
TONER
R = 100 k
L
R = 100 k
L
Figure 48 Tone Output Load Circuit
HD404618 Series
85
TONEC
TONER
R = 100 k
L
Figure 49 Distortion and dB
CR
Load Circuit
t
CPr
t
CPf
V 0.3 V
CC
0.3 V
OSC
1
t
CPH
t
CPL
1/f
CP
Figure 50 Oscillator Timing
0.9V
CC
0.1V
CC
INT
,
INT
0
1
t
IH
t
IL
Figure 51 Interrupt Timing
RESET
t
RSTf
t
RSTH
0.9V
0.1V
CC
CC
Figure 52 Reset Timing
0.9V
CC
0.1V
CC
t
DSO
t
SCKf
t
SCKL
t
SSI
t
HSI
t
Scyc
t
SCKr
t
SCKH
0.4 V
V 0.5 V
CC
V 1.0 V (0.9V )
CC
0.4 V (0.1V )
SCK
SO
SI
t
SCKHD
After 8 transmit clock
pulses are input
V 1.0 V and 0.4 V are the threshold voltages for transmit clock output.
0.9V and 0.1V are threshold voltages for transmit clock input.
CC
CC
CC
CC
CC
*
*
*
Note:
Figure 53 Serial Interface Timing
HD404618 Series
86
Test
point
30 pF
C
12 k
R
V
CC
R = 2.6 k
L
1S2074 H
or equivalent
Figure 54 Timing Load Circuit
HD404618 Series
87
Notes on ROM Out
Please pay attention to the following items regarding ROM out.
On ROM out, fill the ROM area indicated below with 1s to create the same data size as a 8-kword version
(HD404618). An 8-kword data size is required to change ROM data to mask manufac turing data since the
program used is for a 8-kword version.
This limitation applies when using an EPROM or a data base.
Vector
address
Zero-page
subroutine
(64 words)
Pattern &
program
(2,048 words)
Not used
Vector
address
Zero-page
subroutine
(64 words)
Pattern &
program
(4,096 words)
Not used
ROM 2-kword version:
HD404612
Address $0800$1FFF
$0000
$000F
$0010
$003F
$0040
$07FF
$0800
$1FFF
$0000
$000F
$0010
$003F
$0040
$0FFF
$1000
$1FFF
Fill this area with 1s
ROM 4-kword version:
HD404614
Address $1000$1FFF
Vector
address
Zero-page
subroutine
(64 words)
Pattern &
program
(6,144 words)
Not used
$0000
$000F
$0010
$003F
$0040
$17FF
$1800
$1FFF
ROM 6-kword version:
HD404616
Address $1800$1FFF
HD404618 Series
88
HD404612, HD404614, HD404616, HD404618 Option List
Please specify the first type below (the upper bits and lower bits are mixed together), when using the
EPROM on-package microcomputer type (including ZTATTM version).
5. ROM Code Media
7. Stop Mode
Used
Not used
8. Package
FP-80A
FP-80B
TFP-80
EPROM: The upper bits and lower bits are mixed together. The upper five bits and lower five bits are
programmed to the same EPROM in alternating order (i.e., LULULU...).
EPROM: The upper bits and lower bits are separated. The upper five bits and lower five bits are
programmed to different EPROMS.
6. System oscillator (OSC1 and OSC2)
Ceramic oscillator
External clock
f =
f =
MHz
MHz
Date of order
Customer
Department
ROM code name
LSI number
(to be filled in
by HITACHI)
/ /
1. ROM Size
Please check off the appropriate applications and
enter the necessary information.
HD404612
HD404614
HD404616
HD404618
2-kword
4-kword
6-kword
8-kword
2. Optional Functions
Note:
*
Options marked with an asterisk require a subsystem
crystal oscillator
*
*
With 32-kHz CPU operation, with time-base for clock
Without 32-kHz CPU operation, with time-base for clock
Without 32-kHz CPU operation, without time-base
HD404618 Series
89
Cautions
1. Hitachi neither warrants nor grants licenses of any rights of Hitachi's or any third party's patent,
copyright, trademark, or other intellectual property rights for information contained in this document.
Hitachi bears no responsibility for problems that may arise with third party's rights, including
intellectual property rights, in connection with use of the information contained in this document.
2. Products and product specifications may be subject to change without notice. Confirm that you have
received the latest product standards or specifications before final design, purchase or use.
3. Hitachi makes every attempt to ensure that its products are of high quality and reliability. However,
contact Hitachi's sales office before using the product in an application that demands especially high
quality and reliability or where its failure or malfunction may directly threaten human life or cause risk
of bodily injury, such as aerospace, aeronautics, nuclear power, combustion control, transportation,
traffic, safety equipment or medical equipment for life support.
4. Design your application so that the product is used within the ranges guaranteed by Hitachi particularly
for maximum rating, operating supply voltage range, heat radiation characteristics, installation
conditions and other characteristics. Hitachi bears no responsibility for failure or damage when used
beyond the guaranteed ranges. Even within the guaranteed ranges, consider normally foreseeable
failure rates or failure modes in semiconductor devices and employ systemic measures such as fail-
safes, so that the equipment incorporating Hitachi product does not cause bodily injury, fire or other
consequential damage due to operation of the Hitachi product.
5. This product is not designed to be radiation resistant.
6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without
written approval from Hitachi.
7. Contact Hitachi's sales office for any questions regarding this document or Hitachi semiconductor
products.
Copyright Hitachi, Ltd., 1998. All rights reserved. Printed in Japan.