Hitachi Single-Chip Microcomputer
H8S/2128 Series
H8S/2124 Series
H8S/2128 F-ZTAT™
H8S/2128 HD6432128W, HD6432128,
HD64F2128, HD64F2128V
H8S/2127 HD6432127RW, HD6432127R
H8S/2126 HD6432126RW, HD6432126R
H8S/2124 HD6432124
H8S/2123 HD6432123
H8S/2122 HD6432122
H8S/2120 HD6432120
Hardware Manual
ADE-602-114A
Rev. 2.0
3/12/99
©
Hitachi, Ltd. 1997
Notice
When using this document, keep the following in mind:
1. This document may, wholly or partially, be subject to change without notice.
2. All rights are reserved: No one is permitted to reproduce or duplicate, in any form, the
whole or part of this document without Hitachi’s permission.
3. Hitachi will not be held responsible for any damage to the user that may result from
accidents or any other reasons during operation of the user’s unit according to this document.
4. Circuitry and other examples described herein are meant merely to indicate the
characteristics and performance of Hitachi’s semiconductor products. Hitachi assumes no
responsibility for any intellectual property claims or other problems that may result from
applications based on the examples described herein.
5. No license is granted by implication or otherwise under any patents or other rights of any
third party or Hitachi, Ltd.
6. MEDICAL APPLICATIONS: Hitachi’s products are not authorized for use in MEDICAL
APPLICATIONS without the written consent of the appropriate officer of Hitachi’s sales
company. Such use includes, but is not limited to, use in life support systems. Buyers of
Hitachi’s products are requested to notify the relevant Hitachi sales offices when planning to
use the products in MEDICAL APPLICATIONS.
Contents
Contents ..... .....................................................................................................i
Preface ....... .....................................................................................................1
Section 1 Overview ........................................................................................3
1.1 Overview ......................................................................................................................... 3
1.2 Internal Block Diagram.................................................................................................... 8
1.3 Pin Arrangement and Functions ....................................................................................... 10
1.3.1 Pin Arrangement................................................................................................. 10
1.3.2 Pin Functions in Each Operating Mode ............................................................... 16
1.3.3 Pin Functions ...................................................................................................... 23
Section 2 CPU................................................................................................29
2.1 Overview ......................................................................................................................... 29
2.1.1 Features .............................................................................................................. 29
2.1.2 Differences between H8S/2600 CPU and H8S/2000 CPU ................................... 30
2.1.3 Differences from H8/300 CPU ............................................................................ 31
2.1.4 Differences from H8/300H CPU ......................................................................... 31
2.2 CPU Operating Modes ..................................................................................................... 32
2.3 Address Space.................................................................................................................. 37
2.4 Register Configuration ..................................................................................................... 38
2.4.1 Overview ............................................................................................................ 38
2.4.2 General Registers................................................................................................ 39
2.4.3 Control Registers ................................................................................................ 40
2.4.4 Initial Register Values ........................................................................................ 41
2.5 Data Formats.................................................................................................................... 42
2.5.1 General Register Data Formats ........................................................................... 42
2.5.2 Memory Data Formats ........................................................................................ 44
2.6 Instruction Set.................................................................................................................. 45
2.6.1 Overview ............................................................................................................ 45
2.6.2 Instructions and Addressing Modes..................................................................... 46
2.6.3 Table of Instructions Classified by Function ....................................................... 48
2.6.4 Basic Instruction Formats ................................................................................... 57
2.6.5 Notes on Use of Bit-Manipulation Instructions.................................................... 58
2.7 Addressing Modes and Effective Address Calculation...................................................... 59
2.7.1 Addressing Mode................................................................................................ 59
2.7.2 Effective Address Calculation............................................................................. 62
i
2.8 Processing States.............................................................................................................. 65
2.8.1 Overview ............................................................................................................ 65
2.8.2 Reset State.......................................................................................................... 66
2.8.3 Exception-Handling State ................................................................................... 67
2.8.4 Program Execution State..................................................................................... 68
2.8.5 Bus-Released State ............................................................................................. 68
2.8.6 Power-Down State .............................................................................................. 68
2.9 Basic Timing ................................................................................................................... 69
2.9.1 Overview ............................................................................................................ 69
2.9.2 On-Chip Memory (ROM, RAM)......................................................................... 70
2.9.3 On-Chip Supporting Module Access Timing....................................................... 71
2.9.4 External Address Space Access Timing .............................................................. 72
Section 3 MCU Operating Modes .................................................................. 73
3.1 Overview ......................................................................................................................... 73
3.1.1 Operating Mode Selection .................................................................................. 73
3.1.2 Register Configuration........................................................................................ 74
3.2 Register Descriptions ....................................................................................................... 74
3.2.1 Mode Control Register (MDCR)......................................................................... 74
3.2.2 System Control Register (SYSCR)...................................................................... 75
3.2.3 Bus Control Register (BCR) ............................................................................... 77
3.2.4 Serial Timer Control Register (STCR) ................................................................ 78
3.3 Operating Mode Descriptions........................................................................................... 79
3.3.1 Mode 1 ............................................................................................................... 79
3.3.2 Mode 2 ............................................................................................................... 79
3.3.3 Mode 3 ............................................................................................................... 80
3.4 Pin Functions in Each Operating Mode ............................................................................ 80
3.5 Memory Map in Each Operating Mode ............................................................................ 81
Section 4 Exception Handling ........................................................................ 91
4.1 Overview ......................................................................................................................... 91
4.1.1 Exception Handling Types and Priority............................................................... 91
4.1.2 Exception Handling Operation............................................................................ 92
4.1.3 Exception Sources and Vector Table................................................................... 92
4.2 Reset................................................................................................................................ 94
4.2.1 Overview ............................................................................................................ 94
4.2.2 Reset Sequence................................................................................................... 94
4.2.3 Interrupts after Reset........................................................................................... 96
4.3 Interrupts ......................................................................................................................... 97
4.4 Trap Instruction ............................................................................................................... 98
4.5 Stack Status after Exception Handling ............................................................................. 99
4.6 Notes on Use of the Stack ................................................................................................ 100
ii
Section 5 Interrupt Controller.........................................................................101
5.1 Overview ......................................................................................................................... 101
5.1.1 Features .............................................................................................................. 101
5.1.2 Block Diagram.................................................................................................... 102
5.1.3 Pin Configuration................................................................................................ 102
5.1.4 Register Configuration........................................................................................ 103
5.2 Register Descriptions ....................................................................................................... 104
5.2.1 System Control Register (SYSCR)...................................................................... 104
5.2.2 Interrupt Control Registers A to C (ICRA to ICRC)............................................ 105
5.2.3 IRQ Enable Register (IER) ................................................................................. 106
5.2.4 IRQ Sense Control Registers H and L (ISCRH, ISCRL)...................................... 107
5.2.5 IRQ Status Register (ISR) ................................................................................... 108
5.2.6 Address Break Control Register (ABRKCR)....................................................... 109
5.2.7 Break Address Registers A, B, C (BARA, BARB, BARC).................................. 110
5.3 Interrupt Sources.............................................................................................................. 111
5.3.1 External Interrupts .............................................................................................. 111
5.3.2 Internal Interrupts ............................................................................................... 112
5.3.3 Interrupt Exception Vector Table........................................................................ 113
5.4 Address Breaks ................................................................................................................ 115
5.4.1 Features .............................................................................................................. 115
5.4.2 Block Diagram.................................................................................................... 115
5.4.3 Operation............................................................................................................ 116
5.4.4 Usage Notes........................................................................................................ 116
5.5 Interrupt Operation........................................................................................................... 118
5.5.1 Interrupt Control Modes and Interrupt Operation ................................................ 118
5.5.2 Interrupt Control Mode 0 .................................................................................... 121
5.5.3 Interrupt Control Mode 1 .................................................................................... 123
5.5.4 Interrupt Exception Handling Sequence .............................................................. 126
5.5.5 Interrupt Response Times ................................................................................... 127
5.6 Usage Notes..................................................................................................................... 128
5.6.1 Contention between Interrupt Generation and Disabling ..................................... 128
5.6.2 Instructions that Disable Interrupts...................................................................... 129
5.6.3 Interrupts during Execution of EEPMOV Instruction .......................................... 129
5.7 DTC Activation by Interrupt ............................................................................................ 130
5.7.1 Overview ............................................................................................................ 130
5.7.2 Block Diagram.................................................................................................... 130
5.7.3 Operation............................................................................................................ 131
Section 6 Bus Controller ................................................................................133
6.1 Overview ......................................................................................................................... 133
6.1.1 Features .............................................................................................................. 133
6.1.2 Block Diagram.................................................................................................... 134
6.1.3 Pin Configuration................................................................................................ 135
iii