October 1999
H8S and H8/300H
16-Bit
Microcontrollers
21-018F
H8S and H8/300H INDEX
Introduction 2 16-Bit CPU 5
Microcontrollers Instruction set 6 Addressing 7 Low power modes 8 Exceptions and interrupts 9
Memory 10
Peripherals Bus State Controller (BSC) 12 Direct Memory Access Control (DMAC) 14 Data Transfer Controller (DTC) 15 Timer 16 Timing Pattern Controller (TPC) and Programmable Pulse Generator (PPG) 20 Serial Communication Interface (SCI) 21
Smart Card Interface 28 Analog to Digital Converter (ADC) and Digital to Analog Converter (DAC) 29 Controller Area Network 30
Memory Type and Size 22
H8S and H8/300H Selector Guide 23
In Brief 27
Example Block Diagrams 31
Ordering Information Notes and Packages 37 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. Tools 43 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 Third Party Tools 46 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. Related Literature/Internet/ 5. No license is granted by implication or otherwise under any patents or other rights of any third party or CD-ROM/Application notes 47 Hitachi, Ltd. 6. MEDICAL APPLICATIONS: Hitachi’s products are not authorised 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.
1 Welcome To
Hitachi’s 16-bit microcontroller families customers, H8/300H is an excellent H8S and H8/300H. example where this policy has worked for our customers and Hitachi. Hitachi is the second biggest supplier of In continuation of this policy H8S is 16-bit microcontrollers to the European Hitachi’s answer to our customers request market (according to Dataquest), as well for more performance and lower power as the third for 4-bit, sixth for 8-bit and consumption at better cost/performance number 2 for 32-bit RISC ratios. Hitachi also added larger microcontrollers (the latter on a world- memories and improved the peripherals wide basis). to allow single-chip systems, where previously several components have been At Hitachi Europe we think that this necessary. Switching such a multi-chip success is driven by our strong system to a single-chip system can commitment to be a leading force in the drastically reduce radiation, in today’s microcontroller marketplace and our electronic industry a very important belief that we must listen to our concern. customer’s requirements and then meet these. As H8/300H is the result of H8S combining many years of experience of • 50ns cycle time Hitachi with the experience of our • 16/32-bit CPU • 16MByte address space H8/300H • TPU, PPG, ADC, DAC DMAC, DTC, SCI, WDT • 100ns cycle time subclock, CAN • 16/32-bit CPU • 16MByte address space • ITU, TPC, DMAC, ADC, DAC SCI, WDT H8/300 • 125ns cycle time • 8/16-bit CPU H8S/21xx • 64K address space • FRT, ADC, DAC, SCI, WDT • 50ns cycle time • 16/32-bit CPU • 16MByte address space • FRT, TMR, ADC, DAC, PWM H8/300L IRDA, DTC, SCI, WDT • 250ns cycle time • 8/16-bit CPU • Sub-Clock (32KHz) • LCD Drive, Timers, ADC FRT 16-bit Timer Serial ITU 16-bit Timer x 5 TPU 16-bit Timer x 6 TMR 8-bit Timer x 3 PPG Programmable Pulse Generator DMAC Direct Memory Access DTC Data Transfer Controller ADC A/D Converter DAC D/A Converter SCI Serial I/O WDT Watchdog Timer PWM 14-bit Pulse Width Modulation IRDA Infrared Interface H8 OVERALL ROADMAP TPC Timing Pattern Controller Figure 1 CAN Controller Area Network
2 The European electronics industry produces and ships over 20 million H8 From a statistics point of view, every day demands full service and support. microcontrollers every month, in a vast 2 customers decide to use a 16-bit Hitachi, responded by setting up a range of advanced packaging and microcontroller made by Hitachi. European engineering and tool design temperature options. subsidiary 12 years ago: Hitachi Usually our customer’s product Microsystems Europe (HMSE) based in H8S offers up to 25 native MIPS peak development will continue to proliferate Maidenhead (UK). performance (resulting in almost 10 over the years. For those customers who HMSE provides our customers with Dhrystone MIPS), the peripherals and may need more performance than 16-bit locally designed and supported tools the memory options (for example microcontrollers can offer, it is good to ranging from low cost evaluation boards H8S/2238F with 256KB Flash and 16K know that Hitachi is an industry leader to fully featured real time emulators RAM) to make it an industry standard in in 32-bit RISC microcontrollers as well. based on IBM-compatible PC’s at a very telecommunications and very successful Hitachi’s SH1 and SH2 RISC competitive price. Software ranges from in industrial (e. g. motor control, microcontroller families offer 10 MIPS Assembler, an ANSI C-Compiler via a vending machines, security systems) and or more (Dhrystone), as well as similar or C-level debugger to MakeApp, a tool emerging consumer applications like new in some cases even the same peripherals that sets up peripherals and creates driver electronic video cameras, still cameras and memory options up to 256K Flash routines on the click of a mouse. and advanced car radios. Just recently and 10K RAM. Please order Hitachi’s H8S and H8/300H have also enjoyed SH RISC microcontroller shortform to H8S and H8/300H are part of Hitachi’s much success in automotive applications, get a detailed introduction! software compatible H8 product range, as CAN is now available on-chip and in which covers a performance range from the rapidly growing field of smart-card 400ns to 40ns cycle time, whilst appliances, because many derivatives SH2 increasing word length from 8 to 16 bit include one or more ISO7816-compliant • 32-bit RISC CPU and memory space from 64KB to 16MB. serial interfaces. • 33 MIPS/5V • 17 MIPS/3V This product range offers an industry • ITU, TPC, DMAC, MAC leading mix of memory options ADC, SCI (including many flash derivatives), • Motor control and automotive ASSP peripherals and performance/power consumption, all of this being software compatible for protection of our SH1 customer’s software investment. Hitachi • 32-bit RISC CPU • 20 MIPS/5V • 12 MIPS/3V • ITU, TPC, DMAC, MAC ADC, SCI
H8/300H H8S
Figure 2
3 H8S Roadmap
H8S+CAN (F)* H8S/26xx H8S/2655 series H8S/2633 series (F)* H8S/267x series (F)* highest up to 128K/4K up to 256K/16K up to 256K/8K Multiply-Accumulate Multiply-Accumulate Multiply-Accumulate performance 20MHz at 5V 25MHz at 3.3V 33MHz at 3.3V
H8S/2357 series (F) H8S/2345 series (F) H8S/232x series (F) H8S/23xx up to 128K/8K up to 128K/4K up to 256K/8K general purpose 20MHz at 5V 20MHz at 5V 25MHz at 3.3V
H8S/2246 series H8S/2238 series (F) H8S/22xx up to 128K/8K up to 256K/16K lowest power low power low power/32KHz SC large memory 20MHz at 5V 13MHz at 3V Performance/ Memory/ Integration H8S/212x series (F) H8S/213x series (F) H8S/214x series (F) H8S/21xx up to 128K/4K up to 128K/4K up to 128K/4K lowest cost 64 pin package 80 pin package 100 pin package 20MHz at 5V 20MHz at 5V 20MHz at 5V
* Under development (F) FLASH version available Note: most 5V derivatives are also available in 3V/10MHz or 3V/13MHz H8/300H Roadmap
H8/3022 series (F)* H8/3052 series (F)* H8/300H up to 256K/8K 512K/8K 3rd generation low voltage operation big memory option large memory 18MHz at 3V 18MHz at 3V
H8/3042 series H8/3048 series (F) H8/306x series (F) H8/304x, 6x up to 64K/2K up to 128K/4K up to 128K/4K general small memory option high integration 2nd generation purpose 16MHz at 5V 16MHz at 5V 20MHz at 5V
H8/3032 series H8/3035 series H8/3039 series (F) H8/303x up to 64K/2K up to 256K/4K up to 128K/4K low cost small memory option big memory option with ROM 16MHz at 5V 18MHz at 5V 18MHz at 5V Performance/ Memory/ Integration
H8/3001, 2, 3 series H8/3004, 6 series H8/3005, 7 series H8/300x 512Byte RAM 2K RAM 4K RAM low cost 80, 100, 112 pin 80, 100 pin 80, 100 pin ROM-LESS 16MHz at 5V Up to 20MHz at 5V Up to 20MHz at 5V
* Under development (F) FLASH version available Note: most 5V derivatives are also available in 3V/8MHz or 3V/10MHz
Figure 3 4 CPU
All H8 share a common CPU Being general purpose there is no In addition to the general purpose architecture, a general purpose register restriction placed on how each register is registers there are two control registers, a architecture that allows efficient used, thus they can be used for pointer Condition Code Register (CCR) and a execution of software written in C and or data operations. The architecture also Program Counter (PC). The CCR is an produces dense code. A good code allows any of the data addressing modes 8-bit wide register which contains all the density is important to reduce the to be used in conjunction with any CPU flags such as overflow, zero and amount of memory needed, which in register. carry as well as the interrupt flags. The turn results in a lower system cost and carry flag also doubles as a bit helps to avoid external memory. As This rich set of general purpose accumulator when the bit manipulation shown below in figure 5 the 8-bit H8 registers provides the compiler writer operations are used. families have 16-bit wide registers and with ample opportunities to optimise the 16-bit families have 32-bit wide the code generated by the compiler. The H8/300H CPU offers a H8/300 registers, all of which can also be used Local variables can be optimised into compatible mode which allows partially (for example in bytes). H8S registers wherever possible, thus straightforward reuse of existing H8/300 adds an extended Condition Code reducing the number of bytes of code software. This mode is available in Register (EXR) to allow improved needed to manipulate them. Also, H8/3032, H8/3042 and µCBIC interrupt control and H8S/2655 adds a because each register can be used as an products. Multiply-Accumulate Unit (MAC) to accumulator, index register or address boost performance in DSP-type pointer, the address arithmetic which applications. must be performed by the compiler can be done very effectively. Register ER7 Furthermore H8S executes basic is used as a stack pointer, so all accesses instructions in only one clock cycle, half to stack based data can be performed as many as H8/300H. very fast.
H8S 0 7 R0 15 R1 31 R2 H8/300H ER0 R3 0 ER1 7 R0 R4 15 ER2 R1 R5 H8/300 ER3 31 R2 R6 H8/300L ER0 ER4 R3 R7 0 ER1 ER5 7 R4 15 R0 ER2 ER6 0 R5 PC R1 ER3 ER7 15 31 R6 R2 ER4 23 R7 R3 ER5 CCR R4 ER6 0 R5 PC ER7 15 EXR R6 23 R7 CCR MAC 0 PC 15 EXR 23 Sign Extended
CCR MAC MAC on H8S/26xx only EXR Sign Extended MAC
Figure 5
5 Instruction Set
H8/300H has an instruction set which Function Instruction suits the combined needs of HLL Data transfer MOV,PUSH, POP,MOVTPE, MOVFPE, LDM, STM programming and embedded applications. Arithmetic ADD, SUB,ADDX, SUBX, INC, DEC,ADDS, SUBS, It comprises of 62 instructions, with an operations DAA, DAS, MULXU, DIVXU, MULXS, DIVXS, CMP, emphasis on arithmetic instructions, NEG, EXTS, EXTU, TAS, MAC, LDMAC, STMAC, address manipulation and bit processing. CLRMAC More than half of all instructions have an Logic operations AND, OR, XOR, NOT instruction length of only 2 Bytes making Shift operations SHAL, SHAR, SHLL, SHLR, ROTL, ROTR, ROTXL, ROTXR very compact code. H8S extends the Bit manipulation BSET, BCLR, BNOT, BTST, BAND, BIAND, BOR, BIOR instruction set to 69 instructions. BOLD BXOR, BIXOR, BLD, BILD, BST, BIST instructions are new on H8S. Branch Bcc, JMP,BSR, JSR, RTS System control TRAPA, RTE, SLEEP,LDC, STC,ANDC, ORC, XORC, NOP In comparison with the H8/300 CPU most of the data transfer, logical, shift and and multiplication of 16 x 16-bit data Operation H8S H8/300H arithmetic instructions are improved to and division of 32 / 16-bit data. Add 32bit 50ns 125ns handle 16 and 32-bit data. New Multiplication and division are both operands instructions added to the H8/300H available as signed and unsigned AND 32 bit 50ns 125ns include signed multiplication, sign operations, which eliminate the need for operands extension, 16-bit branch instructions and time consuming library calls. The table multiply/divide 200ns/ 875ns a software trap instruction. below gives a guide to the execution 16bit operands 650ns speed of various arithmetic instructions (32bit result, signed) H8S further improves the instruction set with a clock of 16MHz (H8/300H) and by adding STM (store multiple) and 20MHz (H8S). LDM (load multiple). These instructions allow to evacuate multiple registers on to the stack, thus drastically shortening the time if compared with multiple PUSH and POP. For example, pushing 4 registers onto the stack takes 40 states on Instruction: BTST R1L, R1H H8/300H and only 11 on H8S. Also R1L points to a bit position within R1H improved are some bit manipulations (to include 16/32-bit absolute addressing) R1L 0 0 0 0 0 1 0 1 7 and shift operations to support 2-bit = 5 shifts. H8S/2655 also adds instructions to support the Multiply-Accumulate-Unit.
Arithmetic R1H 0 0 1 0 0 0 0 0 Instructions
In order to perform complex algorithms bit # 5 such as digital filtering, H8S and H8/300H are equipped with powerful arithmetic instructions, including Z in CCR addition and subtraction on 32-bit data Figure 6
6 Bit Processing Addressing
In microcontroller applications it is often To support large memory systems, the available addressing modes. Supporting necessary to manipulate data on a bit by linear address space of the H8/300H and both, array and stack data types, the CPU bit basis. A good example would be the H8S CPU core allows direct access has indirect addressing with either where an I/O pin needs to be set to to every address in the whole 16MByte postincrement or predecrement. These switch on a lamp or a solenoid. To meet address space via 24-bit address pointers. modes support byte, word and long word this demand H8S and H8/300H have 14 The linear address space means there is data (±1,2 and 4) as shown in figure 7. separate bit processing instructions which no need to set up page registers and allow the programmer to manipulate bit there are also no limitations on the size Three absolute addressing modes are data very easily. of code modules or data arrays and provided using 8, 16 or 24-bit absolute structures. addresses. Using the 24-bit address the It is also possible to perform boolean entire 16MBytes address space is algebra on bit data using the carry flag of Addressing accessible. The 8 and 16-bit absolute the CCR register as a bit accumulator. In Modes address modes assume that the upper a microcontroller application it is often byte or word of the address is H’FFFF or necessary to perform a branch depending Another way a CPU architecture can H’FF respectively. This allows for the on the values of two bit flags located in support the efficiency of the compiler is efficient address specification for the on- RAM or I/O ports. Using the boolean by providing a full set of powerful and chip I/O area and RAM areas which are operations provided by H8S and flexible addressing modes. To ensure that both placed at the top of the address H8/300H the first bit can be loaded into the compiler is as efficient as possible the map. These shortened addresses save the carry flag. Then a bitwise logical H8S and H8/300H CPU’s provide eight significant amounts of code when these operation can be executed using the addressing modes as shown in the table. areas are accessed. second bit. This sequence would then be Each instruction can use a subset of the followed by a branch depending on the value of the carry flag. Register direct R n Register indirect @ E R n Another feature of the H8S and H8/300H Register indirect @ (d: 16, E R n) bit processing capability is its ability to with displacement @ (d: 24, E R n) access bits indirectly, using the value from Register indirect with post-increment/ @ E R n +, @ - E R n a general purpose register as a bit pointer. Register indirect with pre-decrement This mechanism is shown in figure 6 and Absolute address @ a a : 8, @ a a : 16, @ a a : 24 is useful for scanning a byte for set or Immediate # x x : 8, # x x : 16, # x x : 32 PC-relative @ (d : 8, PC), @ (d : 16, PC) cleared bits. Memory indirect @@ a a : 8 Software Interrupt
Register indirect with post-increment or pre-decrement The TRAPA instruction has been *Register indirect with post-increment @ERn+ 31 0 23 0 implemented in the H8S and H8/300H Register contents CPU. This instruction implements a software interrupt, jumping to a service op reg routine via one of four exception vectors 1, 2 or 4 *Register indirect with pre-increment @ERn (TRAPA 0 - 3). This operation can be 31 0 used to implement fast, space efficient Register contents 23 0 calls to often used sub-routines such as schedulers and other O/S routines. The op reg Operand Size Added Value TRAPA instruction can also be used as a Byte 1 1, 2 or 4 Word 2 call to an error handling routine. Longword 4 Figure 7
7 Low Power
In today’s electronics industry, low power Current dissipation (mA) consumption is an ever increasing Conditions: 15 concern for many engineers. Beyond HD6472246 typ. Sample 10Mhz/3.0V obvious reasons like longer battery life Ta=25°C for example in mobile phones, notebooks Singlechip mode 10 and electronic cameras, there are many more reasons why low power is Active mode Sleep mode paramount: 5 Values based on sample • Some applications have legal measurements, values not guaranteed restrictions on power consumption like gas meters (to avoid a spark 0 Icc-ope. Sleep DTC TPU TMR A/D SCi0 SCi1 SCi2 TMR All causing an explosion), electricity All Mode Stop Stop Stop Stop Stop Stop Stop only module module Operate Stop metering to avoid unnecessary loading Figure 8 of the mains network or fixed proportion. A H8S/2246 for example telecommunication equipment that is DTC stop 0. 3mA will only draw appr. 4mA (typical) at powered off the line TPU stop 9mA 3V and at 2MHz with all the modules • other applications can draw much TMR stop 2mA operating. current under normal conditions but DAC stop 2. 2mA • The CPU can be stopped (sleep have to run of a battery when mains ADC stop 2mA mode), with all the registers and fails, e. g. security systems and cash each SCI stop 2mA memory contents being retained. registers Sample data (not guaranteed), typical, at 5V /20MHz • Some car electronics must keep up a Peripherals continue to operate and for a H8S/2355 minimum level of activity while a car any interrupt will wake up the CPU is parked, nevertheless the car battery instantly. Sleep mode reduces power case of H8/300H clock gearing must not be flat when the car is to be consumption by about one third. effects the entire chip, so reduction used again • Just like the CPU can be stopped at will be almost proportional, in case of • and last but not least, low power goes times of low activity, some H8/300H H8S clock gearing effects only bus hand in hand with low radiation! and all H8S derivatives allow to stop masters (CPU, DMA, DTC) to avoid peripheral modules. For example, reprogramming of e. g. timers. The Numerous measures have been taken to while the ADC is not needed the effect is shown in Figure 9. allow H8/300H and H8S to meet all software simply clears the • Some H8S derivatives also feature a these demands: corresponding bit in the module stop 32KHz subclock, which allows to • All derivatives are available in low register. Figure 8 shows how much run the CPU, the 8-bit timers and the voltage versions as well (except current is saved per module for a watchdogs at 32KHz (‘subactive’), or H8/3039). Low voltage operation not H8S/2355 and also shows a curve for just the 8-bit timers and watchdogs only significantly reduces power H8S/2246 with one module after the (‘subsleep’) or finally the watchdogs consumption, but also allows battery other being turned off. The lower only (‘watch mode’). In watch mode operation with a smaller number of curve shows the same, if the CPU is a periodical interrupt, which is cells and reduces radiation drastically, brought into sleep as well. generated from the subclock at a rate especially where external busses have to • Beyond the possibility to run of once per second for example, be used. H8/H8S off a slower clock statically, wakes up the CPU. The CPU then • All derivatives can be run off a slower some H8/300H and all H8S offer the checks system status (e. g. key clock, down to 2MHz. Power ability to dynamically reduce the pressed?) and then activates other consumption will drop almost in clock internally (‘clock gearing’). In modules or returns to sleep, as
8 required. Hence, very low average As an example for such a combination, power consumption can be achieved, let’s assume the DTC would be used to even with a real time clock being move results of ADC conversions from implemented in software. the ADC to a RAM buffer (e. g. 64 • If no activity is required, but RAM Byte). The CPU does not need to contents must be retained, H8/H8S process the data before acquisition of all microcontrollers can be brought into data has finished. This scenario would standby. In this mode the oscillator is allow to turn off all the modules, except stopped and power consumption the ADC and the DTC, and put the drops to leakage current levels CPU into sleep during acquisition. (0. 01µA, typical at room The resulting current would be only temperature). Two modes are appr. 3mA at 10MHz and 3V Vcc. provided, software standby which After acquisition of all 64 Byte has allows to retain IO ports and ended, an interrupt wakes up the CPU hardware standby, which only retains to process the data. While doing so the RAM. RAM retention voltage is software may choose to activate other only 2V. peripheral modules as required. Please note that power consumption in Some of these methods can be combined this scenario could be further reduced if to achieve outstanding average power 10MHz clock gives more performance consumption values, while allowing high then needed. Typical Icc between 2mA performance operation at times of high and 3mA are possible. activity.
Figure 9
Ta=R.T. 80
70 5.5V, 20MHz 60
50
40
30 Current consumption (mA) 20 3.0V, 10MHz
10
0 ø/8 ø/4 ø/2 ø Clock Values based on sample measurements, values not guaranteed
9 Exceptions Trap instruction priority interrupt sources, which are and exceptions (TRAPA) capable of interrupting a low priority Interrupt ISR which is already running. The These exceptions start when a TRAPA priority of individual interrupt sources Controller instruction is executed in program is programmed in a number of execution state. The TRAPA instruction interrupt priority registers (IPR). H8/300H and H8S feature a has four vectors as specified by its sophisticated interrupt system, that allows argument. This exception can be used as Interrupt to respond quickly to asynchronous an efficient mechanism for calling controller events. The worst case interrupt response operating system functions, as it takes on H8S time is 2. 6µs for H8/300H (at 16MHz) only 2 Byte to execute a TRAPA and 1. 5µs for H8S (at 20MHz). instruction, compared to 4 Byte for a The interrupt controllers within the H8S Because almost every interrupt source BSR and 8 Byte for a JSR. family differ, depending on the particular has its own vector, the interrupt service H8S series. H8S/2655 has an interrupt routine can immediately start to do some Interrupt controller that provides four modes useful work, instead of polling status flags Controller (0...3) and the other series provide a to find the cause of the interrupt. on H8/300H subset. If two or more exceptions occur simultaneously, they are accepted and The H8/300H interrupt controller can • Mode 0 processed in order of priority. Software be operated in two modes, either This mode provides the mechanism interrupts (‘Trap’) are accepted at all maintaining compatibility with the known from H8/300. Acceptance is times, in the program execution state. standard H8/300 interrupt controller, or solely controlled by the I-bit. in a more advanced mode. Interrupts are handled as follows: • Mode 1 • The PC and the CCR are pushed • H8/300 compatible In this mode acceptance is controlled onto the stack mode by I and UI, thus providing functional • The interrupt mask bits are updated In this mode the acceptance of compatibility with H8/300H. • A vector address corresponding to the maskable interrupts is controlled by the exception source is generated, and I-bit in the CCR. If I is set, then all • Mode 2 program execution starts from that interrupts are disabled (except NMI) This mode provides an 8-level address and if I is cleared then all interrupts are priority mechanism controlled by bits enabled. When an interrupt is I0. . I2 in the EXR register. Priorities External interrupts accepted, the controller automatically for each interrupt source can be (NMI and IRQ) sets the I-bit, thus disabling any other programmed in a set of IPR registers. maskable interrupts for the duration of H8/300H and H8S have several external the interrupt service routine (ISR), • Mode 3 interrupts, including one non-maskable- unless it is cleared by the users code. This mode combines mode 1 and 2, interrupt (NMI). NMI can be effectively providing up to 9 levels of programmed to be activated on either • H8/300H advanced priority. the rising or the falling edge. Interrupt mode request pins (IRQ) can be programmed To increase the power of the interrupt H8S/265x derivatives can use modes to recognise either a low level or a low controller, an extra interrupt status bit 0. . 4, H8S/263x, H8S/23xx, H8S/223x going edge on H8/300H, and on H8S is included in the condition code and 222x can use modes 0 and 2, and can be programmed to recognise a low register, known as the UI or User H8S/224x and 21xx can use modes 0 level, a rising or a falling edge or both Interrupt bit. This extended operation and 1. edges. allows the user to specify raised
10 Memory consumption of Hitachi’s microcontrollers, • USER Mode FLASH such a redesign will often immediately User mode is not entered via reset. It eliminate radiation problems. At the is fundamentally just like normal A traditional strength of Hitachi’s same time costly shielding measures may operation, but with Flash microcontrollers are the large integrated become unnecessary, thus lowering programming enabled via the mode memories and the advanced memory system cost and board space requirements (usually FWE) pins. technology. will become less. In user mode, an external trigger event causes the user software to copy Already for many years, it has been an Other benefits of large integrated a piece of code into RAM. Program important strategy to provide memory and especially of on-chip Flash execution then jumps to this code. microcontrollers with high-speed, on- memory are: The Flash can then be reprogrammed chip Flash memory to the European • end of line programming allows under the control of the user’s market, always at the leading edge of this flexibility in the software until application, using all the resources of industry trend. This technology is now shipment the chip (i. e. downloading the new offered in its third generation, providing • allows easy and fast update in the field code does not necessarily have to use larger memory sizes and single-voltage without the need to open the a serial interface, but could use any programming. Hitachi is currently equipment other resource). This mode is shipping over 4M Flash microcontrollers • allows software updates even remotely, intended for Flash memory updates. per month. e. g. via modem/phone line • fast response to changing customer • PROM Mode A table in the middle of this brochure requirements All H8/H8S Flash derivatives can also shows Hitachi’s 16-bit microcontrollers • non volatile storage of data and be programmed using general purpose by ROM and RAM size, including 16 parameters programming equipment, i. e. in the on-chip Flash derivatives. Please use the • full availability of all ports, if external same way OTP’s are programmed. table to select the devices which meet busses can be avoided your memory requirements. • full speed operation, often impossible or expensive if external memory is Hundreds of customers worldwide have used taken advantage of our flash based microcontrollers in their designs, about Flash programming one third in industrial and automotive applications, approximately one fourth • BOOT Mode each in consumer and office automation Boot mode is entered if the mode and the remainder in telecommunications. pins of a H8/H8S are in a certain state after reset. In boot mode Integrating large and flexible memories program execution starts from a has numerous benefits for our customers, hidden ROM. The software in this some of which are becoming crucial in ROM initialises one of the serial today’s demanding electronics industry. interfaces, downloads another piece of For example: Switching an older software (available from Hitachi, if microcontroller design, which uses desired), which then allows to external memory and peripherals, to a (re)programme the Flash memory. single-chip design, will drastically reduce Boot mode can be used to supply a radiation, because the address and data blank (i. e. new) Flash device with a busses are a major source of radiation in software, even when the device is a system. Together with the low power already soldered onto the PCB.
11 Bus State Controller (BSC)
As one of the key reasons for using the • DRAM access protocol for one area executes slow external write accesses H8S and H8/300H is the 16MBytes on 300H (=2Mbytes) and for 4 areas independently (on H8S/26xx and on linear address space, it will often be used on H8S (=8Mbytes)(not on all some H8S/23xx derivatives) and the in a system with a large amount of devices) improvement of read access time by external memory. Consequently, H8S moving the clock edge that latches the and H8/300H are supported by a Bus State Controller read data to the end of the bus cycle. powerful bus state controller (BSC) that (BSC) on H8S allows external memory and/or DRAM interface peripherals to be connected with no (in One of the major advantages of H8S over some rare cases with little) glue logic. H8/300H is its basic instruction Areas two to five can be set to interface Also, the BSC helps to get the maximum execution within a single clock cycle, that directly to DRAM on on H8S/26xx and performance out of any external devices, is only 50ns at 20MHz clock if executed on some H8S/23xx derivatives, allowing for example by avoiding address decode from internal memory. In order to up to 8MB of DRAM to be connected delays, where on-chip chip-select minimise the negative impact on without any glue logic. The BSC generation is used. performance when going off chip, every handles the address multiplexing (8,9 or effort has been made to create a BSC 10 bits), the timing and allows to use fast The BSC divides the memory space into with a maximum of throughput and page mode. DRAM with CAS-before- 8 areas. For each of these areas a number flexibility. RAS (CBR) or self-refresh are of attributes is selectable, for example: supported. For CBR refresh mode the • the wait mode (automatic insertion or Major enhancements include support for BSC provides an independent refresh hardware protocol) fast-page mode DRAM (on H8S/26xx counter, so that no other timers have to • the number of wait states and on some H8S/23xx derivatives), be used. • the bus width (8/16-bit) burst mode ROM, a write buffer that
Ø
Address bus
Data Bus tACC
Ø
Address bus
Data Bus tACC Improved Access Time Figure 10
12 Improved read state internal processing continues as long access timing as there is no external access.The internal bus master, wishing to access the In order to give external devices a external bus during bus release state, may maximum of time to drive the required use the BREQO signal to indicate to the data onto the bus, the read access edge external master that the bus ownership that latches the data, has been moved to should be given back. The external bus the end of the cycle. Therefore read master should respond by dropping access time is improved by approximately BREQ. BREQO can also be used to one quarter, compared with H8/300H. signal that a refresh cycle for a DRAM is Figures 10 & 11 illustrate this effect for pending. several frequencies.
Write data buffer
Improved Access Time On H8S/26xx and on some H8S/23xx derivatives, a write data buffer is 200ns provided. This feature allows the CPU H8S to continue internal processing, while the BSC takes care of slow write accesses independently. Figure 12 shows an 100ns example of the timing when the write 50ns data buffer is used. When this function is H8/300H activated, if an external write or DMA single address mode transfer continues for 10 12 16 20 MHz 2 states or longer, and there is an internal Figure 11 access next, only an external write is executed in the first state. But from the next state onward an internal access is On-chip memory read Internal I/O register read executed in parallel with the external access, rather than waiting until it ends. External write cycle
T1 T2 TW TW T3 Bus release
Internal address bus On all H8S devices a mechanism is Internal memory Internal I/O register address provided to allow external bus masters to Internal read signal obtain external bus ownership.
To request ownership an external master External address A23 to A0 must drive the BREQ pin low. After the CS BREQ pins has been sampled low by the External n H8S, the address bus, data bus and the space write bus control pins are placed in a high HWR, LWR impedance state and the Bus D to D Acknowledge (BACK) signal is asserted 15 0 to signal to the external master that the Figure 12 bus is now available. During bus release
13 Direct Memory Access Controller (DMAC)
In a system with a high performance Some of the major improvements on performed between any area of the full CPU and with large memory, a Direct H8S are: 16MBytes address space. This mode Memory Access Controller will • A special transfer mode has been allows either a single transfer to occur significantly increase system performance. added, single address mode, where per request (‘normal mode’), or for a Instead of wasting CPU performance to both resources must be external and block of data to be moved (‘block move data between peripherals and data is transferred in fly-by fashion for transfer mode’). In ‘normal mode’ and memory, virtually all of the CPU fastest transfer speed. with ‘auto-request’ enabled, the DMAC performance can be used for calculations, • More transfer request sources, e. g. can be set up in a burst mode, taking while the DMA handles the data A/D conversion end interrupt and at over the bus from the processor until all transfers. least 2 SCI can request a transfer the transfers are complete, or in a cycle steal mode where the processor and the If combined with other peripherals, such Short Address Mode DMAC share the bus. as timers, SCI’s or the real time outputs of the TPC/PPG, entire autonomous In this mode either the source or Single address subsystems can be built, for example to destination address is limited to only 8 mode (H8S) drive stepper motors or to communicate bits (H8/300H) or 16 bits (H8S), with with LCD modules or keyboards with the upper bits being automatically set to Figure 13 illustrates the new single hardly any CPU intervention. logic ‘1’. This allows to access the address mode. In single address mode a internal IO registers. The other address transfer of data is carried out directly As H8S almost triples the CPU is 24 bits wide, so that the entire between the data busses of two external performance of H8/300H, the DMAC on memory space is accessible. devices, e. g. an external peripheral and H8S has improvements over the H8/300H Within short address mode there is ‘IO DRAM. The advantage is the speed of DMAC, in order to keep CPU and mode’ (called sequential mode on H8S), the transfer, because the data is moved in DMAC performance in a good balance. where the full address can be a single cycle without a temporary But let us first have a look at the common automatically incremented or storage. Either the source or the features: decremented,‘idle mode’ with the full destination must be a device which can address being fixed and ‘repeat mode’, be accessed with a strobe alone, using the • 4 channels in short address mode which allows cyclic data buffers to be DACK pin. The address bus is used to (used for transfers between internal automatically transferred. Cyclic data access the other resource. IO and memory)* buffers are useful for many applications, • 2 channels in full address mode (used e. g. to output a control pattern for a for transfers between memory and stepper motor.
memory, or between external IO and RD memory) Full Address HWR, LWR External • Byte or word transfer selectable Mode Address bus A23 to A0 memory • address increment, decrement or fixed (Read) selectable, depending on mode To perform memory to • DMA transfer request possible by memory transfers the full H8S/2655 (Write) timer, SCI0 and external request, address mode can be D to D depending on mode used. Here, the source 15 0
(high impedance) Data bus • Interrupt request possible after each and destination addresses transfer or after specified number of are 24-bits wide each, External device transfers and therefore memory to DACK memory transfer can be * 8 channels on H8/3003 Figure 13 14 Data Transfer Controller (DTC)
Analysis of many applications that use a the block, thus practically eliminating the takes 3 cycles and the actual data transfers DMAC has shown that a substantial part overhead penalty. take 2 cycles (minimum). of these applications do not require the maximum speed of data transfers. These Also, a single trigger can request multiple The DTC could be seen as a DMAC applications use a DMAC mainly to transfers (chain mode). with only a single channel implemented reduce CPU overhead, allowing the This feature could, for example, be used in hardware. The registers for the CPU to use its performance for to move the result of an analogue-to- destination and source address, for the calculations. digital conversion to a circular buffer in transfer mode and the transfer count RAM, followed by automatic actually exist only once. However, these Therefore Hitachi conceived another reprogramming of the ADC to perform registers are loaded with the information peripheral to autonomously handle data other conversions. If the tasks given to to be used for a particular transfer from transfers, the Data Transfer Controller the ADC are stored in a table in ROM, RAM. That means that the structure of (DTC). The DTC puts emphasise on which is then used by the DTC in a the DTC registers is mirrored in a special offloading the CPU from data transfer round-robbing scheme, while the DTC RAM as many times as the tasks, while providing a maximum of conversion results are stored in a designer has chosen to implement flexibility. Unlike a DMAC the DTC can corresponding number of circular buffers transfer channels. Each transfer can be handle a very large number of transfer in RAM, the DTC and the ADC could specified to be byte- or word-wide, channels and transfers can be requested by perform a large set of completely source and destination addresses can both almost any peripheral that can request an different tasks without any CPU be 24-bits wide (i. e. cover the full interrupt as well as by software. On the intervention whatsoever. address range). Source and destination other hand a DTC transfer is Figure 14 shows the timing of such a addresses can be either incremented or approximately 5 times slower than a DMA chain transfer. Please note that one cycle decremented (by 1 or 2), or can be fixed. transfer (1000ns as opposed to 200ns at of phi is only 50ns at 20MHz. As can be A CPU interrupt can be requested for 20MHz, assuming e. g. source is a seen, the DTC vector is read after a the interrupt that triggered the DTC peripheral and destination memory). In transfer request in only one cycle, each transfer, either after each transfer or after block transfer mode the DTC overhead is move of the transfer information the specified number of transfers have divided by the number of transfers within between DTC RAM and DTC registers been performed.
Figure 14
ø
DTC activation request
DTC request Data transfer Data transfer Vector read Address Read Write Read Write
Transfer Transfer Transfer Transfer information information information information read write read write
15 Timer
One of the most important peripherals used. Hence, more money then is being the triggering of a DMA channel. on any microcontroller is the timer unit. spent on more powerful Channels 3 and 4 allow to produce a Timers have many uses in electronic microcontrollers, could be saved on pulse with duration down to one systems. They trigger the task switch of external devices, assembly cost, board clock cycle (62. 5ns at 16MHz). real time operating systems, update space, power supply and on reduced software real time clocks, control AC, DC counter measures against radiation. In • Input Capture Functions or stepper motors, check validity of particular, electronic systems which The ITU provides up to 10 channels external signals (‘timeout’), count pulses currently use 8-bit microcontrollers of input capture. In this mode the for example from phase quadrature should be reconsidered under these timer can be set up so that a transition encoders and much more. Timers can aspects! on an input pin causes the value even act as accurate digital-to-analog currently in the count register to be converters (DAC), if used as pulse-width- Integrated Timer transferred into a capture register, thus modulator (PWM). Unit (ITU) time stamping that particular event. In order to accommodate all these The ITU can be set to capture rising applications, Hitachi has developed 2 The ITU consists of five separate 16-bit edges, falling edges and either of powerful and flexible timer units for timer channels, each of which can be these. If required the timer unit can their 16-bit microcontrollers, as well as clocked from an internal derivative of the also clear the timer when the several special-function timers, for system clock (ø, ø/2, ø/4 and ø/8) or programmed external event occurs. example separate PWM timers, watch from an external pin. If the ø clock The two buffer registers (BRA and dog timers (WDT), low-power support option is selected, then the minimum BRB) provided in timer channels 3 timers, etc. These two timer units are the resolution of the timer is 62. 5ns (ø = and 4 can be used to buffer input ITU on H8/300H, a 5-channel 16-bit 16MHz). The standard timer functions time stamps. This allows events which timer unit with up to 10 input provided by the ITU include ten general occur very close to each other to be capture/output compare (IC/OC) and registers (GR), which can be used as time stamped using one capture pin. the TPU on H8S, a 6-channel 16-bit output compares or input captures. A This feature can also be used to timer unit with up to 16 IC/OC. further four 16-bit buffer registers (BR) measure the width of an incoming An exception are the H8S/21xx devices. reduce the overhead placed on the CPU pulse, by programming the capture H8S/21xx is aimed on very cost sensitive when servicing the timer block. input to be triggered on both the application, where the advanced timer rising and falling edges. functionality of the ITU/TPU is either • Output Compare Functions By using input captures to measure not needed or can be handled by the To create output waveforms or timed the timing of external signals, very high performance H8S CPU instead. interrupts, the ITU provides up to 10 accurate measurements of variables H8S/21xx has a 16-bit Free-Running- output compare registers. The output such as frequency can be taken. The Timer (FRT) with 4 IC and 2 OC and 3 compares work by producing an user can be sure that the accuracy of timers with 8-bit. A separate 14-bit output of a pre-programmed level the measurement is not compromised PWM and 2 WDT (one with 32KHz and/or an interrupt when the value by interrupt response time, as it is subclock) are also provided. in the counter matches the value entirely a hardware driven facility. stored in one of the output compare It is also possible to initiate DMA Together with the large integrated registers. The events that can be transfers when an input capture event memories and the other peripherals, initiated by these compare matches occurs. This allows time stamps to be these powerful timers are aimed at are transitions on an output pin (to automatically placed in memory via making single-chip systems possible, high, to low or toggle), a CPU the DMA controller, without needing where previously microncontrollers with interrupt (used for software timing to interrupt the CPU. additional external devices had to be functions), clearing the counter and
16 • Timer Synchronisation The table below shows the PWM frequencies which can be obtained versus device clock speed and output resolution. To allow timer channels in the ITU PWM 16 12 10 8 6 to be used in synchronisation, it is Res. MHz MHz MHz MHz MHz possible to set up two or more timers 14-bit 976. 5 Hz 732. 7 Hz 610 Hz 488 Hz 365 Hz so that they are simultaneously 12-bit 3. 9 KHz 2. 9 KHz 2. 4 KHz 2 KHz 1. 5 KHz written to via software and cleared by 10-bit 15. 6 KHz 11. 7 KHz 9. 7 KHz 7. 8 KHz 5. 8 KHz compare matches or input captures. 9-bit 31. 2 KHz 23. 4 KHz 19. 5 KHz 15. 6 KHz 11. 7 KHz When timer channels are put into this 8-bit 62. 4 KHz 46. 9 KHz 39 KHz 31. 3 KHz 23. 4 KHz mode then their input and output 7-bit 124. 8 KHz 93. 8 KHz 78 KHz 62. 5 KHz 46. 8 KHz events are also synchronised.
• Standard PWM Mode TCNT3 value Counter cleared at compare match with GRA3 Each timer channel can be GRA3 programmed to produce a single GRB3 phase PWM output. Thus the ITU GRA4 can output up to five separate GRB4 channels of PWM. In this mode H'0000 Time GRA controls the time when the pin TIOCA goes high, and GRB when the pin 3 goes low. Either GRA or GRB can TIOCB3 be set to clear the counter, thus
setting the frequency of the WM TIOCA4 output. TOCXA4 • AC Motor Control Outputs TIOCB To provide the PWM signals required 4 to drive AC machines, the ITU TOCXB4 provides two further PWM modes: Complementary 6-phase PWM and Figure 15 Reset Synchronised 6-phase PWM (shown in Figure 15). The main By utilising the phase counting mode This facility removes the requirement for differences between these two modes on the ITU, TCNT2 will count up extra hardware or interrupt handlers for are the transition points for the or down depending on the phase position monitoring. In this mode the outputs and the provision of dead of the incoming signals. Therefore, comparators of channel 2 can also be time between the phase outputs. the value of TCNT2 will reflect the used to generate interrupts, for example positional changes experienced by the when a certain position is reached. • Phase Counting Mode encoder. This mode finds use in servo control systems, where the position and speed feedback comes from a 2- phase TCNT2 value quadrature encoder. In this type of Counting up Counting down encoder the waveforms output change their phase relationship depending on the direction of motion, as shown in Time Figure 16 TCLKB TCLKA Figure 16
17 Modified ITU on set the duty. reset H8/306x, H8/3006 However, as the ITU puts more emphasis • Cascading of both channels to form a and H8/3007 on motor control and similar 16-bit timer applications, the TPU does not support • Channel 1 can also be used to count The ITU on H8/306x, H8/3006 and ‘Reset synchronized 6-phase PWM channel 0 compare matches H8/3007 are modified to be more mode’ and ‘Complementary 6-phase flexible. Channels 3 and 4 can be split PWM mode’. These 8-bit timers can also be used to into 4 timer channels (8-bit) instead of 2 keep up a minimum level of timer timer channels (16-bit). However, this 16-bit Free Running functionality in times of low activity of modified ITU does not have the special Timer (FRT) the overall system. The result is lowest AC motor control modes power consumption on one hand, (Complementary 6-phase PWM and The main timer unit of H8S/21xx is the because the TPU can be switched off in Reset Synchronised 6-phase PWM). The 16-bit Free Running Timer (FRT), with that situation, but a minimum of timer buffering facility has also been removed. 2 OC and 4 IC. The input capture activity on the other hand. The 8-bit facility can also be operated in buffered timer could be used to update a software Timer Pulse Unit mode, with only 2 IC available in this real time clock, for example, or scan a (TPU) case. keyboard, so that the system can return Input clock can be selected from 3 to full activity when a key has been The TPU is similar to the ITU, yet even internal clocks and an external clock, pressed. more powerful and flexible. It is found which also allows event counting. The on all H8S devices, with the H8S/224x FRT unit features one independent Enhanced 8-bit and the H8S/222x devices having only interrupt for each IC, OC and one on timers on H8S/21xx half of a TPU implemented. overflow. The TPU comprises six 16-bit timer H8S/21xx derivatives feature a similar 8 channels with a total of 16 Timer 8-bit timers bit timer module as described in the General Registers (TGR), each of which previous paragraph. However, it has a can act either as an output compare or The H8S/2655-series, H8S/2355 and 53, third 8-bit timer channel TMRY,which an input capture function. Some TGR’s H8S/224x, H8S/234x and H8S/21xx all has similar functionality like TMR0 and can also act as buffer registers to reduce have an additional 8-bit timer module TMR1, but no output pin that is under the interrupt load that is put onto the with two channels (TMR0 and TMR1). control of the compare match facility. CPU. Each channel has two time constant For each channel one out of eight input registers (TCORA and TCORB) that 14 bit PWM timer clocks can be selected in software. are constantly compared with the Possible sources are internal clocks, counter value to detect compare H8S/21xx is equipped with a two external clock pins or overflow of other matches. The 8-bit timer module can channel PWM timer, intended for use as timers, the latter effectively providing a perform a variety of functions, including a digital-to-analog converter. It is based method to cascade two 16-bit timers to pulse output with an arbitrary duty cycle on a 14-bit counter, thus enabling low- form 32-bit timers. or counting events on an external pin. ripple, 14-bit resolution analog signals to While the ITU provides one channel for be generated. phase counting the TPU provides four. The 8-bit timer module has the Also, the TPU allows to trigger an A/D following features: Watchdog Timer conversion and can trigger data transfers • Selection of internal clock phi/8, (WDT) on H8/300H by the Data transfer controller (DTC). phi/64, phi/8192 or an external clock The TPU allows to generate a 15-phase input. Often, a watchdog timer is a very PWM signal, by using one TGR as the • Selection of counter clear sources: important feature in any embedded cycle register and the other 15 TGR’s to compare match A or B, or external application. It is used to ensure that any
18 “mishap’ in the system (such as a noise seconds. This WDT can request an induced software crash) is rectified as interrupt, reset or NMI. If an interrupt quickly as possible. is requested this WDT is useful to update The principle behind a watchdog timer a software real time clock. For this is very simple - a counter is constantly usage, every peripheral module on the counting upwards, and correctly device is turned off and the CPU is operating software ensures that this brought into sleep mode. Then the counter never overflows by continuously WDT wakes up the CPU every second, resetting the count. If the software for example, the CPU updates the the crashes and the counter overflows, the software real time clock registers (usually watchdog “barks” and sends some kept in RAM) and goes to sleep again, if stimulus to the microcontroller (normally no other activity is pending. a reset) to restart system operations in a controlled manner. All H8/300H devices are equipped with a timer, which can be used either as a watchdog or as an interval timer. Its ‘bark’ is a reset if it is used as a watchdog. If used as interval timer, each overflow generates an interrupt.
Watchdog Timer (WDT) on H8S
The WDT on H8S has some improvements over the WDT on H8/300H. It has an WDTOVF-pin that can signal the watchdog overflow to the outside world. It can select much slower clock sources up to phi/131072, which allows up to 1. 68s (at 20MHz) for the software to reset the watchdog before overflow.
Watchdog Timer (WDT) operating on 32KHz subclock
On some H8S derivatives a second WDT is implemented, which is operating off a 32KHz subclock. This subclock can be divided by 2 to 256 before it is used as counter input clock. Hence, the final overflow rate can be as low as 32KHz divided by 256x256 = once every two
19 Timing Pattern Controller (TPC) Programmable Pulse Generator (PPG)
These peripherals allow to generate Stepper Motor between new patterns being output to digital output signals in synchronisation Control with the allow acceleration and deceleration of the with a timer pulse, so that one could look TPC motor as shown by the velocity profile. at them as ‘real time outputs’. Such a Figure 17 shows how stepper motor timer-driven digital output system allows control can be performed using the ITU, When the TPC, ITU and DMAC are to generate a continuous stream of data TPC and DMAC . In this example a working together, the acceleration and that appears on the pins precisely in the two phase stepper motor is being driven, deceleration phases, as well as the steady intervals that the timer is programmed to, using complementary transistors. It is speed phase can be controlled with without any ‘jitter’ that would be caused therefore necessary to provide a dead minimal CPU overhead. The CPU only by e. g. interrupt latencies in a system time between the switching of the phases needs to get involved when a transition where an interrupt service routine drives to eliminate any short circuit conditions from one phase to another is made. This the pins. Also the TPC and PPG allow to between the high side and low side is achieved by using a second memory to do this without any CPU intervention, if drivers. I/O DMA channel to reload the timer used together with DMA. compare register The TPC and PPG provide registers Memory after each new
called the ‘Next Data Register’. The data output pattern pattern has been data table DMA in these registers will be transferred under ITU Channel O output. Again the timer control to the ‘Port Data Registers’ OCRA DMAC can take the Clock (i. e. to the pins). The CPU, the DMA DMA next step period data OCRB Channel O or the DTC (where applicable) then have step pulse period TPC from a table of values data table pins time until the next ‘timer tick’ to copy DMA motor stored in the DMA Channel O control the next value from a data table in Channel 1 pulses memory of the memory to the ‘Next Data Register’. OCRA hosts Non-Overlap time system. Therefore, Data flow trigger OCRB holds step pulse time This mechanism works independently for by providing a table Figure 17 four groups of four pins each, so that a of increasing or decreasing values the total of 16 pins can be driven in that way. Using compare matches from the ITU to motor can be decelerated or accelerated The TPC and the PPG are first of all stimulate the DMAC, new pattern data is with no CPU intervention (Figure 18). intended to drive stepper motors (up to provided to the TPC. This pattern data Motor velocity profile four) with only very little CPU represents the next phase drive pattern Revolutions intervention required. However, they can required, and is stored in a memory table. CPU intervention required be used in many different ways as well. It The DMAC uses its memory to I/O is quite easy, for example, to generate a function to transfer this data on each compare match. The TPC also uses the serial data stream if an additional serial Acceleration Deceleration interface is required. It is even possible to stimulus from the ITU to transfer the drive an LCD module without using any contents of the NDR to the port. Using LCD timing controller, thus eliminating a a TPC mode where transitions on the Figure 18 Differences entire peripheral chip in a microcontroller port from 0 to 1 (i. e. switching on a between H8/300H system that is to be connected to an LCD phase) are only made on compare match TPC and H8S PPG module. Such an application is described A, a dead time, equal to the value in in Hitachi’s application note No. 55 GRA, is inserted. The difference between the H8/300H TPC (using Hitachi’s SH microcontroller). When controlling a stepper motor, and the H8S PPG is mainly the addition of Hitachi’s application note No. 56 shows providing the phase patterns onto the the bit inversion to each output. how to set up such a TPC/ITU/DMA port pins is only part of the story. It is Also, the PPG is supported by the H8S system using MakeApp. also necessary to modify the time DMA as well as the DTC.
20 Serial Communications Interface (SCI)
This form of communication has many H8/300H H8S H8S/21xx uses in microcontroller applications, such Smart card interface H8/3048 series Yes No as inter-device communications, (ISO 7816) diagnostics, host communication or as an Multi-processor mode Yes Yes Yes interface to peripherals. All of Hitachi’s IIC No H8S/2238 H8S/21x7, 8 16-bit microcontrollers have at least one H8S/2633 SCI, even though most have two or IrDA No H8S/2633 Yes more. The SCI’s on H8/300H and H8S LSB/MSB-first selectable* No Yes Yes can operate in asynchronous (‘UART’) No. of SCI with 1 min. 2 No or synchronous mode. DMA support DTC support No Yes H8S/21x7, 8 They have independent baud rate * This feature allows to connect SPI compliant peripherals in most cases. generators, so that none of the general purpose timers is used up to generate transmit/receive clocks, and external 20MHz for H8/300H and over 4Mbit/s to the data transmitted. This bit is used clocking is also possible. They are double at 25MHz for H8S. to differentiate between data frames and buffered to allow ‘back-to-back’ address frames. Thus, any frame sent transmission. Break detection is possible The H8S and the H8/300H serial ports from the master with the MPB set to by reading the RxD pin level after a also support multiprocessor one can be used to activate the required framing error has been detected. communications using a master slave slave. To allow efficient SCI service by configuration in addition to the standard Slave devices on this network will only interrupt service routines each SCI is modes. produce a receive interrupt when a frame provided with 4 different interrupts, each is received with the MPB set, so the with its own interrupt vector. These are In this mode, communication between interrupt handler can check the address transmit-data-empty, transmit-end, devices is performed using an additional which has been transmitted. receive-data-full and receive error. multiprocessor bit (MPB) which is added Receive data errors are trapped using three error conditions -overflow, framing Figure 19 and parity. These three errors are indicated via one interrupt vector and Transmitting three status flags in the serial status station register. Serial transmission line
Some other capabilities vary from family to family, as shown in the table. Receiving Receiving Receiving Receiving station A station B station C station D (ID= 01) (ID= 02) (ID= 03) (ID= 04) The maximum bit rate in asynchronous Serial operation is 625kbit/s at 20MHz for data H'01 H'AA H8/300H and 781kbit/s at 25MHz for (MPB= 1) (MPB= 0) H8S, using the internal BRR. Using ID transmission cycle= Data transmission cycle= external clocks the values for receiving station Data transmission to asynchronous mode are half of that. For specification receiving station specified by ID synchronous operation with external Legend MPB: Multiprocessor bit clock the bit rate is 3.33Mbit/s at
21 Memory Type and Size
H ROM-LESS or pseudo ROM-LESS(*) H Mask-ROM H OTP and Mask H Flash and Mask (H8S/2623,33 Flash only) (UD) Under Development
22 H8S and H8/300H Selector
(UD) Under Development
Device H8/3001 H8/3002 H8/3003 H8/3004,5 H8/3006,7 H8/3020,1,2 (UD) ROM (byte) -----128,192,256k RAM (byte) 512 512 512 2,4k 2,4k 4,4,8k OTP (HD647…) or FLASH (HD64F…) -----HD64F3022
Vcc (V) / clock (MHz) 4.5-5.5/16 4.5-5.5/16 4.5-5.5/16 4.5-5.5/16 4.5-5.5/20 3.0-3.6/18 (During Operation) 3.0-5.5/13 3.0-5.5/10 3.0-5.5/10 4.5-5.5/18 3.0-5.5/13
2.7-5.5/8 2.7-5.5/8 2.7-5.5/8 3.0-5.5/10 2.7-5.5/10
2.7-5.5/8
Flash Programming Voltage (V) Vcc=3.0-3.6
External data bus (bit) 8/16 8/16 8/16 8 8/16 8 ITU / TPU / FRT (16-bit timer) 555535
no of input capture/output compare 10 IC/OC 10 IC/OC 10 IC/OC 10 IC/OC 6 IC/OC 10 IC/OC
8-bit timer - - - - 4 with 2 IC / 4 OC -
Watchdog timer -11111 14-bit PWM (channel) ------
DMAC (channels) Memory to/from I/O -48-4-
Memory to Memory -24-2-
DTC ------Bus Master Timer Vcc/Clock Memory SCI (async/sync channels) 122132 Smart card i/f (channels) ----32 IIC (channels) ------Serial IrDA (channels) ------Communication CAN V2.0B (channels) ------10-bit ADC (channels) 488888 8-bit DAC (channels) ----2- TPC (bit) / PPG (bit) 12 16 16 - 16 15 Refresh controller /DRAM interface - Yes Yes - Yes - Chip select pins -48-8-
Interrupts Internal 20 30 34 21 36 25
External 479675
I/O pins (incl. input only pins) 32 46 58 32 79 63 Other Features Analog Others
Data book 21-092 21-078 21-033A 21-106 21-117 TBA Package FP-80A FP-100B FP-112 FP-80A FP-100B FP-80A
TFP-80C TFP-100B TFP-120 TFP-80C TFP-100B TFP-80C
23 ** For availability of mask ROM versions, please contact your Hitachi sales office or authorized distributor Guide
H8/3030,1,2 H8/3033,4,5 H8/3036,7,8,9 H8/3040,1,2 H8/3044,5,7,8 H8/3052 (UD) H8/3060,1,2 H8/3065,6,7 H8S/2120,2,3,4,6,7,8** 16,32,64k 128,192,256k 16,32,64,128k 32,48,64k 32,64,98,128k 512k 64,96,128K 64,96,128K 32,64,128,96,32,64,128k
512,1k,2k 4k 512,1,2,4k 2k 2,2,4,4k 8k 2,4,4k 2,4,4k 2,2,4,4,2,2,4k
HD6473032 HD6473035 HD64F3039 HD6473042 HD6473048 HD64F3052 HD64F3062 HD64F3067 HD64F2128
HD64F3048
4.5-5.5/16 4.5-5.5/18 4.5-5.5/18 4.5-5.5/16 4.5-5.5/16 3.0-5.5/18 4.5-5.5/20 4.5-5.5/20 4.5-5.5/20
3.0-5.5/10 3.0-5.5/10 3.0-5.5/10 3.0-5.5/10 3.15-5.5/13* 3.0-5.5/13 3.0-5.5/13 2.7-5.5/10*
2.7-5.5/8 2.7-5.5/8 2.7-5.5/8* 2.7-5.5/8 2.7-5.5/8 2.7-5.5/8* 2.7-5.5/8* (* mask only)
(* mask only) (* mask/OTP only) (* mask only) (* mask only)
Vcc=3.0-3.6 or 4.5-5.5 Vpp=12V Vcc=3.0-3.6 Vcc=3.0-3.6 or 4.5-5.5 Vcc=3.0-3.6 or 4.5-5.5 Vcc=4.5-5.5
8 8 8 8/16 8/16 8/16 8/16 8/16 8
555 5 5 5 3 3 1
10 IC/OC 10 IC/OC 10 IC/OC 10 IC/OC 10 IC/OC 10 IC/OC 6 IC/OC 6 IC/OC 4 IC / 2 OC
------4 with 2 IC / 4 OC 4 with 2 IC / 4 OC 3 on 2120,2,3,4
4 on 2126,7,8
111 1 1 1 1 1 2
------2 on 2126,7,8
--- 4 4 4 - 4 -
--- 2 2 2 - 2 -
------1 on 2126,7,8
112 2 2 2 2 3 2
--1 - 1 2 2 3 -
------2 on 2126, 7, 8
------
------
888 8 8 8 8 8 8
--- 2 2 2 2 2 -
16 16 15 16 16 16 16 16 -
- - - Yes Yes Yes - Yes -
--- 4 8 8 8 8 -
21 21 25 30 30 30 27 36 29 (33 on 2126,7,8)
665 7 7 7 7 7 4
63 63 63 78 78 78 79 79 51
3040x00 pseudo 3044x00 pseudo ADC 16ch x6bit mode
ROM-less avail. ROM-less avail. subclock mode
21-093 21-111 21-114 21-036 21-095A TBA 21-116 21-115 18-016
FP-80A FP-80A FP-80A FP-100B FP-100B FP-100B FP-100B FP-100B DP-64S
TFP-80C TFP-80C TFP-80C TFP-100B TFP-100B TFP-100B TFP-100B TFP-100B FP-64A, TFP-80C H8S/2130,2,3,4,7,8** H8S/2142,3,4,7,8** H8S/2223,5,7 H8S/2233,5,7 H8S/2238 H8S/2240,1,2,3,4,5,6 H8S/2310,2 H8S/2322,3,7,8 H8S/2340,1,3,5 H8S k 32,64,96,128,64,128k 64,96,128,64,128k 64,128,128k 64,128,128k 256k 0,32,32,64,64,128,128k - 0,32,128,256k 0,32,64,128k 0
2,2,4,4,2,4k 2,4,4,2,4k 4,4,16k 4,4,16k 16k 4,4,8,4,8,4,8k 2,8k 8k 2,2,2,4k
HD64F2138 (128k) HD64F2148 (128k) HD6472237 HD6472237 HD64F2238 HD6472246 - HD64F2328 HD6472345
HD64F2134 (128k) HD64F2144 (128k) HD64F2345
HD64F2132 (64k) HD64F2142 (64k)
4.5-5.5/20 4.5-5.5/20 2.7-3.6/13 2.7-3.6/13* 2.7-5.5/13 4.5-5.5/20 2.7-3.6/20 2.7-3.6/20 4.5-5.5/20 4.5
2.7-5.5/10 Mask 2.7-5.5/10 Mask 2.2-3.6/6* 2.2-3.6/6* 2.2-3.6/6* 2.7-5.5/13* 3.0-3.6/25 3.0-3.6/25 2.7-5.5/10* 2.7
3.0-5.5/10 Flash 3.0-5.5/10 Flash (* mask only) 2.7-3.6/10 (* mask only) 2.7-5.5/10 (*mask/OTP only)
(* mask only) (* mask only)
Vcc=3.0-3.6 or 4.5-5.5 Vcc=3.0-3.6 or 4.5-5.5 Vcc=2.7-5.5 or 2.7-3.6 Vcc=2.7-3.6 Vcc=4.5-5.5
8 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16
113663666
4 IC / 2 OC 4 IC / 2 OC 8 IC/OC 16 IC/OC 16 IC/OC 8 IC/OC 16 IC/OC 16 IC/OC 16 IC/OC 16
3 on 2130,2,3,4 3 on 2142,3,4 2 with 2 OC 2 with 2 OC 4 with 4 OC 2 with 2 OC 2 with 2 OC 2 with 2 OC 2 with 2 OC
4 on 2137,8 4 on 2147,8
222221111
22------
------4-
------2-
1 on 2137,8 1 on 2147,8 Yes Yes Yes Yes Yes Yes Yes
333443232
--3443232
2 on 2137, 8 2 on 2147, 8 - - 2 - - - -
11------
------
888884888
22-22-222
------16-
------Yes-
--8888884
31 (43 on 2137,8) 34 (46 on 2147,8) 36 53 53 34 43 52 37
999999999
66 82 82 82 82 79 79 95 79
ADC 16ch x6bit mode ADC 16ch x6bit mode 32KHz subclock 32KHz subclock internal step down 2242x00 pseudo
subclock mode subclock mode 32KHz subclock ROM-less avail.
18-018 18-017 18-012 18-012 18-020 18-004 TBA 18-021/22 18-010 1
FP-80A FP-100B FP-100A, FP-100B FP-100A, FP-100B FP-100A, FP-100B FP-100B FP-100A FP-128 FP-100A, FP-100B F
TFP-80C TFP-100B TFP-100B TFP-100B TFP-100B TFP-100B TFP-100B TFP-120 TFP-100B, TFP-100GTF
TFP-100G TFP-100G TFP-100G S/2350,1 H8S/2353,5 H8S/2352,7 H8S/2623, H8S/2626 H8S/2633** H8S/2653,5 Device 0,64k 64,128k 0,128k 256k 256k 64,128k ROM (byte)
2k 2,4k 8k 12k 16k 4k RAM (byte) Memory - HD6472355 HD6472357 HD64F2623 HD64F2633 HD6472655 OTP (HD647…) or FLASH (HD64F…)
HD64F2357 HD64F2626
5-5.5/20 4.5-5.5/20 4.5-5.5/20 3.0-3.6/20 (Vcc) 3.0-3.6/25 (Vcc) 4.5-5.5/20 Vcc (V) / clock (MHz)
7-5.5/10 2.7-5.5/10 2.7-5.5/10* 4.5-5.5/20(PVcc) 4.5-5.5/25(PVcc) 2.7-5.5/10 (During Operation) Vcc/Clock
3.0-5.5/13 Flash
(*mask/OTP only)
Vcc=3.0-3.6 or 4.5-5.5 Vcc=3.0-3.6 Vcc=3.0-3.6 Flash Programming Voltage (V)
8/16 8/16 8/16 8/16 8/16 8/16 External data bus (bit) 66 6 6 6 6 ITU / TPU / FRT (16-bit timer)
6 IC/OC 16 IC/OC 16 IC/OC 16 IC/OC 16 IC/OC 16 IC/OC no of input capture/output compare
- 2 with 2 OC 2 with 2 OC - 4 with 4 OC 2 with 2 OC 8-bit timer Timer
11 1 1 2 1 Watchdog timer -- - - 4 - 14-bit PWM (channel) Bus Master 4- 4 - 4 4 DMAC (channels) Memory to/from I/O
2- 2 - 2 2 Memory to Memory
Yes Yes Yes Yes Yes Yes DTC 23 3 3 5 3 SCI (async/sync channels) Communication 23 3 3 5 3 Smart card i/f (channels)
-- - - 2 - IIC (channels) Serial -- - - 1 - IrDA (channels) -- - 1 - - CAN V2.0B (channels) Analog 88 8 16168 10-bit ADC (channels) 22 2 - 4 2 8-bit DAC (channels) 16 - 16 8 8 16 TPC (bit) / PPG (bit) Yes - Yes - Yes Yes Refresh controller /DRAM interface 88 8 - 8 8 Chip select pins Other Features
42 41 52 47 72 52 Interrupts Internal
99 9 7 9 9 External
95 95 95 70 89 95 I/O pins (incl. input only pins) PLL clock PLL clock 2655x00 pseudo Others
H8S/2626: 32KHz 32KHZ subclock ROM-less avail.
subclock
8-006 18-005 18-011 TBA TBA 18-001B Data book P-128 FP-128 FP-128 FP-100B FP-128 FP-128 Package
FP-120 TFP-120 TFP-120 TFP-120 TFP-120 In Brief
In this brochure an overview is given as • Very powerful and sophisticated in the industry for many years to come. to why H8S and H8/300H give you the peripherals designed to reduce CPU The road map points towards: technical benefits that are demanded by overhead and hence to increase system • 33MHz at 3.3V H8S devices by the today’s applications.The purpose is to performance second half of 2000 give you enough insight into the features • High memory and peripheral • more large memory variants (up to of the H8S and H8/300H family to see integration to allow single-chip 512K Flash) within year 2000 how you can benefit from the systems, where previously multi-chip • high-speed Flash as a standard ROM performance, the rich set of peripherals systems were necessary. Switching technology, as price is decreasing to and the memory options available.To from multi-chip to single-chip will fall from OTP levels towards mask summarise this: drastically reduce radiation, board • further decrease in power space requirements and enables the consumption by shifting Vcc to 2.2V • High performance CPU with usage of all pins as ports instead of and by adding 32kHz subclock architecture tailored for high level using them as busses. • future peripherals including 2x language software development • Full European technical and tool CAN-derivatives, high-current • Industry leading low power, low support provided by Hitachi stepper motor drivers, on-chip voltage options Microsystems Europe (HMSE) in LCDC and much more.As an • Memory line up from 16K to 256K Maidenhead (UK) example the road map below shows ROM and 512Byte to 16K RAM, There is a strong road map that underlines Hitachi’s 16-bit microcontrollers including many Flash versions up to Hitachi’s commitment to H8 as an with integrated CAN. 256K Flash architecture that will be a dominant player
H8S & CAN derivatives
Dashboard applications.
Under development. H8S/2646F 128KB/4KB 1 x HCAN General purpose/Industrial ABS, EPAS, suspension, + LCDC clutch etc...
Under development. H8S/2626F H8S/2636F 256KB/12KB 128KB/4KB 1 x HCAN 2 x HCAN + subclock Body electronics, EPAS, etc Planned. H8S/2623F H8S/261xF 256KB/12KB 128KB/4KB 1 x HCAN 1 x HCAN
QFP-100 QFP-128 QFP-144 QFP-80
27 Smart card time normally used as stop bits, thus putting the smart card’s reset under interface ISO7816-3 implements an error bit. host software control. mode (SIM) That means, that a low level on the Also, a general purpose IO of the host is RxD/TxD line at a particular position used to control a MOSFET that turns on In this mode the SCI conforms to a sub- after the data bits has to be recognised and off the power to the smart card. In set ISO7816-3. This standard is used to by the transmit side as an error in banking applications another MOSFET communicate with so called smart cards, reception on the receive side. The may be used to power a card ejection which are frequently used in banking transmitting side shall respond by mechanism. applications (electronic money), GSM retransmitting the last data. The SCI in H8/3048 and first-generation H8S phones and many other applications like SIM mode also supports direct and products have the following limitations: building entry control or for ‘loyalty inverse convention as set out by ISO 1) The only available speed of the SIM cards’. Because these applications are 7816-3. is the default value of clock/372 and expected to grow very rapidly in the The physical interface between the host 2) There is no support for the so called next few years, Hitachi has equipped all and the smart card comprises the protocol T=1“ ” H8S devices with SCI’s that can be set to RxD/TxD pins tied together and then Latest H8S products add 3 new speeds SIM mode. connected to the I/O pin of the smart (clock/32, 64 and 256) and support for According to ISO 7816-3, the card, a clock that must be provided to T=1“.These are the H8S series ” communication used is asynchronous, the smart card and initially has to be 372 H8S/222x, H8S/223x, H8S/231x, half-duplex (i. e. only either the host or times the baudrate and a reset signal. H8S/232x, H8S/263x and all future H8S the smart card transmits at a time) and Reset is not tied to the reset pin of the products. with even parity always. Also, after host microcontroller, but is connected to transmission of the data and within the a general purpose IO pin of the host,
Vcc Figure 20
TxD0 I/O RxD0 Data Line SCK0 CLK Px (Port) Clock Line RST H8S Reset Line
Vcc Vcc I/O MOSFET
IC card
28 Analogue to Digital Converter (ADC)
In many microcontroller based systems, High speed ADC on • Simultaneous sampling operation some way of measuring analogue H8S/2655 allows the two S&H to sample electrical values is necessary. With this in simultaneously. An important feature mind, all members of the H8S and On H8S/2655 Hitachi has implemented in some applications, e. g. where at H8/300H families are equipped with a a new high speed ADC, capable of least 2 out of the 3 phases of a 3- 10-bit A/D converter, in most cases with sustaining a conversion rate of 1 million phase mains have to be observed. an 8 (up to 16) channel analog samples per second. This is achieved by • Conversion can be triggered by multiplexer to allow numerous signals to using two sample and hold (S&H) software, an external pin or the on- be processed easily. The converter works circuits which are used interleaved, i. e. chip timers using a successive approximation while S&H A is sampling, S&H B is algorithm and conversions take 138 states being converted. Digital to Analogue (or 8. 6µs if ø - 16MHz, respectively 6. Converter (DAC) 7µs at 20MHz in case of H8S). A sample But not only is this new ADC faster , but and hold circuit is used to ensure that it has also new features to make it more The H8/304x derivatives within once a conversion begins, a change of flexible. H8/300H and most H8S derivatives the input value will not be reflected in a These new features include: feature a two channel, 8-bit resolution different conversion result. A conversion • 8 A/D data registers to store the Digital-to-Analog-Converter (DAC). can be initiated by software or by means results of each channel individually The conversion time is 10µs with a 20pF of an external trigger input, and in some • Enhanced conversion modes, created load and the output voltage range is 0V devices by the timer unit. At the end of by combining ‘select’ (one channel) or to Vref. The outputs can be maintained the conversion an interrupt may be ‘group’ (more than one) with ‘single’ during software standby. requested. (one shot conversion) or ‘scan’ (continuous conversion). Both channels can be enabled or disabled As well as being able to perform single • Select single mode: one shot independently. Once a channel is conversion (single mode, where only one conversion of one channel enabled, the corresponding pin becomes channel is converted), the A/D • Select scan mode: continuous an analog output pin and the data in the converter can also be used to scan up to conversion of one channel D/A data register (DADR) is output at four channels (scan mode). To support • Group single mode: one shot the pin after the D/A conversion time this mode of operation, four A/D result conversion of a number of has elapsed. The pin remains in that state registers (ADDRA to D) are provided. channels until DADR is written to again or until Once the scan mode is selected, each • Group scan mode: continuous the D/A channel or the complete DAC channel specified is converted conversion of a number of is disabled. sequentially with the conversion value channels being stored in the appropriate result • Buffer operation allows to store results The voltage at the D/A output pin can register. This mode of operation allows in FIFO-fashion in the ADDR be calculated as DADR contents x Vref. 256 the user software to sample the current registers. Double or quadruple analogue value of an input by simply buffering can be selected. reading the appropriate data register.
29 Controller Area Network CAN
The HCAN module (Hitachi CAN)* likelihood of such a case increases in Hitachi’s HCAN module implements the complies to version 2.0B (Full CAN) as proportion to the length of the message. CAN standard by adding sophisticated defined by Bosch.Additionally, an Also, short messages keep latency low. features, which allows usage in even the independent institute has tested the Depending on the actual baudrate most demanding automotive applications HCAN module for compliance with the chosen, the length of the network can like engine management. It features: standard. CAN (Controller Area vary between approximately 40m and Network) has become a widespread 1000m (also depending on the • 15 programmable receive/transmit standard in the European automotive transceivers chosen). buffers industry, because it provides very reliable, CAN allows broadcasting or • 1 receive-only buffer with local high-speed, low-latency serial multicasting, i.e. sending messages to all acceptance filtering (LAFM) communication for harsh and or some nodes at a time, hence allows • internal priority sorting to avoid electromagnetically polluted synchronisation of the activities of several priority inversion environments.Therefore CAN has begun nodes. • flexible interrupt structure to keep to penetrate also industrial applications, A key feature of CAN is the CPU load to a minimum where these features are important. prioritisation of messages that allows • sleep-mode and auto wake-up, if CAN is a non-return to zero (NRZ), bit important messages to gain access to the CAN bus is active stuffing protocol for message-orientated physical bus with very short latency. • DMA support for mailbox 0 to serial communication via two wires, at CAN also allow arbitration of multiple reduce CPU overhead speeds of up to 1Mbit/s. Each message messages that are trying to occupy the Special emphasis was put on good real contains up to 8 Byte of user data. Using bus simultaneously. The arbitration time capabilities.An internal state these short messages is important in mechanism will inherently grant access machine sorts the messages by priority to harsh environments, where disruption or to the bus for the highest priority avoid the inherent priority-inversion noise could destroy a message, as the message. problem.
HCAN
MBI (CDLC) Message buffer CAN Mailboxes Data Link Controller Message control LAFM Bosch CAN 2.0Bactive Message data MC0–MC15, MD0–MD15 Tx buffer HTxD Peripheral data bus MPI Peripheral address bus Rx buffer HRxD Microprocessor interface CPU interface Control register Status register
* For a complete Roadmap of H8 microcontrollers with HCAN please refer to page 27.
30 H8/3039
Lowest cost H8/300H with Flash 7 6 5 4 3 2 1 0 /D /D /D /D /D /D /D /D 7 6 5 4 3 2 1 0 SS SS SS CC CC P3 P3 P3 P3 P3 P3 P3 P3 V V V V V
Port 3 ROM 16k-128k, RAM 512Byte- Address bus
4k, 128K Flash MD2 Data bus (upper) MD1 18MHz clock yields 111ns min. Data bus (lower) P53/A19 MD0 instruction EXTAL P52/A18 P5 /A XTAL Port 5 1 17 pin compatible with other P50/A16 ¿ H8/300H CPU H8/303x, but with 2x SCI STBY Bus controller RES Clock osc. popular ITU timer unit with AC RESO/FWE* motor drive modes NMI P27/A15 P2 /A Interrupt 6 14 Ideal for many industrial P2 /A ROM controller 5 13 (Flash memory, P24/A12 applications P65/WR masked ROM) P23/A11 P64/RD Port 2 P22/A10 P63/AS P21/A9 P60/WAIT Watchdog P20/A8 timer P17/A7 RAM (WDT) P16/A6 P15/A5 P14/A4 Serial P1 /A
Port 1 3 3 16-bit communication integrated P12/A2 P81/IRQ1 interface P11/A1 P8 /IRQ timer unit (SCI) x 2 channels 0 0 Port 8 Port 6 (ITU) P10/A0
Programmable A/D converter P95/SCK1/IRQ5 timing pattern P94/SCK0/IRQ4 controller (TPC) P93/RxD1 P92/RxD0 Port 9 P91/TxD1 P90/TxD0
Note: * Masked ROM : RESO Port B Port A Port 7 Flash memory: FWE 4 4 4 4 7 6 5 4 3 2 1 0 3 3 20 21 22 23 SS CC /A /A /A /A /AN /AN /AN /AN /AN /AN /AN /AN 2 2 1 1 AV AV 7 6 5 4 3 2 1 0 /TCLKB /TCLKA /TCLKD /TCLKC P7 P7 P7 P7 P7 P7 P7 P7 /TIOCB /TIOCA /TIOCB /TIOCA /ADTRG 1 0 0 0 /TOCXB /TOCXA 9 8 11 10 15 13 12 /TP /TP /TIOCB /TIOCA /TIOCB /TIOCA /TP /TP 1 0 7 6 5 4 /TP /TP 1 0 /TP /TP /TP 3 2 7 5 4 PA PA /TIOCB /TIOCA PB PB /TP /TP /TP /TP 3 2 PB PB PB 7 6 5 4 PB PB /TP /TP PA PA PA PA 3 2 PA PA
H8/3067 15 14 13 12 11 10 9 8 Enhanced successor of popular 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 CC CC CC SS SS SS SS SS SS
H8/3048 V V V V V V V V V P3 /D P3 /D P3 /D P3 /D P3 /D P3 /D P3 /D P3 /D P4 /D P4 /D P4 /D P4 /D P4 /D P4 /D P4 /D P4 /D