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.
Cautions
List of Items Revised or Added for This Version
PageItemDescription
1Table 1-1 Features / CPUChange in (2) High-speed calculation
specification
2Table 1-1 Features / Clock pulse Change in specification
generators
3Table 1-1 Features / LCD drive powerAddition
supply
5Figure 1-1 Block DiagramModification
8Table 1-2 Pin Functions / Power Modification of stabilization capacitance
source pin
132.1.1 FeaturesChange in High-speed operation
88Figure 4-2 Typical Connection to Addition of recommended value
Crystal Oscillator
89Figure 4-4 Typical Connection toAddition of recommended value
Ceramic Oscillator
91Figure 4-7 Typical Connection to Addition of description
32.768-kHz/38.4 kHz Crystal Oscillator
(Subclock)
92Figure 4-9 Pin Connection when notModification
Using Subclock
95Table 5-1 Operating ModesModification of subsleep mode/watch mode
descriptions
97Table 5-2 Internal State in Each Modification of Note 4
Operating Mode
995.1.1 System Control RegistersAddition of Notes to Bits 6 to 4
1. System control register 1 (SYSCR1)
1002. System control register 2 (SYSCR2) Modification of Bit 4 contents
1025.2 Sleep ModeAddition of description
1045.3.3 Oscillator Settling Timer after Addition of description
Stanby Mode is Cleared
1075.5.2 Clearing Subsleep ModeAddition of description
• Clearing by interrupt
1095.7.1 Transition to Active (Medium-Addition of description
Speed) Mode
147Table 8-10 Port 3 Pin StatesModification
226Table 9-13 Timer G Operation ModesAddition of description in Notes
2489.7.5 Application NotesAddition and modification of descriptions
251Figure 10-1 SCI3 Block DiagramModification
PageItemDescription
25610.2.5 Serial Mode Register (SMR)Addition of description in Notes
/ Bits 1 and 0
265Table 10-4 Relation between n Addition of description in Notes
and Clock
266Table 10-5 Maximum Bit Rate for Each Modification of Notes
Frequency (Asynchronous Mode)
267Table 10-7 Relation between n Addition of description in Notes
and Clock
26810.2.9 Clock Stop Register 1 Addition of description in Notes for Bits 6
(CKSTPR1)and 5
30310.5 Application NotesAddition of 9 and 10.
35714.2 When Using the Internal Power Modification of description
Supply Step-Down Circuit
360 15.2.1 Power Supply Voltage Modification of 1 to 3
to 362and Operating Range
363 Table 15-2 DC CharacteristicsAddition and modification
to 368
369 Table 15-3 Control Signal TimingAddition and modification
to 370
371Table 15-4 Serial Interface (SCI3-1,Addition of Notes
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/3867 Series and H8/3827 Series have a system-on-a-chip architecture that includes such
peripheral functions as a as an LCD controller/driver, six timers, a 14-bit PWM, a two-channel serial communication interface, and an A/D converter. This allows H8/3867 Series devices to be used
as embedded microcomputers in systems requiring LCD display.
The H8/3867 Series incorporates an LCD drive power supply and step-up constant power supply
(5 V), enabling a fixed 5 V voltage to be obtained independently of VCC.
This manual describes the hardware of the H8/3867 Series and H8/3827 Series. For details on the
H8/3864 Series instruction set, refer to the H8/300L Series Programming Manual.
Appendix C I/O Port Block Diagrams......................................................................... 449
C.1Block Diagrams of Port 1............................................................................................... 449
C.2Block Diagrams of Port 3............................................................................................... 453
C.3Block Diagrams of Port 4............................................................................................... 460
C.4Block Diagram of Port 5................................................................................................. 464
C.5Block Diagram of Port 6................................................................................................. 465
C.6Block Diagram of Port 7................................................................................................. 466
C.7Block Diagrams of Port 8............................................................................................... 467
C.8Block Diagram of Port A................................................................................................ 468
C.9Block Diagram of Port B................................................................................................ 469
Appendix D Port States in the Different Processing States................................... 470
Appendix E List of Product Codes................................................................................ 471
Appendix F Package Dimensions.................................................................................. 473
Section 1 Overview
1.1 Overview
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/3867 Series and H8/3827 Series comprise single-chip
microcomputers equipped with a controller/driver. Other on-chip peripheral functions include six
timers, a 14-bit pulse width modulator (PWM), two serial communication interface channels, and an
A/D converter. Together, these functions make the H8/3864 Series ideally suited for embedded
applications in systems requiring low power consumption and LCD display. Models in the H8/3867
and H8/3827 Series are the H8/3862 and H8/3822, with on-chip 16-kbyte ROM and 1-kbyte RAM,
the H8/3863 and H8/3823, with 24-kbyte ROM and 1-kbyte RAM, the H8/3864 and H8/3824, with
32-kbyte ROM and 2-kbyte RAM, the H8/3865 and H8/3825, with 40-kbyte ROM and 2-kbyte
RAM, the H8/3866 and H8/3826, with 48-kbyte ROM and 2-kbyte RAM, and the H8/3867 and
H8/3827, with 60-kbyte ROM and 2-kbyte RAM.
The H8/3867 and H8/3827 are also available in a ZTAT™* version with on-chip PROM which can
be programmed as required by the user.
Table 1-1 summarizes the features of the H8/3867 Series and H8/3827 Series.
Note: * ZTAT (Zero Turn Around Time) is a trademark of Hitachi, Ltd.
Table 1-1 Features
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. operating speed: 3 MHz
— Add/subtract: 0.67 µs (operating at 3 MHz)
— Multiply/divide: 4.67 µs (operating at 3 MHz)
— Can run on 32.768 kHz or 38.4 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
— Divide (16 bits ÷ 8 bits)
— Bit accumulator
— Register-indirect designation of bit position
× 8 bits)
1
Table 1-1 Features (cont)
ItemDescription
Interrupts36 interrupt sources
• 13 external interrupt sources (IRQ
• 23 internal interrupt sources
Clock pulse generators Two on-chip clock pulse generators
• System clock pulse generator: 0.4 to 6 MHz
• Subclock pulse generator: 32.768 kHz, 38.4 kHz
Power-down modesSeven power-down modes
• Sleep (high-speed) mode
• Sleep (medium-speed) mode
• Standby mode
• Watch mode
• Subsleep mode
• Subactive mode
• Active (medium-speed) mode
MemoryLarge on-chip memory
• H8/3862, H8/3822: 16-kbyte ROM, 1-kbyte RAM
• H8/3863, H8/3823: 24-kbyte ROM, 1-kbyte RAM
• H8/3864, H8/3824: 32-kbyte ROM, 2-kbyte RAM
• H8/3865, H8/3825: 40-kbyte ROM, 2-kbyte RAM
• H8/3866, H8/3826: 48-kbyte ROM, 2-kbyte RAM
• H8/3867, H8/3827: 60-kbyte ROM, 2-kbyte RAM
I/O ports64 pins
• 55 I/O pins
• 9 input pins
TimersSix on-chip timers
• Timer A: 8-bit timer
Count-up timer with selection of eight internal clock signals divided from
the system clock (ø)* and four clock signals divided from the watch clock
)*
(ø
w
• Asynchronous event counter: 16-bit timer
— Count-up timer able to count asynchronous external events
independently of the MCU's internal clocks
Note: * See section 4, Clock Pulse Generator, for the definition of ø and ø
to IRQ0, WKP7to WKP0)
4
.
w
2
Table 1-1 Features (cont)
ItemDescription
Timers• Timer C: 8-bit timer
— Count-up/down timer with selection of seven internal clock signals or
event input from external pin
— Auto-reloading
• Timer F: 16-bit timer
— Can be used as two independent 8-bit timers
— Count-up timer with selection of four internal clock signals or event
input from external pin
—Provision for toggle output by means of compare-match function
• Timer G: 8-bit timer
—Count-up timer with selection of four internal clock signals
—Incorporates input capture function (built-in noise canceler)
• Watchdog timer
—Reset signal generated by overflow of 8-bit counter
Serial communicationTwo serial communication interface channels on chip
interface
14-bit PWMPulse-division PWM output for reduced ripple
A/D converterSuccessive approximations using a resistance ladder
LCD controller/driverLCD controller/driver equipped with a maximum of 32 segment pins and
LCD drive power Step-up constant-voltage power supply allows LCD display
supply(H8/3867 Series only)
• SCI3-1: 8-bit synchronous/asynchronous serial interface
Incorporates multiprocessor communication function
• SCI3-2: 8-bit synchronous/asynchronous serial interface
Incorporates multiprocessor communication function
• Can be used as a 14-bit D/A converter by connecting to an external
low-pass filter.
• 8-channel analog input pins
• Conversion time: 31/ø or 62/ø per channel
four common pins
• Choice of four duty cycles (static, 1/2, 1/3, or 1/4)
• Segment pins can be switched to general-purpose port function in 8-bit
units
Table 1-2 outlines the pin functions of the H8/3864 Series.
Table 1-2 Pin Functions
Pin No.
FP-80A
TypeSymbolTFP-80CFP-80BI/OName and Functions
Power V
source pins CV
Clock pinsOSC
CC
V
SS
AV
AV
V
0
V
1
V
2
V
3
OSC
X
1
X
2
CC
CC
SS
1
2
System RES911InputReset: When this pin is driven low,
controlthe chip is reset
RESO2022OutputReset output: Outputs the CPU internal
3234InputPower supply: All VCCpins should be
2628connected to the system power supply.
See section 14, Power Supply Circuit.
57InputGround: All VSSpins should be
2729connected to the system power supply
(0 V).
7375InputAnalog 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 system power
supply.
24InputAnalog ground: This is the A/D
converter ground pin. It should be
connected to the system power supply
(0V).
3133OutputLCD power supply: These are the
3032Input
2931
2830
power supply pins for the LCD controller/
driver. They incorporate a power supply
split-resistance, and are normally used
with V
and V1shorted.
0
79InputThese pins connect to a
68Output
crystal or ceramic oscillator, or can be
used to input an external clock.
See section 4, Clock Pulse
Generators, for a typical connection
diagram.
35InputThese pins connect to a 32.768-kHz
46Output
or 38.4-kHz crystal oscillator.
See section 4, Clock Pulse
Generators, for a typical connection
diagram.
reset signal.
8
Table 1-2 Pin Functions (cont)
Pin No.
FP-80A
TypeSymbolTFP-80CFP-80BI/OName and Functions
System TEST810OutputTest pin: This pin is reserved and
controlcannot be used. It should be connected
to VSS.
Interrupt IRQ
pinsIRQ
IRQ
IRQ
IRQ
0
1
2
3
4
WKP
WKP
Timer pinsTMOW1012OutputClock output: This is an output pin for
AEVL2527InputAsynchronous event counter event
AEVH2426input: This is an event input pin for input
TMIC1517InputTimer C event input: This is an event
UD1921InputTimer C up/down select: This pin
TMIF1719InputTimer F event input: This is an event
TMOFL1113OutputTimer FL output: This is an output pin
TMOFH1214OutputTimer FH output: This is an output pin
TMIG1315InputTimer G capture input: This is an input
7274InputIRQ interrupt request 0 to 4: These
1517are input pins for edge-sensitive external
1618interrupts, with a selection of rising or
1719falling edge
1416
to 44 to46 to InputWakeup interrupt request 0 to 7:
7
3739These are input pins for rising or falling-
0
edge-sensitive external interrupts.
waveforms generated by the timer A
output circuit.
to the asynchronous event counter.
input pin for input to the timer C counter.
selects up- or down-counting for the
timer C counter. The counter operates
as an up-counter when this pin is high,
and as a down-counter when low.
input pin for input to the timer F counter.
for waveforms generated by the timer FL
output compare function.
for waveforms generated by the timer
FH output compare function.
pin for timer G input capture.
9
Table 1-2 Pin Functions (cont)
Pin No.
FP-80A
TypeSymbolTFP-80CFP-80BI/OName and Functions
14-bit PWM1820Output14-bit PWM output: This is an output
PWM pinpin for waveforms generated by the
14-bit PWM
I/O portsPB
to 1, 3 to 1,InputPort B: This is an 8-bit input port.
7
PB
0
P4
3
to P4071 to 6973 to 71I/OPort 4 (bits 2 to 0): This is a 3-bit I/O
P4
2
80 to 7480 to 76
7274InputPort 4 (bit 3): This is a 1-bit input port.
port. Input or output can be designated
for each bit by means of port control
register 4 (PCR4).
to 33 to 3635 to 38I/OPort A: This is a 4-bit I/O port. Input or
PA
3
PA
0
output can be designated for each bit by
means of port control register A (PCRA).
to 17 to 1019 to 12I/OPort 1: This is an 8-bit I/O port. Input or
P1
7
P1
0
output can be designated for each bit by
means of port control register 1 (PCR1).
to 25 to 1827 to 20I/OPort 3: This is an 8-bit I/O port. Input or
P3
7
P3
0
output can be designated for each bit by
means of port control register 3 (PCR3).
to 44 to 3746 to 39I/OPort 5: This is an 8-bit I/O port. Input or
P5
7
P5
0
output can be designated for each bit by
means of port control register 5 (PCR5).
to 52 to 4554 to 47I/OPort 6: This is an 8-bit I/O port. Input or
P6
7
P6
0
output can be designated for each bit by
means of port control register 6 (PCR6).
to 60 to 5362 to 55I/OPort 7: This is an 8-bit I/O port. Input or
P7
7
P7
0
output can be designated for each bit by
means of port control register 7 (PCR7).
to 68 to 6170 to 63I/OPort 8: This is an 8-bit I/O port. Input or
P8
7
P8
0
output can be designated for each bit by
means of port control register 8 (PCR8).
10
Table 1-2 Pin Functions (cont)
Pin No.
FP-80A
TypeSymbolTFP-80CFP-80BI/OName and Functions
Serial RXD
31
communi-This is the SCI31 data input pin.
cation
interface
TXD
31
(SCI)
SCK
31
RXD
32
TXD
32
SCK
32
A/DAN7 to13 to 1InputAnalog input channels 7 to 0:
converterAn080 to 7480 to 76These are analog data input channels
ADTRG1416InputA/D converter trigger input:
LCD COM
controller/COM
driver
SEG
SEG
32
1
CL16870OutputLCD latch clock: This is the output pin
CL26769OutputLCD shift clock: This is the output pin
DO6668OutputLCD serial data output: This is the
M6567OutputLCD alternation signal: This is the
2224InputSCI3-1 receive data input:
2325OutputSCI3-1 transmit data output:
This is the SCI31 data output pin.
2123I/OSCI3-1 clock I/O:
This is the SCI31 clock I/O pin.
7072InputSCI3-2 receive data input:
This is the SCI32 data input pin.
7173OutputSCI3-2 transmit data output:
This is the SCI32 data output pin.
6971I/OSCI3-2 clock I/O:
This is the SCI32 clock I/O pin.
to the A/D converter
This is the external trigger input pin to
the A/D converter
to33 to 3635 to 38OutputLCD common output: These are the
4
1
LCD common output pins.
to68 to 3770 to 39OutputLCD segment output: These are the
LCD segment output pins.
for the segment external expansion
display data latch clock.
for the segment external expansion
display data shift clock.
output pin for segment external
expansion serial display data.
output pin for the segment external
expansion LCD alternation signal.
11
Section 2 CPU
2.1 Overview
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.1 Features
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.67 µs*
—8 × 8-bit multiply:4.67 µs*
— 16 ÷ 8-bit divide:4.67 µs*
Note: * These values are at ø = 3 MHz.
•Low-power operation modes
SLEEP instruction for transfer to low-power operation
13
2.1.2 Address Space
7070
150
PC
R0H
R1H
R2H
R3H
R4H
R5H
R6H
R7H
R0L
R1L
R2L
R3L
R4L
R5L
R6L
R7L
(SP)
SP: Stack pointer
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
CCR I U H U N Z V C
General registers (Rn)
Control registers (CR)
75321064
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.3 Register 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.
Figure 2-1 CPU Registers
14
2.2 Register Descriptions
Lower address side [H'0000]
Upper address side [H'FFFF]
Unused area
Stack area
SP (R7)
2.2.1 General 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.
Figure 2-2 Stack Pointer
2.2.2 Control 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).
15
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 and rotate instructions, to store the value shifted out of the end bit
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.
16
2.2.3 Initial Register Values
When the CPU is reset, the program counter (PC) is initialized to the value stored at address H'0000
in the vector table, 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.3 Data Formats
The H8/300L CPU can process 1-bit data, 4-bit (BCD) data, 8-bit (byte) data, and 16-bit (word)
data.
•Bit manipulation instructions operate on 1-bit data specified as bit n in a byte operand
(n = 0, 1, 2, ..., 7).
•All arithmetic and logic instructions except ADDS and SUBS can operate on byte data.
•The MOV.W, ADD.W, SUB.W, CMP.W, ADDS, SUBS, MULXU (8 bits × 8 bits), and
DIVXU (16 bits ÷ 8 bits) instructions operate on word data.
•The DAA and DAS instructions perform decimal arithmetic adjustments on byte data in packed
BCD form. Each nibble of the byte is treated as a decimal digit.
17
2.3.1 Data Formats in General Registers
76543210don’t care
Data TypeRegister No.Data Format
70
1-bit dataRnH
76543210don’t care
70
1-bit dataRnL
MSBLSBdon’t care
70
Byte dataRnH
Byte dataRnL
Word dataRn
4-bit BCD dataRnH
4-bit BCD dataRnL
Notation:
RnH:
RnL:
MSB:
LSB:
Upper byte of general register
Lower byte of general register
Most significant bit
Least significant bit
MSBLSBdon’t care
70
MSBLSB
150
Upper digitLower digit
don’t care
7034
don’t care
Upper digitLower digit
70
34
Data of all the sizes above can be stored in general registers as shown in figure 2-3.
Figure 2-3 Register Data Formats
18
Loading...
+ 450 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.