Hitachi Single-Chip Microcomputer H8S Series Technical Q&A H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Application Note ADE-502-059 Rev. 1.
Notice When using this document, keep the following in mind: 1. This document may, wholly or partially, be subject to change without notice. 2. All rights are reserved: No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without Hitachi’s permission. 3. Hitachi will not be held responsible for any damage to the user that may result from accidents or any other reasons during operation of the user’s unit according to this document. 4.
Preface The H8S/2000 Series is a new series of Hitachi-original high-performance 16-bit microcomputers designed to offer higher performance and lower power consumption than existing H8 Series models, which are widely used in equipment control, and provide much greater ease of use.
Using this Application Note This Application Note is a compilation of responses to queries from Hitachi microcomputer users, presented in Question and Answer format. It should be used in conjunction with the relevant users’ manuals. It may also be helpful to read through this manual before beginning design work on products using H8S Series microcomputers, to gain more in-depth knowledge of the microcomputer products, and as a reminder of items that may present difficulties in the design stage.
Contents CPU CPU Subject: Use of General Registers................................................................................................ Subject: Difference between V Flag and C Flag in CCR............................................................. Subject: Relationship between Data Size and Change of V Flag ................................................ Subject: Area Usable as ROM in Vector Table............................................................................
Subject: Use of Different Interrupt Modes................................................................................... Subject: Insufficient Number of External Interrupts.................................................................... 33 35 Bus controller Subject: CS State in On-Chip RAM and Internal I/O Access...................................................... 36 Subject: φ Clock State when Bus is Released ..............................................................................
On-Chip I/O DMAC Subject: Number of States between Transfers.............................................................................. Subject: Maximum Transfer Rate ................................................................................................ Subject: Difference between DMAC and DTC............................................................................ Subject: Alternate 8-Bit/16-Bit Space Accesses ..........................................................................
Subject: RDRF Flag Set Timing .................................................................................................. Subject: Interrupt Source Flag Clearing ....................................................................................... Subject: Continuous Transmission/Reception in Synchronous Mode Using External Clock...... Subject: Use of RDR and TDR when SCI is Not Used................................................................ Subject: SCI Clock Pin Input/Output Setting.........
Microcomputer Technical Q&A Q&A No.: QAH8S-001 Category: CPU Subject: Use of General Registers Question Is it possible to use a mix of 8-bit, 16-bit, and 32-bit general registers? Answer Yes. Individual registers can be used in any way desired, as shown below. Example: E0 R0H R0L R2H R2L ER1 E2 ER3 E4 E5 E6 R4 R5 R6H ER7 (SP) R6L However, note that ER7 is used implicitly as the SP.
Microcomputer Technical Q&A Q&A No.: QAH8S-002 Category: CPU Subject: Difference between V Flag and C Flag in CCR Question The V flag and C flag in CCR are both set if overflow occurs during an operation. What is the difference between these flags? Answer The V flag in CCR is used to identify whether overflow occurs in a signed operation.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 3
Microcomputer Technical Q&A Q&A No.: QAH8S-003 Category: CPU Subject: Relationship between Data Size and Change of V Flag Question Do changes of the V flag in the condition code register (CCR) depend on the data size? Answer The V flag changes on detection of overflow in the result of a signed arithmetic operation. The change operation is the same regardless of the data size, but the times when the flag changes differ as shown below.
Microcomputer Technical Q&A Q&A No.: QAH8S-004 Category: CPU Subject: Area Usable as ROM in Vector Table Questions 1. Can a free area in the vector table (reserved, or reserved for system use) be used as ROM? 2. Can a free area in the internal I/O register area by used as ROM? Answers 1. Vector numbers 0 to 6 and 12 to 15 reserved for system use in the vector table cannot be used. Reserved addresses can be used as ROM. Vector addresses for unused interrupts in the vector table can also be used as ROM. 2.
Microcomputer Technical Q&A Q&A No.: QAH8S-005 Category: CPU Subject: H8S/2000 CPU Normal Mode Question Are any precautions required when making a transition from H8/300 Series to H8S/2000 Series normal mode? Answer In H8S normal mode, address registers are recognized as being 32 bits long. Therefore, the following changes are necessary when using an H8/300 assembler program. • Register indirect Example: MOV.B @R0,R1L → MOV.B @ER0,R1L An error is not flagged during assembly.
Microcomputer Technical Q&A Q&A No.: QAH8S-006 Category: CPU Subject: MAC Register Question Why is the MAC register 42 bits long? Answer The MAC register is used to store the value obtained by adding together the result of a multiplication and the value in the register itself. The multiplication result is 32 bits (from a 16-bit × 16-bit operation), and if the MAC register value is added as 32 bits, overflow may occur.
Microcomputer Technical Q&A Q&A No.: QAH8S-007 Category: CPU Subject: EXR Register Question Why has the EXR registers been added? Answer There are two reasons: • Providing 8 interrupt mask levels using I2 to I0 enables multiple interrupt handling to be speeded up. • Trace functions are implemented using the T bit. When the T bit is set to 1, trace exception handling is started each time an instruction is executed. For details, see the hardware manual.
Microcomputer Technical Q&A Q&A No.: QAH8S-008 Category: Instruction Subject: SUBX Instruction Question Why is the Z flag value unchanged when the result of a SUBX (subtraction with carry) instruction operation is 0? Answer This is because the SUBX instruction operation result is ANDed with the Z flag value before execution of the instruction. The logical equation is shown below. Z = Z' · Rm · Rm-1 ... · R0 When the execution result is 0, Rm · Rm-1 ... · R0 (abbreviated to Rn below) is 1.
Microcomputer Technical Q&A Q&A No.: QAH8S-009 Category: Instruction Subject: BRN Instruction Question What kind of instruction is BRN (BF)? Answer The BRN instruction is useful as a replacement for a conditional branch instruction during debugging. The operation of the BRN instruction is similar to that of the NOP instruction, but the instruction size and instruction execution time are different, as shown below.
Microcomputer Technical Q&A Q&A No.: QAH8S-010 Category: Instruction Subject: Difference between BRA Instruction and JMP Instruction Question What is the difference between the BRA (BT) instruction and the JMP instruction? Answer With the BRA instruction, a branch is made on the basis of the address at which the BRA instruction is located, whereas with the JMP instruction, the branch address is specified indirectly. The differences between these two instructions are summarized below.
Microcomputer Technical Q&A Q&A No.: QAH8S-011 Category: Instruction Subject: BRA and BRN Instructions Questions 1. What does it mean when the BRA (BT) instruction condition is true? 2. What does it mean when the BRN (BF) instruction condition is false? Answers 1. Since the BRA instruction always branches (Always), this means that the branch condition is always true. 2. Since the BRN instruction never branches (Never), this means that the branch condition is always false.
Microcomputer Technical Q&A Q&A No.: QAH8S-012 Category: Instruction Subject: Support of DAA (DAS) Instruction Corresponding to INC (DEC) Instruction Questions 1. The DAA instruction is used for an add instruction (ADD instruction). What operation is performed if a DAA instruction is executed after an INC instruction? 2. The DAS instruction is used for a subtract instruction (SUB instruction). What operation is performed if a DAS instruction is executed after a DEC instruction? Answers 1.
Microcomputer Technical Q&A Q&A No.: QAH8S-013 Category: Instruction Subject: Odd Address Value when STC Instruction is Executed Question The manual states that when the STC instruction is executed, the CCR value is stored in the (register-indirect) even address. What is the value in the odd address? Answer The value is undefined.
Microcomputer Technical Q&A Q&A No.: QAH8S-014 Category: Instruction Subject: Stack Precautions Question Are any precautions required concerning the stacking method? Answer The CPU always uses word-size or longword-size access to the stack area. Setting the SP (stack pointer) to an odd value may result in misoperation. The PUSH, POP, STM, and LDM instructions should be used for stacking. The initial value of the stack pointer is undefined, and must be set by the user.
Microcomputer Technical Q&A Q&A No.: QAH8S-015 Category: Instruction Subject: Stack Pointer Question How should the stack pointer (SP: ER7) be initialized? Answer To reserve the stack after the end of on-chip RAM, for example, set the initial value of the stack pointer as 1 greater than the last address of on-chip RAM.
Microcomputer Technical Q&A Q&A No.: QAH8S-016 Category: Instruction Subject: TAS Instruction Question What is the meaning of the test and set instruction (TAS)? Answer The TAS instruction test memory contents, then sets the most significant bit (bit 7) to 1. This is a read-modify-write instruction, and the bus cannot be released during these operations.
Microcomputer Technical Q&A Q&A No.: QAH8S-017 Category: Instruction Subject: BLD and BIST Instructions Question How are bit-manipulation instructions such as BLD and BIST used? Answer These instructions can be used to invert any bit data in memory, and store the value in a bit of another memory address, as shown in the flowchart below.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 19
Microcomputer Technical Q&A Q&A No.: QAH8S-018 Category: Instruction Subject: BOR and BIAND Instructions Question How are bit-manipulation instructions such as BOR and BIAND used? Answer These instructions are used to branch after looking at a number of flags. An example of their use is shown below.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 21
Microcomputer Technical Q&A Q&A No.: QAH8S-019 Category: MCU Operating Modes Subject: Mode Pins Questions 1. Is it possible to change the MCU operating mode during normal operation? 2. Is there any way of fixing the MCU operating mode (preventing a change of MCU operating mode due to noise, etc.)? Answers 1. The MCU operating mode cannot be changed during normal operation, as this would cause misoperation. 2. Read the memory control register (MDCR).
Microcomputer Technical Q&A Q&A No.: QAH8S-020 Category: MCU Operating Modes Subject: Use of RAME Bit Question How is the RAME bit used? Answer The RAME bit is used for on-chip RAM protection, etc. Since CPU operation is halted asynchronously in hardware standby mode, there is a risk of losing the on-chip RAM contents. On-chip RAM contents can be protected by disabling the on-chip RAM with the RAME bit before processing is executed.
Microcomputer Technical Q&A Q&A No.: QAH8S-021 Category: Exception Handling Subject: Reset Question A reset time of at least 20 ms is specified. Does this also apply when an external clock is used? Answer No, this specification does not apply in the case of an external clock. When an external clock is used, the reset time should be at least 500 µs.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 25
Microcomputer Technical Q&A Q&A No.: QAH8S-022 Category: Interrupts Subject: Handling of Interrupt Requests when IRQ Interrupts are Disabled Question Is an IRQn interrupt request held pending if generated while the IRQnE bit is cleared to 0 in the IRQ enable register (IER)? Answer Yes. When the signal specified in the IRQ sense control register (ISCR) is input to the IRQn pin, IRQnF (the IRQn flag) is set to 1 in the IRQ status register (ISR). This does not depend on the status of the IRQnE bit.
Microcomputer Technical Q&A Q&A No.: QAH8S-023 Category: Interrupts Subject: Handling of Interrupt Requests when Interrupts are Masked Question Is an IRQnF interrupt request held pending if generated when interrupts are masked by the I and UI bits, or bits I2 to I0, in the condition code register (CCR)? Answer Yes. IRQnF is independent of the status of the I and UI bits. If interrupt masking is released while the IRQnF and IRQnE bits are set to 1, the interrupt will be accepted.
Microcomputer Technical Q&A Q&A No.: QAH8S-024 Category: Interrupts Subject: Use of IRQ Status Register Question The IRQ status register (ISR) can be cleared to 0 by the user. When is this register used? Answer The IRQ status register is cleared to 0 automatically. Therefore, the user consciously clears this register in the following cases: • In level sensing • If there is a risk of generation of an unwanted interrupt before interrupts are enabled (e.g.
Microcomputer Technical Q&A Q&A No.: QAH8S-025 Category: Interrupts Subject: Interrupt Disable Timing (1) Question When a supporting module interrupt enable bit is cleared to 0, is the interrupt disabled immediately? Answer The interrupt is disabled after execution of the instruction that clears the interrupt enable bit to 0. However, if an interrupt request is generated during execution of the 0-clearing instruction, the interrupt request may be accepted after execution of that instruction.
Microcomputer Technical Q&A Q&A No.: QAH8S-026 Category: Interrupts Subject: Interrupt Disable Timing (2) Question When an interrupt enable bit is cleared to 0 in the IRQ enable register (IER), is the interrupt disabled immediately? Answer The interrupt is disabled after execution of the instruction that clears the interrupt enable bit to 0.
Microcomputer Technical Q&A Q&A No.: QAH8S-027 Category: Interrupts Subject: Interrupt Immediately after Reset Question Is an interrupt ever generated immediately after a reset? Answer No, never. Immediately after a reset, all interrupts, including NMI, are disabled. However, NMI is accepted when the first instruction of the program is executed.
Microcomputer Technical Q&A Q&A No.: QAH8S-028 Category: Interrupts Subject: Simultaneous IRQ Interrupts of the Same Priority Questions 1. With external interrupts, if interrupts within the group with the same priority (IRQ4 to IRQ7) are generated simultaneously (e.g. IRQ4 and IRQ7), which has priority? 2. What will happen if an IRQ4 interrupt is generated in the IRQ7 interrupt handling routine? (Is IRQ4 held pending, or is IRQ4 handling given priority?) Answers 1.
Microcomputer Technical Q&A Q&A No.: QAH8S-029 Category: Interrupts Subject: Use of Different Interrupt Modes Question There are four interrupt control modes. How are these different modes used? Answer Modes 0 and 1 are compatible with the H8/300 Series and/or H8/300H Series. Guidelines for mode selection are given below. • Mode 0 Controlled by the I bit; useful when multiple interrupts are not used. If multiple interrupts are not used, the size of the stack, etc., can be limited.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 34 Applicability — Series — Applicability — Series —
Microcomputer Technical Q&A Q&A No.: QAH8S-030 Category: Interrupts Subject: Insufficient Number of External Interrupts Question Can any substitution method be used if more external interrupts are needed? Answer TPU input capture can be used as a substitute. An unused TPU timer general register (TGR) is set to input capture. When the designated edge is input at the TIOC input, the TGR flag is set and an input capture interrupt is generated. This can be used in the same way as an edge-input IRQ.
Microcomputer Technical Q&A Q&A No.: QAH8S-031 Category: Bus Controller Subject: CS State in On-Chip RAM and Internal I/O Access Question Is the chip select signal (CS7) output when on-chip memory or an internal I/O register (area 7) is accessed in advanced mode? Answer No, the chip select signal (CS7) is not output in internal I/O register access, and a chip select signal is not output in on-chip memory access.
Microcomputer Technical Q&A Q&A No.: QAH8S-032 Category: Bus Controller Subject: φ Clock State when Bus is Released Question Is the φ clock output when the bus is released? Answer If the corresponding port data direction register (DDR) bit is set to 1 and the PSTOP bit in the system control register (SYSCR) is cleared to 0, the φ clock is output when the bus is released.
Microcomputer Technical Q&A Q&A No.: QAH8S-033 Category: Bus Controller Subject: WAIT (1) Question When programmable waits are inserted and the pin wait function is also used, by what point should the WAIT pin level be settled? Answer The WAIT pin level should be settled by the fall of φ in the last T2 or Tw state.
Microcomputer Technical Q&A Q&A No.: QAH8S-034 Category: Bus Controller Subject: WAIT (2) Question The description of the pin wait function states that “program waits are inserted first.” Are program waits inserted irrespective of the wait control register (WCR) setting? Answer As stated in the manual, with pin waits, program waits are inserted in accordance with the WCR setting, followed by pin wait insertion with reference to the WAIT pin. A flowchart of pin wait insertion is shown below.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 40 Applicability — Series — Applicability — Series —
Microcomputer Technical Q&A Q&A No.: QAH8S-035 Category: Bus Controller Subject: Program Wait Switchover Timing Question After a power-on reset, 3 program wait states are inserted in an external access cycle, making a 6state access. When external 3-state access is set, what is the switchover timing? Answer The switchover is made immediately after the wait control register (WCRH) is set. To set external 3-state access after a power-on reset, clear the Wn0 and Wn1 bits in WCR to 0.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 42 Applicability — Series — Applicability — Series —
Microcomputer Technical Q&A Q&A No.: QAH8S-036 Category: Bus Controller Subject: BREQ Acceptance in Power-Down Modes Questions 1. Is BREQ accepted in sleep mode? 2. Is BREQ accepted in hardware standby mode or software standby mode? Answers 1. Yes. (However, in the H8S/2245 Series, H8S/2345 Series, and H8S/2355 Series, BREQ is not accepted in sleep mode when all modules are stopped.) 2. No, BREQ is not accepted in hardware standby mode or software standby mode.
Microcomputer Technical Q&A Q&A No.: QAH8S-037 Category: Bus Controller Subject: External Connection of RAM to 8-Bit-Access Space Question When RAM is connected externally to 8-bit-access space, is the HWR signal or the LWR signal used for access? Answer The HWR signal is used.
Microcomputer Technical Q&A Q&A No.: QAH8S-038 Category: Bus Controller Subject: Bus Controller Settings for Area 7 Question Area 7 includes a mix of on-chip RAM and internal I/O registers. For which areas are the bus width and number of access states set in the bus controller valid? Answer In area 7, the bus width and number of access states set in the bus controller are valid for areas other than on-chip RAM and internal I/O registers*.
Microcomputer Technical Q&A Applicable Products Applicability Yes Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 46 Applicability Yes — — — —
Microcomputer Technical Q&A Q&A No.: QAH8S-039 Category: Bus Controller Subject: External Bus states during CPU Operation Questions 1. What is the state of the external buses during CPU internal processing? 2. What is the state of the external buses after DREQ acceptance? 3. What is the state of the external buses after BREQ acceptance? Answer The states in cases 1 to 3 are summarized in the table below. Bus States during CPU Operation No.
Microcomputer Technical Q&A Q&A No.: QAH8S-040 Category: Bus Controller Subject: Internal I/O Register Access when Bus is Released Question When the H8S/2000 CPU releases the bus to an external device, can the external device (bus master) access H8S Series internal registers? Answer No, internal I/O registers cannot be accessed by an external device.
Microcomputer Technical Q&A Q&A No.: QAH8S-041 Category: Bus Controller Subject: CS Signals after Power-On Reset Question What is the state of the CS signals after a power-on reset? Answer After a power-on resets, all the CS signals except CS0 are in the input state (in modes 1, 4, and 5). In expanded modes with on-chip ROM disabled, vectors and starts of programs should be located in area 0.
Microcomputer Technical Q&A Q&A No.
Microcomputer Technical Q&A Q&A No.: QAH8S-043 Category: Bus Controller Subject: External Bus Right Release and Refresh Control Question Are refresh requests held pending while the bus is released? Answer If a refresh request is generated while the external bus right is released, refresh control is deferred until the external bus master cancels the bus request. Only one refresh request is held.
Microcomputer Technical Q&A Q&A No.: QAH8S-044 Category: Bus Controller Subject: 2-CAS DRAM Interface Question Please explain the use of the LCASS bit with the 2-CAS DRAM interface. Answer The LCASS bit in bus control register L (BCRL) selects whether the LWR pin or the LCAS pin is used for the LCAS signal on the 2-CAS DRAM interface. LCASS Description 0 The LCAS pin is used for the 2-CAS DRAM interface LCAS signal. • More pins are needed for bus control. (BREQO output and WAIT input cannot be used.
Microcomputer Technical Q&A Applicable Products Applicability Series Applicability Series Applicability Series Entire H8S Series Yes H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 — — — — 53
Microcomputer Technical Q&A Q&A No.: QAH8S-045 Category: Power-Down State Subject: Medium-Speed Mode Question Why is it that, in medium-speed mode, a divided clock is supplied to the bus masters (CPU, DTC, DMAC), while the original system clock is supplied to the other on-chip supporting modules? Answer The internal clock supplied to the on-chip supporting modules is always fixed.
Microcomputer Technical Q&A Q&A No.: QAH8S-046 Category: Power-Down State Subject: Oscillation Settling Wait Time after Software Standby Mode Question What are the pin states during the oscillation settling wait period after exiting software standby mode? Answer The pin states during the oscillation settling wait period in this case are the same as for software standby mode. For details, see the appendix “Port States in Each Processing State” in the relevant hardware manual.
Microcomputer Technical Q&A Q&A No.: QAH8S-047 Category: Power-Down State Subject: On-Chip Supporting Modules in Software Standby Mode Question What is the state of the on-chip supporting modules in software standby mode? Answer In the H8S Series, on-chip supporting module register contents are generally held in software standby mode, and the contents of these registers do not have to be set again when software standby mode is exited.
Microcomputer Technical Q&A Q&A No.: QAH8S-048 Category: Power-Down State Subject: Mode Pins (MD2 to MD0) in Hardware Standby Mode Question How does the microcomputer operate if the state of the mode pins (MD2 to MD0) is changed in hardware standby mode? Answer Normal hardware standby mode operation will not be performed. In hardware standby mode, as in normal operation, the mode pins (MD2 to MD0) must not be changed.
Microcomputer Technical Q&A Q&A No.: QAH8S-049 Category: Power-Down State Subject: Hardware Standby Mode at Power-On Question How can hardware standby mode be entered at power-on? Answer Drive the STBY pin low at power-on. Note: The mode pins (MD2 to MD0) must be set to the prescribed input state at this time. (In the H8S/2655 Series, at least one of pins MD2 to MD0 should be driven high, and one of modes 1 to 7 must be selected as the MCU operating mode.
Microcomputer Technical Q&A Q&A No.: QAH8S-050 Category: Power-Down State Subject: Module Stop Mode Question When a write is performed on an 8-bit timer register, the value is not written. Why is this? Answer Immediately after a reset, an H8S Series chip enters module stop mode to hold down current dissipation, and the internal I/O registers of the relevant modules cannot be read or written to. Module stop mode should be cleared in advance for on-chip supporting modules that are to be used.
Microcomputer Technical Q&A Q&A No.: QAH8S-051 Category: Power-Down State Subject: Timer Output in Module Stop Mode Question If module stop mode is set during output compare match output (TIOC output) by the TPU, what happens to this output? Answer In module stop mode, the TPU stops, and the register contents and TIOC output state are held.
Microcomputer Technical Q&A Q&A No.: QAH8S-052 Category: Electrical Characteristics Subject: Current Dissipation Value Question In the current dissipation entry in the H8S/2245 Series Electrical Characteristics section, there is an item for which three modes—sleep, all-module-stop, and medium-speed mode (φ / 32)—are combined into one. What is this? Answer This indicates a state combining all software-controllable power-down states.
Microcomputer Technical Q&A Q&A No.: QAH8S-053 Category: Electrical Characteristics Subject: RD Signal Timing Question With successive read cycles, does the RD signal go high momentarily when the bus cycle changes, or does it remain low? Answer The RD signal goes high momentarily. The RD signal rise delay time tRSD2 and fall delay time tRSD1 are virtually the same (tRSD1 tRSD2 ).
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 63
Microcomputer Technical Q&A Q&A No.: QAH8S-054 Category: Pins Subject: Handling of Unused Pins Question How should unused pins be handled? Answer For I/O ports and input ports, clear the DDR (data direction register) bits to 0 to set the input state, and pull each pin up or down individually with a resistance of approximately 10 k .
Microcomputer Technical Q&A Q&A No.: QAH8S-055 Category: Pins Subject: RES Pin, STBY Pin, and NMI Pin Input Circuits Question What kind of circuits are the RES pin, STBY pin, and NMI pin input circuits? Answer The RES pin, STBY pin, and NMI pin are Schmitt-trigger inputs. The signals are transferred internally via a noise canceler.
Microcomputer Technical Q&A Q&A No.: QAH8S-056 Category: Pins Subject: Address Pin States in On-Chip Memory Access Question When on-chip ROM or on-chip RAM is accessed, is the on-chip ROM or on-chip RAM address output off-chip? Answer When on-chip ROM, on-chip RAM, or an internal I/O register is accessed, the address bus retains its previous address value, and the on-chip ROM or on-chip RAM address value is not output offchip (see figure below).
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability — Series — Applicability — Series — 67
Microcomputer Technical Q&A Q&A No.: QAH8S-057 Category: Pins Subject: Built-In MOS Pull-Ups in Reset Question Can built-in MOS pull-ups be turned on in the reset state? Answer In a manual reset, I/O port states are held, and therefore built-in MOS pull-ups can be turned on. In a power-on reset, I/O ports are initialized, and therefore built-in MOS pull-up settings are cleared.
Microcomputer Technical Q&A Q&A No.: QAH8S-058 Category: Pins Subject: WDTOVF Pin Questions 1. What is the state of the WDTOVF pin in hardware standby mode? 2. The WDTOVF pin is high during the hardware standby period. Please give an example of a circuit that drives this signal low. 3. What is the WDTOVF pin output specification? Answers 1. In hardware standby mode, the WDTOVF pin is high. 2. An example of a circuit that drives the WDTOVF signal low during the hardware standby period is shown below.
Microcomputer Technical Q&A Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 Yes H8S/2355 H8S/2357 Yes H8S/2345 Yes H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 70 Applicability Yes — — — —
Microcomputer Technical Q&A Q&A No.: QAH8S-201 Category: DMAC Subject: Number of States between Transfers Question A minimum of two states are necessary between the first DMAC transfer and the next. Why is this? Answer When the DMAC is activated, the bus request signal is sent to the bus controller at the rise of the first clock, and enabling is accepted at the fall. At the rise of the next clock, a read/write request is sent to the bus controller.
Microcomputer Technical Q&A Q&A No.: QAH8S-202 Category: DMAC Subject: Maximum Transfer Rate Question What is the maximum transfer rate for single address transfer? Answer Two states are required for the DMAC activation wait, and two states for a two-word data transfer. Thus, at 20 MHz operation, the maximum transfer rate is 16 bits / (2tcyc + 2tcyc) × 50 ns = 10 Mbytes/s.
Microcomputer Technical Q&A Q&A No.: QAH8S-203 Category: DMAC Subject: Difference between DMAC and DTC Question What is the difference between the DMAC and the DTC? Answer The DMAC has data transfer information registers within the module, and performs data transfer on up to four channels. The DMAC achieves a high transfer speed of 0.1 µs (min.) per channel. The DTC places transfer data information in on-chip RAM, and can perform transfer on up to 85 channels. The transfer speed is 0.65 µs per channel.
Microcomputer Technical Q&A Q&A No.: QAH8S-204 Category: DMAC Subject: Alternate 8-Bit/16-Bit Space Accesses Question Can data transfer be performed between 8-bit space and 16-bit space using the DMAC or DTC? Answer Yes. As the input/output bus width is managed by the bus controller, as long as the bus width is set by the bus controller, the user can use the DMAC or DTC without having to be aware of the bus width.
Microcomputer Technical Q&A Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability Yes — — — — 75
Microcomputer Technical Q&A Q&A No.: QAH8S-205 Category: DMAC Subject: TEND Signal Output Conditions when Using Write Buffer Function Question What are the TEND signal output conditions when the write buffer function is used? Answer The TEND output signal goes low in an external bus cycle if either a DMAC read cycle or write cycle is an external access.
Microcomputer Technical Q&A φ CPU external write DMAC transfer Internal address External read External write External address DMAC transfer CPU external write TEND Low in read/write cycle Example of External Address → External Address Transfer Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability Yes — — — — 77
Microcomputer Technical Q&A Q&A No.: QAH8S-206 Category: DMAC Subject: Interrupt Acceptance After End of Transfer Question After the transfer count register value reaches H'0000 and an end interrupt is generated while the DMAC is being used, when is the next transfer request accepted? Answer The next transfer request is accepted when a bit is set to 1 by software in the data transfer control register (DTCR).
Microcomputer Technical Q&A Q&A No.: QAH8S-207 Category: DMAC Subject: Handling of Transfer Request before Start of Transfer Question If a transfer request is generated before the DMAC starts transfer, is the request ignored? Answer • If the activation source is an internal interrupt If the DTE bit is 0, a CPU interrupt is requested. When the DTE bit is set to 1 while that interrupt is masked by the CPU, an activation request is sent to the DMAC.
Microcomputer Technical Q&A Q&A No.: QAH8S-208 Category: DMAC Subject: Activation Request Signal Detection Question When the DREQ pin is designated falling-edge input, why is the first transfer request performed at the low level? Answer If a falling edge at the DREQ pin were used for the first activation, it would not be possible to recognize a request at first when transfer is enabled (DTE = 1) after the DREQ signal falling edge.
Microcomputer Technical Q&A Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability Yes — — — — 81
Microcomputer Technical Q&A Q&A No.: QAH8S-209 Category: DMAC Subject: Short Address Mode and Full Address Mode Question What is the difference between the DMAC’s short address mode and full address mode? Answer The DMAC requires specification of the source address and destination address in order to perform data transfer. In full address mode, both of these addresses are specified as 24-bit addresses, whereas in short address mode, one is specified as a 24-bit address and the other as a 16-bit address.
Microcomputer Technical Q&A Q&A No.: QAH8S-210 Category: DMAC Subject: Bus Right in Standby State Question In the DMAC full address mode and external request mode, a standby state may be entered after a DMAC write. What happens to the bus right during this period? Answer The DMAC releases the bus right in the standby state, and so the bus is transferred to the CPU, refresh controller, etc.
Microcomputer Technical Q&A Q&A No.: QAH8S-211 Category: DMAC Subject: Handling of Transfer End Interrupt Questions The manual states that if DTE is cleared to 0 when DTIE = 1, an interrupt request is sent to the CPU. 1. In the case shown in the figure, will DMA transfer end interrupts be generated continually? 2. How can interrupt generation be prevented? DTE = 0, DTIE = 1 DMA interrupt handling DTE = 0, DTIE = 1 values held RTE Answers 1.
Microcomputer Technical Q&A Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 Applicability Yes — — — — 85
Microcomputer Technical Q&A Q&A No.: QAH8S-212 Category: DMAC Subject: DREQ Signal Input Question When the DREQ pin is used in level-sensing mode, must it be held low until the data transfer ends? Answer The DREQ signal is latched at the rise of φ, and once latched the activation source is held. The activation source will therefore be held if the DREQ pin remains low for at least two states.
Microcomputer Technical Q&A Q&A No.: QAH8S-213 Category: DTC Subject: Nature of DTC Question Is the DTC special hardware, or is the DTC function executed by a CPU microprogram, etc.? Answer The DTC consists of special hardware. This enables it to perform high-speed data transfer without imposing any load on the CPU.
Microcomputer Technical Q&A Q&A No.: QAH8S-214 Category: DTC Subject: Maximum Number of Channels Question What is the maximum number of DTC channels? Answer DTC register information is located in a 1-kbyte area in on-chip RAM. The amount of RAM required for one DTC transfer is 12 bytes, enabling a maximum of 85 channels to be set.
Microcomputer Technical Q&A Q&A No.: QAH8S-215 Category: DTC Subject: Setting Register Information Question Are any precautions necessary when setting DTC register information? Answer Place DTC register information in the 1-kbyte area from H'FFF800 to H'FFFBFF* in on-chip RAM, and set the RAME bit to 1 in the system control register (SYSCR).
Microcomputer Technical Q&A Q&A No.: QAH8S-216 Category: DTC Subject: Order of Setting Register Information Question Is there a particular order for setting DTC register information? Answer There is no particular order, but the following point should be noted. If the DTC mode registers (MRA/MRB) are set first, followed by the DTC source address register (SAR) and DTC destination address register (DAR): Since SAR and DAR are 24-bit registers, when SAR and DAR are set with a longword instruction (MOV.
Microcomputer Technical Q&A Q&A No.: QAH8S-217 Category: DTC Subject: Use of DTC Interrupt Select Bit (DISEL) Question How is the DISEL bit in DTC mode register B (MRB) used? Answer The use of the DISEL bit is shown below. DISEL Description 0 The CPU executes interrupt handling (end processing or activation processing) after completion of the specified number of data transfers. Suitable when performing data transfer only.
Microcomputer Technical Q&A Q&A No.: QAH8S-218 Category: TPU Subject: Non-Timer Use of Port Question How can the TIOC I/O port be used for a purpose other than TPU input/output? Answer Set B'0000 in bits 7 to 4 or bits 3 to 0 of the timer I/O control register (TIOR) (disabling output).
Microcomputer Technical Q&A Q&A No.: QAH8S-219 Category: TPU Subject: Cascaded Connection Question Can cascaded connection be used with the TPU? Answer Yes. The two timer register combinations shown below can be used. The upper and lower registers operate in synchronization with the clock. 1. TCNT1 + TCNT2 2. TCNT4 + TCNT5 With combination 2, the following points must be noted. • Longword access cannot be used on the TCNT4/TCNT5 (TCNT, TGR) register pair, so two word accesses must be used.
Microcomputer Technical Q&A Q&A No.: QAH8S-220 Category: TPU Subject: Dual Use of PWM Mode 1 and Input Capture Question When TPU channels 0 and 3 are set to PWM mode 1 and only timer general registers TGRnA and TGRnB are used, can the remaining timer general registers (TGRnC and TGRnD) be used for input capture? Answer No. There is one operating mode per channel. TGRnC and TGRnD can be used as output compare registers by disabling output.
Microcomputer Technical Q&A Q&A No.: QAH8S-221 Category: TPU Subject: Setting PWM Mode 2 Cycle Question Which register is used to set the cycle in PWM mode 2? Answer The cycle is determined by the register selected by CCLRn (counter clear) in the timer control register (TCR). In this case, output is automatically disabled for the output pins corresponding to the register used as the counter clear source.
Microcomputer Technical Q&A Q&A No.: QAH8S-222 Category: TPU Subject: Synchronous Operation of Two Sets Question Is synchronous operation of two sets possible? Answer No. The timer synchro register (TSYR) does not permit a synchronous operation setting for two or more sets.
Microcomputer Technical Q&A Q&A No.: QAH8S-223 Category: TPU Subject: Two-Phase PWM Output Question Is it possible to obtain two-phase PWM output with a common cycle but different duty cycles and a phase difference? Answer This is possible in PWM mode 1, using channels 0 and 3 (or synchronous operation of two channels). The setting method for channel 0 is described below. 1. Set channel 0 to PWM mode. 2. Set TGRA and TGRB, and TGRC and TGRD, to different output with the timer I/O control register (TIOR).
Microcomputer Technical Q&A Applicable Products Applicability Series Series Applicability Series Entire H8S Series Yes H8S/2655 Yes H8S/2350 Yes H8S/2355 H8S/2357 Yes H8S/2345 Yes H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 98 Applicability Yes — — — —
Microcomputer Technical Q&A Q&A No.: QAH8S-224 Category: WDT Subject: Interval Timer with Arbitrary Time Interval Question When the WDT is used as an interval timer, is it possible generate interrupts at fixed intervals? Answer Yes. However, since the WDT generates only overflow interrupts*, the initial value should be written in TCNT. Note that TCNT is always in the reset state when TME = 0. Note: * An NMI interrupt setting can also be made in the H8S/2100 Series.
Microcomputer Technical Q&A Q&A No.: QAH8S-225 Category: SCI Subject: SCI Initialization Question In SCI initialization, why is there a minimum 1-bit wait before the TE bit or RE bit is set in the serial control register (SCR)? Answer This 1-bit interval is the minimum time necessary for internal processing to fix the data. If transmission is performed without this 1-bit wait, indefinite data will be transmitted. A wait of at least 1-bit duration is therefore essential before performing transmission.
Microcomputer Technical Q&A Q&A No.: QAH8S-226 Category: SCI Subject: Difference between TDRE Flag and TEND Flag Question What is the difference between the TDRE flag and TEND flag in the serial status register (SSR)? Answer The TDRE flag indicates that the transmit data register (TDR) is in the write-enabled state, without regard to the internal state of the transmit shift register (TSR). The TEND flag indicates that TSR is empty, and TDR is in the write-enabled state.
Microcomputer Technical Q&A Q&A No.: QAH8S-227 Category: SCI Subject: Initial State of TxD Pin Question What happens to the initial value of the TxD pin when the TE bit is set to 1 in the serial control register (SCR) in serial transmission? Answer When the TE bit is set to 1, the TxD pin goes high automatically in both asynchronous mode and synchronous mode.
Microcomputer Technical Q&A Q&A No.: QAH8S-228 Category: SCI Subject: Maximum External Clock Input Value (Asynchronous Mode) Question What is the maximum possible external clock input frequency in asynchronous mode? Answer The cycle of the external clock input to the SCI must be at least 4 × tcyc (min.). With a 20 MHz operating frequency, the maximum value for external clock input is 5 MHz (max.).
Microcomputer Technical Q&A Q&A No.: QAH8S-229 Category: SCI Subject: Transmit/Receive Operation in Synchronous Mode Question Can reception alone be performed in transmit/receive operation (TE = RE = 1) in synchronous mode? Answer As the same clock is used for transmission and reception in synchronous mode, transmission and reception are performed simultaneously in transmit/receive operation (TE = RE = 1).
Microcomputer Technical Q&A Q&A No.: QAH8S-230 Category: SCI Subject: SCI Transmission Using DTC Question Is it possible to performs SCI transmission by activating the DTC at successive timer compare matches? Answer No. The reason is that, in DTC data transfer, TDRE is cleared to 0 in the serial data register (SSR) only when the DTC activation source is the SCI transmission-completed interrupt.
Microcomputer Technical Q&A Q&A No.: QAH8S-231 Category: SCI Subject: Permissible Bit Rate Error in Asynchronous Mode Question What is the permissible bit rate error in asynchronous mode? Answer When the H8S Series chip is receiving, the permissible error within one frame is as shown below. This shows the worst case for the sampling timing of the last bit (stop bit) of the frame. With 8-bit data and no parity, one frame consists of 160 internal basic clocks.
Start 1 1 2 2 5 5 DATA sample SYNC With bit drift RxD (Min) With bit drift RxD (Typ) Sampling drift: 1 clock max. Start bit Start bit Start bit 4 4 RxD (A) 3 3 Start bit Sampling drift: 1 clock max. 0 0 160 clocks RxD (Typ) CLK Enlarged diagram B A TYP. 16 clocks 5 6 6 7 7 8 P Stop Start 15 0 5 Stop 6 7 Stop bit Stop bit Sampling possible even with 7.
Microcomputer Technical Q&A However, if the transmitting side is fast, the next frame will begin before completion of the receive operation, and it may not be possible to receive this next frame. Two-stop mode should therefore be used when receiving, since the second stop bit is ignored in this mode. Note: See “Receive Data Sampling Timing in Asynchronous Mode and Receive Margin” in the hardware manual.
Microcomputer Technical Q&A Q&A No.: QAH8S-232 Category: SCI Subject: Operation of RDRF Flag Question An operation to clear the RDRF flag to 0 in the serial status register (SSR) is necessary in SCI reception. What will happen if this flag is cleared to 0 directly without first reading 1? Answer It will not be cleared. However, if the BCLR instruction is used, after a byte-unit read of SSR, the RDRF flag is cleared to 0, and a byte-unit write is performed.
Microcomputer Technical Q&A Q&A No.: QAH8S-233 Category: SCI Subject: RDRF Flag Set Timing Questions When data reception ends, the RDRF flag is set to 1 in the serial status register (SSR). 1. What is the timing for RDRF flag setting in asynchronous mode? 2. What is the timing for RDRF flag setting in synchronous mode? Answers See the next page.
Microcomputer Technical Q&A Answers 1. The RDRF flag is set following the fall of the data sampling clock after the stop bit data is received (see figure below). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Base clock Receive data Bit 7 Stop bit Data sampling RDRF When SCK clock source is internal clock: 0.
Microcomputer Technical Q&A 2. The RDRF flag is set following the fall of the serial clock after the MSB data is received (see figure below).
Microcomputer Technical Q&A Q&A No.: QAH8S-234 Category: SCI Subject: Interrupt Source Flag Clearing Question If a receive-error interrupt is generated, and the receive error flags (ORER, FER, PER) in the serial status register (SSR) are not cleared in the interrupt handling routine before returning to the main routine, will another receive-error interrupt be generated? Answer Yes.
Microcomputer Technical Q&A Q&A No.: QAH8S-235 Category: SCI Subject: Continuous Transmission/Reception in Synchronous Mode Using External Clock Questions In synchronous mode operation using an external clock: 1. If, after transmission of one data byte is completed, the external clock is input to the SCK pin before the CPU has written the next transmit data to the transmit data register (TDR), will the SCI start the next transmit operation? 2. What happens after completion of reception? 3.
Microcomputer Technical Q&A Q&A No.: QAH8S-236 Category: SCI Subject: Use of RDR and TDR when SCI is Not Used Questions Can the following registers be used as data registers when the SCI is not used? 1. Receive data register (RDR) 2. Transmit data register (TDR) Answers 1. No: as the receive data register (RDR) is a read-only register, it cannot be used as a data register. 2. Yes, the transmit data register (TDR) can be used as a data register.
Microcomputer Technical Q&A Q&A No.: QAH8S-237 Category: SCI Subject: SCI Clock Pin Input/Output Setting Question When the SCI is used, is the input/output specification for the SCK pin made in the data direction register (DDR) for the port corresponding to that pin? Answer No. When the SCI is used, the SCK pin input/output specification is made with the C/A bit (communication mode bit) in the serial mode register (SMR) and bits CKE1 and CKE0 (clock enable) in the serial control register (SCR).
Microcomputer Technical Q&A Q&A No.: QAH8S-238 Category: SCI Subject: Serial Internal I/O Pin States Question After the TxD, RxD, and SCK pins—which are multiplexed as I/O ports—were used as SCI pins, SCI operation was disabled with the serial control register (SCR) and serial mode register (SMR), and these pins were set as I/O ports.
Microcomputer Technical Q&A Q&A No.: QAH8S-239 Category: SCI Subject: Setting Asynchronous Mode Question When performing asynchronous mode transfer with the SCI, what is the setting procedure for performing transfer by software, without using the DMAC or DTC? Answer When TDRE = 1, a data-empty interrupt is always generated when TIE is set to 1. There are thus two methods, as follows. 1.
Microcomputer Technical Q&A 2. Performing first byte setting at the same time as SCI setting SCI setting processing Counter setting: count = 1 As 1st data byte is stored in TDR by software, counter is set to 1. TE = 1 Set 1st byte in TDR Clear TDRE (start transfer)* TIE = 1 (enable empty interrupt) Interrupt wait Note: * After the data is transferred from TDR to TSR, TDRE is set to 1.
Microcomputer Technical Q&A In both of the above cases, the TXI interrupt handling routine flowchart is as shown below.
Microcomputer Technical Q&A Q&A No.: QAH8S-240 Category: SCI Subject: Data Transfer to TDR Questions H8S Series chip SRAM Data transmission SCI 16-bit data bus DMAC or DTC Transfer data To transfer data in 16-bit-access space* to the SCI transmit data register (TDR: 8 bits long), as shown above: 1. Is there any way of performing the transfer by software? 2.
Microcomputer Technical Q&A Applicable Products Applicability Series Yes Entire H8S Series H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 122 Applicability — Series — Applicability — Series —
Microcomputer Technical Q&A Q&A No.: QAH8S-241 Category: SCI Subject: TDRE Flag Set Timing Questions When data transmission ends, the TDRE flag is set to 1 in the serial status register (SSR). 1. What is the timing for TDRE flag setting in asynchronous mode? 2. What is the timing for TDRE flag setting in synchronous mode? Answers See the next page.
Microcomputer Technical Q&A Answers The TDRE set timing differs depending on whether or not the transmit shift register (TSR) contains transmit data. 1. Asynchronous mode a.
Microcomputer Technical Q&A b. When TSR does not contain transmit data (see figure below) T1 T2 T3 φ Internal write signal 9 10 1112 13 14 15 16 1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 1 2 3 4 5 6 7 8 Base clock TDRE 2.
Microcomputer Technical Q&A 2. Synchronous mode a. When TSR contains transmit data (see figure below) Serial clock Transmit data Bit 6 Bit 7 TDRE When SCK clock source is internal clock: 2 states When SCK clock source is external clock: 1.5 to 2.5 states b. When TSR does not contain transmit data (see figure below) T1 T2 T3 φ Internal write signal TDRE 2.
Microcomputer Technical Q&A Q&A No.: QAH8S-242 Category: SCI Subject: Phases of System Clock and SCK Question Is SCK (the serial clock transfer clock) output in synchronization with the rise or fall of φ (the system clock)? Answer The SCK signal is output in synchronization with the fall of φ.
Microcomputer Technical Q&A Q&A No.: QAH8S-243 Category: A/D Converter Subject: Idea Behind External C and R Question What is the idea behind the connection of a signal source impedance (tap resistance, etc.) and lowpass filter to the A/D converter input pins? Answer The ideas behind these connections are as follows.
Microcomputer Technical Q&A Permissible signal source impedance Rout Sensor input A/D converter equivalent circuit RAD ≈ 10 kΩ AN0 to AN7 CAD ≈ 20 pF Low-pass filter C Example of Analog Input Circuit • Low-pass filter Adding a large capacitance (up to 0.1 µF or so) to the input pins makes sensor output impedance Rout essentially negligible in single-mode conversion. When scan mode is used, however, the internal capacitance must be charged in a short time, and so error may arise.
Microcomputer Technical Q&A Q&A No.: QAH8S-244 Category: A/D Converter Subject: A/D Conversion in Simultaneous Sampling Operation Question How does A/D conversion operate with group scan mode simultaneous sampling? Answer An example of A/D conversion operation with group scan mode simultaneous sampling is shown below.
Microcomputer Technical Q&A Applicable Products Applicability Series Applicability Series Applicability Series Entire H8S Series Yes H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 — — — — 131
Microcomputer Technical Q&A Q&A No.: QAH8S-245 Category: A/D Converter Subject: A/D Conversion Time in Simultaneous Sampling Operation Question What is the A/D conversion time in simultaneous sampling operation? Answer The conversion time is normally 1 µs, but with simultaneous sampling, as shown in the figure below, the conversion time for even-numbered conversions (B and D) is twice that for oddnumbered conversions (A and C).
Microcomputer Technical Q&A Applicable Products Applicability Series Applicability Series Applicability Series Entire H8S Series Yes H8S/2655 H8S/2350 H8S/2355 H8S/2357 H8S/2345 H8S/2245 H8S/2148 H8S/2144 H8S/2138 H8S/2134 H8S/2128 H8S/2124 — — — — 133
Microcomputer Technical Q&A Q&A No.: QAH8S-246 Category: I/O Ports Subject: I/O Port Manipulation Question When a particular bit of an I/O port is specified as an output port, can a bit-manipulation instruction be executed on that port? Answer Yes. The port data registers (DRs) can be read or written to at any time, and can be manipulated with bit-manipulation instructions. The data direction registers (DDRs) are write-only registers, and so cannot be manipulated with bit-manipulation instructions.
Microcomputer Technical Q&A Q&A No.: QAH8S-247 Category: I/O Ports Subject: Reserved Bits Question Write data rules are sometimes given for reserved bits in internal I/O registers. Is there any problem with writing data other than that prescribed to these reserved bits? Answer Only the data prescribed in the manual should be written, otherwise correct operation is not guaranteed. For example, the ICE and the production chip may operate differently.
Microcomputer Technical Q&A Q&A No.: QAH8S-248 Category: I/O Ports Subject: Disabling φ Output Question Is there any way of fixing φ output high in normal operation? Answer Yes. To fix φ output high, set the PSTOP bit to 1 in the system clock control register (SCKCR) (see table below). Also, φ output can be disabled by clearing the corresponding port data direction register (DDR) bit to 0, designating input port operation.
Microcomputer Technical Q&A Q&A No.: QAH8S-249 Category: I/O Ports Subject: Port 3 Open-Drain Output Question Port 3 pins are multiplexed as SCI0 and SCI1 input/output pins. Can port 3 pins be used as opendrain outputs only when the I/O port function is used, or also when the SCI output pin function is used? Answer Open-drain output is also possible when port 3 pins are used as SCI output pins.
Microcomputer Technical Q&A Q&A No.: QAH8S-250 Category: I/O Ports Subject: Multiplexing as IRQ3 and LWR Question The PF3 pin is also multiplexed as LWR and IRQ3. Can IRQ3 input be used in modes 1, 2, 4, 5, and 6? Answer No. The PF3/LWR/IRQ3 pin becomes the LWR output automatically in modes 1, 2, 4, 5, and 6, and so cannot be used as the IRQ3 input.
Microcomputer Technical Q&A Q&A No.: QAH8S-251 Category: Clock Pulse Generator Subject: Crystal Resonator Capacitance Value Question Crystal resonator capacitance value C0 is given as 7 pF in the hardware manual. Can a larger capacitance be used? Answer The C0 value given in the hardware manual is a reference value. The C0 value will depend on the user’s system, and therefore oscillation should be confirmed in with the chip in actual use.
H8S Series Technical Q&A Application Note Publication Date: 1st Edition, February 1998 Published by: Semiconductor and IC Div. Hitachi, Ltd. Edited by: Technical Documentation Center Hitachi Microcomputer System Ltd. Copyright © Hitachi, Ltd., 1998. All rights reserved. Printed in Japan.