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.
Preface
The H8/300L Series of single-chip microcomputers has the high-speed H8/300L CPU at its core,
with many necessary peripheral functions on-chip. The H8/300L CPU instruction set is compatible
with the H8/300 CPU.
The H8/3644 Series has a system-on-a-chip architecture that includes such peripheral functions as
a D/A converter, five timers, a 14-bit PWM, a two-channel serial communication interface, and an
A/D converter. This makes it ideal for use in advanced control systems.
This manual describes the hardware of the H8/3644 Series. For details on the H8/3644 Series
instruction set, refer to the H8/300L Series Programming Manual.
The H8/300L Series is a series of single-chip microcomputers (MCU: microcomputer unit), built
around the high-speed H8/300L CPU and equipped with peripheral system functions on-chip.
Within the H8/300L Series, the H8/3644 Series of microcomputers are equipped with a UART
(Universal Asynchronous Receiver/Transmitter). Other on-chip peripheral functions include five
timers, a 14-bit pulse width modulator (PWM), two serial communication interface channels, and
an A/D converter, providing an ideal configuration as a microcomputer for embedding in highlevel control systems. In addition to the mask ROM version, the H8/3644 is also available in a
ZTAT™*1 version with on-chip user-programmable PROM, and an F-ZTAT™*2 version with onchip flash memory that can be programmed on-board. Table 1 summarizes the features of the
H8/3644 Series.
Notes: 1. ZTAT is a trademark of Hitachi, Ltd.
2. F-ZTAT is a registered trademark of Hitachi, Ltd.
1
Table 1.1Features
ItemDescription
CPUHigh-speed H8/300L CPU
• General-register architecture
General registers: Sixteen 8-bit registers (can be used as eight 16-bit
registers)
• Operating speed
Max. operation speed: 5 MHz (mask ROM and ZTAT versions)
8 MHz (F-ZTAT version)
Add/subtract: 0.4 µs (operating at ø = 5 MHz)
0.25 µs (operating at ø = 8 MHz)
Multiply/divide: 2.8 µs (operating at ø = 5 MHz)
1.75 µs (operating at ø = 8 MHz)
Can run on 32.768 kHz subclock
• Instruction set compatible with H8/300 CPU
Instruction length of 2 bytes or 4 bytes
Basic arithmetic operations between registers
MOV instruction for data transfer between memory and registers
• Typical instructions
Multiply (8 bits × 8 bits)
Divide (16 bits ÷ 8 bits)
Bit accumulator
Register-indirect designation of bit position
Interrupts33 interrupt sources
• 12 external interrupt sources (IRQ
• 21 internal interrupt sources
Clock pulse
generators
Power-down
modes
Note: *Values in parentheses are for the F-ZTAT version.
Two on-chip clock pulse generators
• System clock pulse generator: 1 to 10 MHz (1 to 16 MHz)*
• Crystal or ceramic resonator:2 to 10 MHz (2 to 16 MHz)*
Note: * There is no P90 function in the flash memory version.
Figure 1.4 Pin Arrangement (TFP-80C: Top View)
8
1.3.2Pin Functions
Table 1.2 outlines the pin functions of the H8/3644 Series.
Table 1.2Pin Functions
Pin No.
TypeSymbolFP-64ADP-64STFP-80C I/OName and Functions
Power
source pins
Clock pinsOSC
V
CC
V
SS
AV
CC
AV
SS
OSC
334142InputPower supply: All VCC pins
should be connected to the user
system V
.
CC
7158, 11InputGround: All VSS pins should be
connected to the user system
GND.
58272InputAnalog power supply: This is
the power supply pin for the A/D
converter. When the A/D
converter is not used, connect
this pin to the user system V
3114InputAnalog ground: This is the A/D
converter ground pin. It should be
connected to the user system
GND.
8169InputSystem clock: These pins
1
connect to a crystal or ceramic
oscillator, or can be used to input
an external clock.
91710Output
2
See section 4, Clock Pulse
Generators, for a typical
connection diagram.
.
CC
System
control
X
1
6147InputSubclock: These pins connect to
a 32.768-kHz crystal oscillator.
X
2
5136Output
See section 4, Clock Pulse
Generators, for a typical
connection diagram.
RES101812InputReset: When this pin is driven
low, the chip is reset
TEST4125InputTest: This is a test pin, not for
use in application systems. It
should be connected to V
.
SS
9
Table 1.2Pin Functions (cont)
Pin No.
TypeSymbolFP-64ADP-64STFP-80C I/OName and Functions
Interrupt
pins
IRQ
IRQ
IRQ
IRQ
INT
INT
16
0
55
1
56
2
57
3
to
7
0
32 to 25 40 to 3338 to 31InputINT interrupt request 0 to 7:
24
63
64
1
19
69
70
71
Timer pinsTMOW536167OutputClock output: This is an output
TMIB313937InputTimer B1 event counter input:
TMOV374546OutputTimer V output: This is an output
TMCIV364445InputTimer V event input: This is an
TMRIV354344InputTimer V counter reset: This is a
TRGV57171InputTimer V counter trigger input:
FTCI394749InputTimer X clock input: This is an
FTOA404850OutputTimer X output compare A
FTOB414951OutputTimer X output compare B
InputIRQ interrupt request 0 to 3:
These are input pins for edgesensitive external interrupts, with
a selection of rising or falling
edge
These are input pins for edgesensitive external interrupts, with
a selection of rising or falling
edge
pin for waveforms generated by
the timer A output circuit
This is an event input pin for input
to the timer B1 counter
pin for waveforms generated by
the timer V output compare
function
event input pin for input to the
timer V counter
counter reset input pin for timer V
This is a trigger input pin for the
timer V counter and realtime
output port
external clock input pin for input
to the timer X counter
output: This is an output pin for
timer X output compare A
output: This is an output pin for
timer X output compare B
10
Table 1.2Pin Functions (cont)
Pin No.
TypeSymbolFP-64ADP-64STFP-80C I/OName and Functions
Timer pinsFTIA425052InputTimer X input capture A input:
This is an input pin for timer X
input capture A
FTIB435154InputTimer X input capture B input:
This is an input pin for timer X
input capture B
FTIC445255InputTimer X input capture C input:
This is an input pin for timer X
input capture C
FTID455356InputTimer X input capture D input:
This is an input pin for timer X
input capture D
14-bit
PWM pin
I/O portsPB7 to
PWM546268Output14-bit PWM output: This is an
output pin for waveforms
generated by the 14-bit PWM
PB
0
P17 to
P1
,
4
P1
0
59 to 64,
1 to 2
57 to 53 1,
3 to 1073 to 78
2, 3
71 to 67I/OPort 1: This is a 5-bit I/O port.
64 to 61
InputPort B: This is an 8-bit input port
Input or output can be designated
for each bit by means of port
control register 1 (PCR1)
P22 to
P2
0
49 to 47 57 to 5563, 5958I/OPort 2: This is a 3-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 2 (PCR2)
P32 to
P3
0
50 to 52 58 to 6064 to 66I/OPort 3: This is a 3-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 3 (PCR3)
P57 to
P5
0
32 to 25 40 to 3338 to 31I/OPort 5: This is an 8-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 5 (PCR5)
P67 to
P6
0
24 to 17 32 to 2529 to 22I/OPort 6: This is an 8-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 6 (PCR6)
11
Table 1.2Pin Functions (cont)
Pin No.
TypeSymbolFP-64ADP-64STFP-80C I/OName and Functions
I/O portsP77 to
P7
3
P87 to
P8
0
P94 to
P9
0
Serial com-
SI
1
munication
interface
(SCI)
SO
1
SCK
RXD485659InputSCI3 receive data input:
TXD495763OutputSCI3 transmit data output:
SCK
A/D
converter
AN7 to
AN
0
ADTRG303836InputA/D converter trigger input:
38 to 34 46 to 4247 to 43I/OPort 7: This is a 5-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 7 (PCR7)
46 to 39 54 to 4757 to 54,
52 to 49
I/OPort 8: This is an 8-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 8 (PCR8)
15 to 11 23 to 1918, 17
15 to 13
I/OPort 9: This is a 5-bit I/O port.
Input or output can be designated
for each bit by means of port
control register 9 (PCR9)
Note: There is no P9
the flash memory version
since P9
FV
pin.
PP
515965InputSCI1 receive data input:
This is the SCI1 data input pin
505864OutputSCI1 transmit data output:
This is the SCI1 data output pin
526066I/OSCI1 clock I/O:
1
This is the SCI1 clock I/O pin
This is the SCI3 data input pin
This is the SCI3 data output pin
475558I/OSCI3 clock I/O:
3
This is the SCI3 clock I/O pin
59 to 64,
1 to 2
3 to 1073 to 78
2, 3
InputAnalog input channels 11 to 0:
These are analog data input
channels to the A/D converter
This is the external trigger input
pin to the A/D converter
is used as the
0
function in
0
12
Table 1.2Pin Functions (cont)
Pin No.
TypeSymbolFP-64ADP-64STFP-80C I/OName and Functions
Flash
memory
OtherNC——1, 16,
FV
PP
111913InputOn-board-programmable flash
memory power supply:
Connected to the flash memory
programming power supply
(+12 V). When the flash memory
is not being programmed,
connect to the user system V
In versions other than the on-chip
flash memory version, this pin is
P9
0
—Non-connected pins: These
20, 21,
pins must be left unconnected
30, 39,
40, 41,
48, 53,
60 to 62,
79, 80
.
CC
13
Section 2 CPU
2.1Overview
The H8/300L CPU has sixteen 8-bit general registers, which can also be paired as eight 16-bit
registers. Its concise instruction set is designed for high-speed operation.
2.1.1Features
Features of the H8/300L CPU are listed below.
• General-register architecture
Sixteen 8-bit general registers, also usable as eight 16-bit general registers
• Instruction set with 55 basic instructions, including:
Multiply and divide instructions
Powerful bit-manipulation instructions
• Eight addressing modes
Register direct
Register indirect
Register indirect with displacement
Register indirect with post-increment or pre-decrement
Absolute address
Immediate
Program-counter relative
Memory indirect
• 64-kbyte address space
• High-speed operation
All frequently used instructions are executed in two to four states
High-speed arithmetic and logic operations
8- or 16-bit register-register add or subtract: 0.4 µs (operating at ø = 5 MHz)
• Low-power operation modes
SLEEP instruction for transfer to low-power operation
Note: * These values are at ø = 5 MHz.
15
2.1.2Address Space
The H8/300L CPU supports an address space of up to 64 kbytes for storing program code and
data.
See 2.8, Memory Map, for details of the memory map.
2.1.3Register Configuration
Figure 2.1 shows the register structure of the H8/300L CPU. There are two groups of registers: the
general registers and control registers.
General registers (Rn)
7070
R0H
R1H
R2H
R3H
R4H
R5H
R6H
R7H
(SP)
R0L
R1L
R2L
R3L
R4L
R5L
R6L
R7L
SP: Stack pointer
16
Control registers (CR)
150
PC
75321064
CCR I U H U N Z V C
Figure 2.1 CPU Registers
PC: Program counter
CCR: Condition code register
Carry flag
Overflow flag
Zero flag
Negative flag
Half-carry flag
Interrupt mask bit
User bit
User bit
2.2Register Descriptions
2.2.1General Registers
All the general registers can be used as both data registers and address registers.
When used as data registers, they can be accessed as 16-bit registers (R0 to R7), or the high bytes
(R0H to R7H) and low bytes (R0L to R7L) can be accessed separately as 8-bit registers.
When used as address registers, the general registers are accessed as 16-bit registers (R0 to R7).
R7 also functions as the stack pointer (SP), used implicitly by hardware in exception processing
and subroutine calls. When it functions as the stack pointer, as indicated in figure 2.2, SP (R7)
points to the top of the stack.
Lower address side [H'0000]
Unused area
SP (R7)
Stack area
Upper address side [H'FFFF]
Figure 2.2 Stack Pointer
2.2.2Control Registers
The CPU control registers include a 16-bit program counter (PC) and an 8-bit condition code
register (CCR).
Program Counter (PC): This 16-bit register indicates the address of the next instruction the CPU
will execute. All instructions are fetched 16 bits (1 word) at a time, so the least significant bit of
the PC is ignored (always regarded as 0).
17
Condition Code Register (CCR): This 8-bit register contains internal status information,
including the interrupt mask bit (I) and half-carry (H), negative (N), zero (Z), overflow (V), and
carry (C) flags. These bits can be read and written by software (using the LDC, STC, ANDC,
ORC, and XORC instructions). The N, Z, V, and C flags are used as branching conditions for
conditional branching (Bcc) instructions.
Bit 7—Interrupt Mask Bit (I): When this bit is set to 1, interrupts are masked. This bit is set to 1
automatically at the start of exception handling. The interrupt mask bit may be read and written by
software. For further details, see section 3.3, Interrupts.
Bit 6—User Bit (U): Can be used freely by the user.
Bit 5—Half-Carry Flag (H): When the ADD.B, ADDX.B, SUB.B, SUBX.B, CMP.B, or NEG.B
instruction is executed, this flag is set to 1 if there is a carry or borrow at bit 3, and is cleared to 0
otherwise.
The H flag is used implicitly by the DAA and DAS instructions.
When the ADD.W, SUB.W, or CMP.W instruction is executed, the H flag is set to 1 if there is a
carry or borrow at bit 11, and is cleared to 0 otherwise.
Bit 4—User Bit (U): Can be used freely by the user.
Bit 3—Negative Flag (N): Indicates the most significant bit (sign bit) of the result of an
instruction.
Bit 2—Zero Flag (Z): Set to 1 to indicate a zero result, and cleared to 0 to indicate a non-zero
result.
Bit 1—Overflow Flag (V): Set to 1 when an arithmetic overflow occurs, and cleared to 0 at other
times.
Bit 0—Carry Flag (C): Set to 1 when a carry occurs, and cleared to 0 otherwise. Used by:
• Add instructions, to indicate a carry
• Subtract instructions, to indicate a borrow
• Shift/rotate carry
The carry flag is also used as a bit accumulator by bit manipulation instructions.
Some instructions leave some or all of the flag bits unchanged.
Refer to the H8/300L Series Programming Manual for the action of each instruction on the flag
bits.
18
2.2.3Initial Register Values
In reset exception handling, the program counter (PC) is initialized by a vector address (H'0000)
load, and the I bit in the CCR is set to 1. The other CCR bits and the general registers are not
initialized. In particular, the stack pointer (R7) is not initialized. The stack pointer should be
initialized by software, by the first instruction executed after a reset.
2.3Data Formats
The H8/300L CPU can process 1-bit data, 4-bit (BCD) data, 8-bit (byte) data, and 16-bit (word)
data.
The H8/300L CPU can process 1-bit, 4-bit BCD, 8-bit (byte), and 16-bit (word) data. 1-bit data is
handled by bit manipulation instructions, and is accessed by being specified as bit n (n = 0, 1, 2, ...
7) in the operand data (byte).
Byte data is handled by all arithmetic and logic instructions except ADDS and SUBS. Word data
is handled by the MOV.W, ADD.W, SUB.W, CMP.W, ADDS, SUBS, MULXU ( b bits × 8 bits),
and DIVXU (16 bits ÷ 8 bits) instructions.
With the DAA and DAS decimal adjustment instructions, byte data is handled as two 4-bit BCD
data units.
19
2.3.1Data Formats in General Registers
Data of all the sizes above can be stored in general registers as shown in figure 2.3.
Data TypeRegister No.Data Format
70
1-bit dataRnH
1-bit dataRnL
Byte dataRnH
Byte dataRnL
Word dataRn
76543210don’t care
70
76543210don’t care
70
MSBLSB
70
don’t care
150
MSBLSB
MSBLSB
don’t care
4-bit BCD dataRnH
4-bit BCD dataRnL
Legend:
Upper byte of general register
RnH:
Lower byte of general register
RnL:
Most significant bit
MSB:
Least significant bit
LSB:
20
7034
Upper digitLower digit
70
don’t care
Upper digitLower digit
Figure 2.3 General Register Data Formats
don’t care
34
Loading...
+ 478 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.