Page 2
Cautions 1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s patent, copyright, trademark, or other intellectual property rights for information contained in this document. Hitachi bears no responsibility for problems that may arise with third party’s rights, including intellectual property rights, in connection with use of the information contained in this document.
Page 18
26.15.6 Noise Detection ....................744 26.15.7 Activation of the Sync Signal Detector ............747 26.16 Servo Interrupt ........................748 26.16.1 Overview ......................748 26.16.2 Register Configuration..................748 26.16.3 Register Description ..................748 Section 27 Sync Separator for OSD and Data Slicer ..........
Page 19
28.2.2 Slice Line Setting Registers 1 to 4 (SLINE1 to SLINE4)......... 807 28.2.3 Slice Detection Registers 1 to 4 (SDTCT1 to SDTCT4) ........808 28.2.4 Slice Data Registers 1 to 4 (SDATA1 to SDATA4)......... 811 28.2.5 Module Stop Control Register (MSTPCR)............812 28.2.6 Monitor Output Setting Register (DOUT) ............
Page 20
29.5.9 Screen Control Register (DCNTL) ..............850 29.6 Other Settings........................855 29.6.1 TV Format ......................855 29.6.2 Display Data RAM Control ................855 29.6.3 Timing of OSD Display Updates Using Register Rewriting ......855 29.6.4 4fsc/2fsc......................855 29.6.5 OSDV Interrupts....................855 29.6.6 OSD Format Register (DFORM)..............
30.2.7 OSD Electrical Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196....................896 30.3 Electrical Characteristics of HD64F2199 ................. 900 30.3.1 DC Characteristics of HD64F2199..............900 30.3.2 Allowable Output Currents of HD64F2199............907 30.3.3 AC Characteristics of HD64F2199..............908 30.3.4 Serial Interface Timing of HD64F2199............911 30.3.5 A/D Converter Characteristics of HD64F2199..........
CPU instructions at the object-code level, facilitating migration from the H8/300, H8/300L, or H8/300H Series. The H8S/2199 Series is equipped with a digital servo circuit, sync separator, OSD, data slicer, ROM, RAM, seven types of timers, three types of PWM, two types of serial communication interface, an I C bus interface, A/D converter, and I/O port as on-chip supporting modules.
Page 23
Table 1.1 Features of the H8S/2199 Series Item Specifications • General-register architecture Sixteen 16-bit general registers (also usable as sixteen 8-bit registers or eight 32-bit registers) • High-speed operation suitable for real-time control Maximum operating frequency: 10 MHz/4 to 5.5 V ...
Page 24
Item Specifications Timer L Timer • 8-bit up/down counter • Clock source can be selected among 2 types of internal clock, CFG frequency division signal, and PB and REC-CTL (control pulse) • Compare-match clearing function/auto reload function Timer R •...
Page 25
Item Specifications Asynchronous mode or synchronous mode selectable Serial communication Desired bit rate selectable with built-in baud rate generator interface (SCI) Multiprocessor communication function Conforms to Phillips I C bus interface C bus interface standard (2 channels) ...
Page 26
Sampling clock generated by AFC Slice interrupt Error detection Flash memory or mask ROM (Refer to the product line-up) Memory High-speed static RAM Product Name H8S/2199 128 k bytes 3 k bytes H8S/2198 112 k bytes 3 k bytes H8S/2197...
Internal Block Diagram Figure 1.1 shows an internal block diagram of the H8S/2199 Series. P37/TMO P27/SYNCI P36/BUZZ P26/SCL0 P35/PWM3 P25/SDA0 H8S/2000 CPU P34/PWM2 P24/SCL1 P33/PWM1 P23/SDA1 P32/PWM0 P22/SCK1 P31/SV2 Internal data bus P21/SO1 P30/SV1 P20/SI1 R O M Internal address bus...
1.3.2 Pin Functions Table 1.2 summarizes the functions of the H8S/2199 Series pins. Table 1.2 Pin Functions Type Symbol Pin No. Name and Function Power 56, 112 Input Power supply: supply All Vcc pins should be connected to the system...
Page 31
Type Symbol Pin No. Name and Function Operating Input Mode pin: mode This pin sets the operating mode. This pin control should not be changed while the MCU is in operation System Input Reset input: control When this pin is driven low, the chip is reset Input Flash memory enable: Enables/disables flash memory programming.
Page 32
Type Symbol Pin No. Name and Function ,546 Timers Input Timer R input capture: Input pin for input capture of Timer R TMRU-1 or TMRU-2 FTOA Output Timer X1 output compare A and B output: FTOB Output pin for output compare A and B of Timer FTIA Input Timer X1 input capture A, B, C and D input:...
Page 33
Type Symbol Pin No. Name and Function AN7 to 28 to 35 Input Analog input channels 7 to 0: converter Analog data input pins. A/D conversion is started by a software triggering Input Analog input channels 8, 9, A and B: Analog data input pins.
Page 34
Type Symbol Pin No. Name and Function Servo CTL Amp Output CTL amp output: circuits Output pin for CTL amp CTL SMT Input CTL Schmitt amp input: Input pin for CTL Schmitt amp CTLFB Input CLT feedback input: Input pin for CTL amp high-range characteristics control CTLREF Output...
Page 35
Type Symbol Pin No. Name and Function Sync Csync/ Input/ Sync signal input/output: separator Hsync output Composite sync signal input/output or horizontal sync signal input VLPF/ Input Sync signal input: Vsync Pin for connecting external LPF for vertical sync signal or input pin for vertical sync signal AFC pc Input/ AFC oscillation:...
Page 36
Type Symbol Pin No. Name and Function Output OSD digital output: Character data output Output OSD digital output: Character display position output Data CVin2 Input Composite video input: slicer Composite video signal input. Input 2-Vp-p composite video signal, and the sync tip of the signal is clamped to about 2.0 V.
Section 2 CPU Overview The H8S/2000 CPU is a high-speed central processing unit with an internal 32-bit architecture that is upward-compatible with the H8/300 and H8/300H CPUs. The H8S/2000 CPU has sixteen 16- bit general registers, can address a 16-Mbyte (architecturally 4-Gbyte) linear address space, and is ideal for realtime control.
16 ÷ 8-bit register-register divide: 1200 ns 16 × 16-bit register-register multiply: 2000 ns 32 ÷ 16-bit register-register divide: 2000 ns • Two CPU operating modes Normal mode*/Advanced mode • Power-down state Transition to power-down state by SLEEP instruction CPU clock speed selection Note: * Normal mode is not available for this LSI.
• Expanded address space Normal mode supports the same 64-kbyte address space as the H8/300 CPU. Advanced mode supports a maximum 16-Mbyte address space. • Enhanced addressing mode The addressing modes have been enhanced to make effective use of the 16-Mbyte address space.
CPU Operating Modes The H8S/2000 CPU has two operating modes: normal and advanced. Normal mode supports a maximum 64-kbyte address space. Advanced mode supports a maximum 16-Mbyte total address space (architecturally the maximum total address space is 4 Gbytes, with a maximum of 16 Mbytes for the program area and a maximum of 4 Gbytes for the data area).
Page 41
(d) Exception Vector Table and Memory Indirect Branch Addresses In normal mode the top area starting at H'0000 is allocated to the exception vector table. One branch address is stored per 16 bits. The configuration of the exception vector table in normal mode is shown in figure 2.2.
Page 42
(e) Stack Structure When the program counter (PC) is pushed onto the stack in a subroutine call, and the PC and condition-code register (CCR) are pushed onto the stack in exception handling, they are stored as shown in figure 2.3. The extended control register (EXR) is not pushed onto the stack.
Page 43
(d) Exception Vector Table and Memory Indirect Branch Addresses In advanced mode the top area starting at H'00000000 is allocated to the exception vector table in units of 32 bits. In each 32 bits, the upper 8 bits are ignored and a branch address is stored in the lower 24 bits (figure 2.4).
Page 44
(e) Stack Structure In advanced mode, when the program counter (PC) is pushed onto the stack in a subroutine call, and the PC and condition-code register (CCR) are pushed onto the stack in exception handling, they are stored as shown in figure 2.5. The extended control register (EXR) is not pushed onto the stack.
Address Space Figure 2.6 shows a memory map of the H8S/2000 CPU. The H8S/2000 CPU provides linear access to a maximum 64-kbyte address space in normal mode, and a maximum 16-Mbyte (architecturally 4-Gbyte) address space in advanced mode. H'0000 H'00000000 H'FFFF Program area H'00FFFFFF...
Register Configuration 2.4.1 Overview The CPU has the internal registers shown in figure 2.7. There are two types of registers: general registers and control registers. General Registers (Rn) and Extended Registers (En) ER7 (SP) Control Registers (CR) 7 6 5 4 3 2 1 0 T –...
2.4.2 General Registers The CPU has eight 32-bit general registers. These general registers are all functionally alike and can be used as both address registers and data registers. When a general register is used as a data register, it can be accessed as a 32-bit, 16-bit, or 8-bit register. When the general registers are used as 32-bit registers or address registers, they are designated by the letters ER (ER0 to ER7).
Free area SP (ER7) Stack area Figure 2.9 Stack 2.4.3 Control Registers The control registers are the 24-bit program counter (PC), 8-bit extended control register (EXR), and 8-bit condition-code register (CCR). (1) Program Counter (PC) This 24-bit counter indicates the address of the next instruction the CPU will execute. The length of all CPU instructions is 2 bytes (one word), so the least significant PC bit is ignored.
Bit 6: User Bit or Interrupt Mask Bit (UI) Can be written and read by software using the LDC, STC, ANDC, ORC, and XORC instructions. This bit can also be used as an interrupt mask bit. For details, see section 6, Interrupt Controller.
Data Formats The CPU can process 1-bit, 4-bit (BCD), 8-bit (byte), 16-bit (word), and 32-bit (longword) data. Bit-manipulation instructions operate on 1-bit data by accessing bit n (n = 0, 1, 2, ..., 7) of byte operand data. The DAA and DAS decimal-adjust instructions treat byte data as two digits of 4-bit BCD data.
Page 51
Data Type General Register Data format Word data Word data Longword data [Legend] : General register ER : General register E : General register R : General register RH : General register RL : Most significant bit : Least significant bit Figure 2.11 General Register Data Formats (2) Rev.
2.5.2 Memory Data Formats Figure 2.12 shows the data formats in memory. The CPU can access word data and longword data in memory, but word or longword data must begin at an even address. If an attempt is made to access word or longword data at an odd address, no address error occurs but the least significant bit of the address is regarded as 0, so the access starts at the preceding address.
Instruction Set 2.6.1 Overview The H8S/2000 CPU has 65 types of instructions. The instructions are classified by function in table 2.1. Table 2.1 Instruction Classification Function Instructions Size Types Data transfer , PUSH LDM, STM MOVFPE, MOVTPE Arithmetic ADD, SUB, CMP, NEG ADDX, SUBX, DAA, DAS INC, DEC ADDS, SUBS...
2.6.2 Instructions and Addressing Modes Table 2.2 indicates the combinations of instructions and addressing modes that the H8S/2000 CPU can use. Table 2.2 Combinations of Instructions and Addressing Modes Addressing Modes Instruction — — — — — POP, PUSH — —...
2.6.3 Table of Instructions Classified by Function Tables 2.3 to 2.10 summarize the functions of the instructions. The notation used in table 2.3 is defined below. Operation Notation General register (destination)* General register (source)* General register* General register (32-bit register) (EAd) Destination operand (EAs)
Page 56
Table 2.3 Data Transfer Instructions Instruction Size* Function (EAs) → Rd, Rs → (EAd) B/W/L Moves data between two general registers or between a general register and memory, or moves immediate data to a general register MOVFPE Cannot be used in this LSI MOVTPE Cannot be used in this LSI @SP+ →...
Page 57
Table 2.4 Arithmetic Instructions Instruction Size* Function Rd ± Rs → Rd, Rd ± #IMM → Rd B/W/L Performs addition or subtraction on data in two general registers, or on immediate data and data in a general register. (Immediate byte data cannot be subtracted from byte data in a general register.
Page 58
Instruction Size* Function Rd ÷ Rs → Rd DIVXS Performs signed division on data in two general registers: either 16 bits ÷ 8 bits → 8-bit quotient and 8-bit remainder or 32 bits ÷ 16 bits → 16-bit quotient and 16-bit remainder B/W/L Rd - Rs, Rd - #IMM Compares data in a general register with data in another general...
Page 59
Table 2.5 Logic Instructions Instruction Size* Function Rd ∧ Rs → Rd, Rd ∧ #IMM → Rd B/W/L Performs a logical AND operation on a general register and another general register or immediate data Rd ∨ Rs → Rd, Rd ∨ #IMM → Rd B/W/L Performs a logical OR operation on a general register and another general register or immediate data...
Page 60
Table 2.7 Bit Manipulation Instructions Instruction Size* Function 1 → (<bit-No.> of <EAd>) BSET Sets a specified bit in a general register or memory operand to 1. The bit number is specified by 3-bit immediate data or the lower three bits of a general register 0 →...
Page 61
Instruction Size* Function C ⊕ (<bit-No.> of <EAd>) → C BOXR Exclusive-ORs the carry flag with a specified bit in a general register or memory operand and stores the result in the carry flag C ⊕ [~ (<bit-No.> of <EAd>)] → C BIXOR Exclusive-ORs the carry flag with the inverse of a specified bit in a general register or memory operand and stores the result in...
Page 62
Table 2.8 Branch Instructions Instruction Size* Function Branches to a specified address if a specified condition is true The branching conditions are listed below Mnemonic Description Condition BRA (BT) Always (True) Always BRN (BF) Never (False) Never HIgh CVZ = 0 Low of Same CVZ = 1 BCC (BHS)
Page 63
Table 2.9 System Control Instructions Instruction Size* Function TRAPA Starts trap-instruction exception handling Returns from an exception-handling routine SLEEP Causes a transition to a power-down state (EAs) → CCR, (EAs) → EXR Moves contents of a general register or memory or immediate data to CCR or EXR.
Page 64
Table 2.10 Block Data Transfer Instructions Instruction Size* Function if R4L ≠ 0 then EEPMOV.B Repeat @ER5+→@er6+ R4L−1→R4L Until R4L = 0 else next; if R4 ≠ 0 then EEPMOV.W Repeat @ER5+→@er6+ R4−1→R4 Until R4 = 0 else next; Transfers a data block according to parameters set in general registers R4L or R4, ER5, and ER6 R4L or R4: size of block (bytes)
2.6.4 Basic Instruction Formats The CPU instructions consist of 2-byte (1-word) units. An instruction consists of an operation field (op field), a register field (r field), an effective address extension (EA field), and a condition field (cc). Figure 2.13 shows examples of instruction formats. (1) Operation field only NOP, RTS, etc.
2.6.5 Notes on Use of Bit-Manipulation Instructions The BSET, BCLR, BNOT, BST, and BIST instructions read a byte of data, carry out bit manipulation, then write back the byte of data. Caution is therefore required when using these instructions on a register containing write-only bits, or a port. The BCLR instruction can be used to clear internal I/O register flags to 0.
Addressing Modes and Effective Address Calculation 2.7.1 Addressing Mode The CPU supports the eight addressing modes listed in table 2.11. Each instruction uses a subset of these addressing modes. Arithmetic and logic instructions can use the register direct and immediate modes. Data transfer instructions can use all addressing modes except program- counter relative and memory indirect.
Page 68
(4) Register Indirect with Post-Increment or Pre-Decrement–@ERn+ or @-ERn (a) Register indirect with post-increment–@ERn+ The register field of the instruction code specifies an address register (ERn) which contains the address of a memory operand. After the operand is accessed, 1, 2, or 4 is added to the address register contents and the sum is stored in the address register.
Page 69
(6) Immediate–#xx:8, #xx:16, or #xx:32 The instruction contains 8-bit (#xx:8), 16-bit (#xx:16), or 32-bit (#xx:32) immediate data as an operand. The ADDS, SUBS, INC, and DEC instructions contain immediate data implicitly. Some bit manipulation instructions contain 3-bit immediate data in the instruction code, specifying a bit number.
If an odd address is specified in word or longword memory access, or as a branch address, the least significant bit is regarded as 0, causing data to be accessed or an instruction code to be fetched at the address preceding the specified address. (For further information, see section 2.5.2, Memory Data Formats.) 2.7.2 Effective Address Calculation...
Page 71
Table 2.13 Effective Address Calculation Addressing Mode and Effective Address Instruction Format Calculation Effective Address (EA) Register direct (Rn) Operand is general register contents rm rn Register indirect (@ERn) 24 23 Don’t General register contents care Register indirect with displacement @(d:16, ERn) or @(d:32, ERn) General register contents 24 23...
Page 72
Addressing Mode and Effective Address Instruction Format Calculation Effective Address (EA) Absolute address @aa:8 24 23 Don’t H'FFFF care @aa:16 24 23 16 15 Sign Don’t exten- care sion @aa:24 24 23 Don’t care @aa:32 24 23 Don’t care Immediate #xx:8/#xx:16/#xx:32 Operand is immediate data Program-counter relative @(d:8, PC)/@(d:16, PC)
Page 73
Addressing Mode and Effective Address Instruction Format Calculation Effective Address (EA) Memory indirect @@aa:8 • Normal mode H'000000 24 23 16 15 Don’t H'00 care Memory contents • Advanced mode H'000000 24 23 Don’t Memory contents care Rev. 1.0, 02/00, page 53 of 1141...
Processing States 2.8.1 Overview The CPU has four main processing states: the reset state, exception-handling state, program execution state, and power-down state. Figure 2.15 shows a diagram of the processing states. Figure 2.16 indicates the state transitions. Reset state The CPU and all on-chip supporting modules have been initialized and are stopped. Exception-handling state A transient state in which the CPU changes the normal processing flow in response...
Program execution state Sleep mode External interrupt request Exception-handling state Standby mode Power-down state = High Reset state Notes: From any state, a transition to the reset state occurs whenever goes low. A transition can also be made to the reset state when the watchdog timer overflows. The power-down state also includes a watch mode, subactive mode, subsleep mode, etc.
2.8.3 Exception-Handling State The exception-handling state is a transient state that occurs when the CPU alters the normal processing flow due to a reset, interrupt, or trap instruction. The CPU fetches a start address (vector) from the exception vector table and branches to that address. (1) Types of Exception Handling and Their Priority Exception handling is performed for resets, interrupts, and trap instructions.
Figure 2.17 shows the stack after exception handling ends. Normal Mode Advanced Mode (24 bits) (16 bits) Notes: 1. Ignored when returning. 2. Normal mode is not available for this LSI. Figure 2.17 Stack Structure after Exception Handling (Examples) 2.8.4 Program Execution State In this state the CPU executes program instructions in sequence.
2.8.5 Power-Down State The power-down state includes both modes in which the CPU stops operating and modes in which the CPU does not stop. There are five modes in which the CPU stops operating: sleep mode, standby mode, subsleep mode, and watch mode. There are also three other power-down modes: medium-speed mode, module stop mode, and subactive mode.
Basic Timing 2.9.1 Overview The CPU is driven by a system clock, denoted by the symbol φ. The period from one rising edge of φ to the next is referred to as a “state.” The memory cycle or bus cycle consists of one or two states.
2.9.3 On-Chip Supporting Module Access Timing The on-chip supporting modules are accessed in two states. The data bus is either 8 bits or 16 bits wide, depending on the particular internal I/O register being accessed. Figure 2.19 shows the access timing for the on-chip supporting modules. Bus cycle φ...
Section 3 MCU Operating Modes Overview 3.1.1 Operating Mode Selection This LSI has one operating mode (mode 1). This mode is selected depending on settings of the mode pin (MD0). Table 3.1 lists the MCU operating modes. Table 3.1 MCU Operating Mode Selection MCU Operating Mode CPU Operating Mode Description...
Register Descriptions 3.2.1 Mode Control Register (MDCR) Bit : — — — — — — — MDS0 Initial value : —* — R/W : — — — — — — Note: * Determined by MD0 pin MDCR is an 8-bit read-only register monitors the current operating mode of this LSI. Bit 7 to 1: Reserved.
Bits 5 and 4 Interrupt control modes 1 and 0 (INTM1, INTM0) These bits are for selecting the interrupt control mode of the interrupt controller. For details of the interrupt control modes, see section 6.4.1, Interrupt Control Modes and Interrupt Operation. Bit 5 Bit 4 Interrupt...
Section 4 Power-Down State Overview In addition to the normal program execution state, this LSI has a power-down state in which operation of the CPU and oscillator is halted and power dissipation is reduced. Low-power operation can be achieved by individually controlling the CPU, on-chip supporting modules, and so on.
Page 87
Table 4.1 H8S/2199 Series Internal States in Each Mode Medium- Module Function High-Speed Speed Sleep Stop Watch Sub-active Sub-sleep Standby System clock Functioning Functioning Functioning Functioning Halted Halted Halted Halted Subclock pulse generator Functioning Functioning Functioning Functioning Functioning Functioning Functioning Functioning...
Page 88
4. In the power-down mode, the analog section of the servo circuits are not turned off, therefore Vcc (Servo) current does not go low. When power-down is needed, externally shut down the analog system power. *1 The SCI1 status differs from the internal register. For details, refer to section 22, Serial Communication Interface 1.
Page 89
Table 4.2 Power-Down Mode Transition Conditions Control Bit States at Time of Transition State before State after Transition State after Return Transition SSBY TMA3 LSON DTON by SLEEP Instruction by Interrupt High-speed/ Sleep High-speed/ medium- medium-speed speed Standby High-speed/ medium-speed ...
4.1.1 Register Configuration The power-down state is controlled by the SBYCR, LPWRCR, TMA (Timer A), and MSTPCR registers. Table 4.3 summarizes these registers. Table 4.3 Power-Down State Registers Name Abbreviation Initial Value Address* Standby control register SBYCR H'00 H'FFEA Low-power control register LPWRCR H'00 H'FFEB...
Page 91
Register Descriptions 4.2.1 Standby Control Register (SBYCR) Bit : SSBY STS2 STS1 STS0 — — SCK1 SCK0 Initial value : R/W : — — SBYCR is an 8-bit readable/writable register that performs power-down mode control. SBYCR is initialized to H'00 by a reset. Bit 7...
Page 92
Bits 6 to 4 Standby Timer Select 2 to 0 (STS2 to STS0): These bits select the time the MCU waits for the clock to stabilize when standby mode, watch mode, or subactive mode is cleared and a transition is made to high-speed mode or medium-speed mode by means of a specific interrupt or instruction.
4.2.2 Low-Power Control Register (LPWRCR) Bit : DTON LSON NESEL — — — Initial value : R/W : — — — LPWRCR is an 8-bit readable/writable register that performs power-down mode control. LPWRCR is initialized to H'00 by a reset. Bit 7...
Page 94
Bit 6 Low-Speed on Flag (LSON): Determines the operating mode in combination with other control bits when making a power-down transition by executing a SLEEP instruction. Also controls whether a transition is made to high-speed mode or to subactive mode when watch mode is cleared.
4.2.3 Timer Register A (TMA) Bit : — — TMAOV TMAIE TMA3 TMA2 TMA1 TMA0 Initial value : R/W : R/(W)* Note: * Only 0 can be written, to clear the flag. The timer register A (TMA) controls timer A interrupts and selects input clock. Only bit 3 is explained here.
Medium-Speed Mode When the SCK1 and SCK0 bits in SBYCR are set to 1 in high-speed mode, the operating mode changes to medium-speed mode at the end of the bus cycle. In medium-speed mode, the CPU operates on the operating clock (φ16, φ32 or φ64) specified by the SCK1 and SCK0 bits. The on- chip supporting modules other than the CPU always operate on the high-speed clock (φ).
Sleep Mode 4.4.1 Sleep Mode If a SLEEP instruction is executed when the SSBY bit in SBYCR and the LSON bit in LPWRCR are both cleared to 0, the CPU will enter sleep mode. In sleep mode, CPU operation stops but the contents of the CPU's internal registers are retained.
Module Stop Mode 4.5.1 Module Stop Mode Module stop mode can be set for individual on-chip supporting modules. When the corresponding MSTP bit in MSTPCR is set to 1, module operation stops at the end of the bus cycle and a transition is made to module stop mode. The CPU continues operating independently.
Standby Mode 4.6.1 Standby Mode If a SLEEP instruction is executed when the SSBY bit in SBYCR is set to 1, the LSON bit in LPWRCR is cleared to 0, and the TMA3 bit in TMA (Timer A) is cleared to 0, standby mode will be entered.
Page 101
Table 4.5 Oscillation Settling Time Settings STS2 STS1 STS0 Standby Time 10 MHz 8 MHz Unit 8192 states 16384 states 32768 states 65536 states 131072 states 13.1 16.4 262144 states 26.2 32.8 µs Reserved Notes: * Don't care 1.
Watch Mode 4.7.1 Watch Mode If a SLEEP instruction is executed in high-speed mode, medium-speed mode or subactive mode when the SSBY in SBYCR is set to 1, the DTON bit in LPWRCR is cleared to 0, and the TMA3 bit in TMA (Timer A) is set to 1, the CPU will make a transition to watch mode.
Subsleep Mode 4.8.1 Subsleep Mode If a SLEEP instruction is executed in subactive mode when the SSBY in SBYCR is cleared to 0, the LSON bit in LPWRCR is set to 1, and the TMA3 bit in TMA (Timer A) is set to 1, the CPU will make a transition to subsleep mode.
Subactive Mode 4.9.1 Subactive Mode If a SLEEP instruction is executed in high-speed mode when the SSBY bit in SBYCR, the DTON bit in LPWRCR, and the TMA3 bit in TMA (timer A) are all set to 1, the CPU will make a transition to subactive mode.
4.10 Direct Transition 4.10.1 Overview of Direct Transition There are three operating modes in which the CPU executes programs: high-speed mode, medium-speed mode, and subactive mode. A transition between high-speed mode and subactive mode without halting the program* is called a direct transition. A direct transition can be carried out by setting the DTON bit in LPWRCR to 1 and executing a SLEEP instruction.
Section 5 Exception Handling Overview 5.1.1 Exception Handling Types and Priority As table 5.1 indicates, exception handling may be caused by a reset, trap instruction, or interrupt. Exception handling is prioritized as shown in table 5.1. If two or more exceptions occur simultaneously, they are accepted and processed in order of priority.
5.1.2 Exception Handling Operation Exceptions originate from various sources. Trap instructions and interrupts are handled as follows: 1. The program counter (PC) and condition-code register (CCR) are pushed onto the stack. 2. The interrupt mask bits are updated. The T bit is cleared to 0. 3.
Page 108
Table 5.2 Exception Vector Table Exception Source Vector Number Vector Address Reset H'0000 to H'0003 Reserved for system use H'0004 to H'0007 H'0008 to H'000B H'000C to H'000F H'0010 to H'0013 H'0014 to H'0017 Direct transition H'0018 to H001B External interrupt H'001C to H'001F Trap instruction (4 sources) H'0020 to H'0023...
Reset 5.2.1 Overview A reset has the highest exception priority. When the 5(6 pin goes low, all processing halts and the LSI enters the reset state. A reset initializes the internal state of the CPU and the registers of on-chip supporting modules. Immediately after a reset, interrupt control mode 0 is set. Reset exception handling begins when the 5(6 pin changes from low to high.
Vector Internal Fetch of first program fetch processing instruction φ Internal address bus Internal read signal Internal write signal High level Internal data bus : Reset exception vector address ((1) = H'0000 or H'000000) : Start address (contents of reset exception vector address) : Start address ((3) = (2)) : First program instruction Figure 5.2 Reset Sequence (Mode 1)
Interrupts Interrupt exception handling can be requested by six external sources (,548 to ,543) and internal sources in the on-chip supporting modules. Figure 5.3 shows the interrupt sources and the number of interrupts of each type. The on-chip supporting modules that can request interrupts include the watchdog timer (WDT), prescaler unit (PSU), Timers A, B, J, L, R and X1 (TMR), serial communication interface (SCI), A/D converter (ADC), I C bus interface (IIC), servo circuits, sync detection, data slicer, OSD,...
Trap Instruction Trap instruction exception handling starts when a TRAPA instruction is executed. Trap instruction exception handling can be executed at all times in the program execution state. The TRAPA instruction fetches a start address from a vector table entry corresponding to a vector number from 0 to 3, as specified in the instruction code.
Stack Status after Exception Handling Figures 5.4 and 5.5 show the stack after completion of trap instruction exception handling and interrupt exception handling. SP→ CCR* (16 bits) Interrupt control modes 0 and 1 Note: * Ignored on return. Figure 5.4 Stack Status after Exception Handling (Normal Mode)* Note: * Normal mode is not available for this LSI.
Notes on Use of the Stack When accessing word data or longword data, this chip assumes that the lowest address bit is 0. The stack should always be accessed by word transfer instruction or longword transfer instruction, and the value of the stack pointer (SP: ER7) should always be kept even. Use the following instructions to save registers: PUSH.W (or MOV.W Rn, @-SP)
Section 6 Interrupt Controller Overview 6.1.1 Features This LSI controls interrupts by means of an interrupt controller. The interrupt controller has the following features: • Two Interrupt Control Modes Either of two interrupt control modes can be set by means of the INTM1 and INTM0 bits in the system control register (SYSCR).
6.1.3 Pin Configuration Table 6.1 summarizes the pins of the interrupt controller. Table 6.1 Interrupt Controller Pins Name Symbol Function ,543 External interrupt Input Maskable external interrupts; rising, falling, or both request 0 edges can be selected ,544 to External interrupt Input Maskable external interrupts: rising, or falling ,548...
Page 118
Register Descriptions 6.2.1 System Control Register (SYSCR) Bit : — — — INTM1 INTM0 XRST — — Initial value : — — — — — R/W : SYSCR is an 8-bit readable register that selects the interrupt control mode. Only bits 5, 4, 2 and 1 are described here; for details on the other bits, see section 3.2.2, System Control Register (SYSCR).
6.2.2 Interrupt Control Registers A to D (ICRA to ICRD) Bit : ICR7 ICR6 ICR5 ICR4 ICR3 ICR2 ICR1 ICR0 Initial value : R/W : The ICR registers are four 8-bit readable/writable registers that set the interrupt control level for interrupts other than NMI.
6.2.3 IRQ Enable Register (IENR) Bit : IRQ5E IRQ4E IRQ3E IRQ2E IRQ1E IRQ0E — — Initial value : — — R/W : IENR is an 8-bit readable/writable register that controls enabling and disabling of interrupt requests IRQ5 to IRQ0. IENR is initialized to H'00 by a reset. Bits 7 and 6...
6.2.4 IRQ Edge Select Registers (IEGR) Bit : — IRQ5EG IRQ4EG IRQ3EG IRQ2EG IRQ1EG IRQ0EG1 IRQ0EG0 Initial value : R/W : — IEGR is an 8-bit readable/writable register that selects detected edge of the input at pins ,548 to ,543. IEGR register is initialized to H'00 by a reset.
6.2.5 IRQ Status Register (IRQR) Bit : IRQ5F IRQ4F IRQ3F IRQ2F IRQ1F IRQ0F — — Initial value : R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/W : — — Note: * Only 0 can be written, to clear the flag. IRQR is an 8-bit readable/writable register that indicates the status of I RQ 5 t o I RQ 0 i nt er r upt requests.
6.2.6 Port Mode Register (PMR1) Bit : PMR17 PMR16 PMR15 PMR14 PMR13 PMR12 PMR11 PMR10 Initial value : R/W : Port Mode Register 1 (PMR1) controls pin function switching-over of port 1. Switching is specified for each bit. PMR1 is an 8-bit readable/writable register and is initialized to H'00 by a reset. Only bits 5 to 0 are explained here.
Interrupt Sources I nt er r upt s our ces com pr i s e ext er nal i nt er r upt s ( I RQ 5 t o I RQ 0) and i nt er nal i nt er r upt s . 6.3.1 External Interrupts Ther e ar e s i x ext er nal i nt er r upt s our ces ;...
Figure 6.3 shows the timing of IRQnF setting. Internal φ IRQn input pin IRQnF Figure 6.3 Timing of IRQnF Setting The vector num ber s f or I RQ 5 t o I RQ 0 i nt er r upt except i on handl i ng ar e 21 t o 26. U pon det ect i on of I RQ 5 t o I RQ 0 i nt er r upt s , t he appl i cabl e pi n i s s et i n t he por t r egi s t er 1 ( PM R1) as ,54Q pi n.
6.3.3 Interrupt Exception Vector Table Table 6.4 shows interrupt exception handling sources, vector addresses, and interrupt priorities. For default priorities, the lower the vector number, the higher the priority. Priorities among modules can be set by means of ICR. The situation when two or more modules are set to the same priority, and priorities within a module, are fixed as shown in table 6.4.
Page 127
Origin of Vector Priority Interrupt Source Interrupt Source Vector Address Remarks High Address trap H'0040 to H'0043 H'0044 to H'0047 H'0048 to H'004B H'004C to H'004F ICRA6 HSW1 Servo circuit H'0050 to H'0053 ICRA5 IRQ0 External pin H'0054 to H'0057 ICRA4 IRQ1 H'0058 to H'005B...
Page 128
Origin of Vector Priority Interrupt Source Interrupt Source Vector Address Remarks High ICXA Timer X1 H'00B0 to H'00B3 ICRC7 ICXB H'00B4 to H'00B7 ICXC H'00B8 to H'00BB ICXD H'00BC to H'00BF OCX1 H'00C0 to H'00C3 OCX2 H'00C4 to H'00C7 OVFX H'00C8 to H'00CB VD interrupts Sync signal...
Interrupt Operation 6.4.1 Interrupt Control Modes and Interrupt Operation Interrupt operations in this LSI differ depending on the interrupt control mode. NMI* interrupts and address trap interrupts are accepted at all times except in the reset state. In the case of IRQ interrupts and on-chip supporting module interrupts, an enable bit is provided for each interrupt.
Page 130
Figure 6.4 shows a block diagram of the priority decision circuit. I C R Interrupt acceptance Default priority control and 3-level Vector number Interrupt source determination mask control Interrupt control modes 0 and 1 Figure 6.4 Block Diagram of Interrupt Priority Determination Operation •...
Table 6.7 Operations and Control Signal Functions in Each Interrupt Control Mode Interrupt Acceptance Control, Interrupt Setting 3-Level Control Control Default Priority Mode INTM1 INTM0 Determination ¡ ¡ ¡ ¡ Legend: ¡ : Interrupt operation control performed Used as interrupt mask bit Sets priority : Not used...
Program execution state Interrupt generated? Address trap interrupt? Hold pending Control level 1 interrupt? H S W 1 H S W 1 H S W 2 H S W 2 I = 0 Save PC and CCR I ← 1 Read vector address Branch to interrupt handling routine Figure 6.5 Flowchart of Procedure Up to Interrupt Acceptance in...
Page 133
6.4.3 Interrupt Control Mode 1 Three-level masking is implemented for IRQ interrupts and on-chip supporting module interrupts by means of the I and UI bits in the CPU’s CCR and ICR. • Control level 0 interrupt requests are enabled when the I bit is cleared to 0, and disabled when set to 1.
Page 134
(1) If an interrupt source occurs when the corresponding interrupt enable bit is set to 1, an interrupt request is sent to the interrupt controller. (2) When interrupt requests are sent to the interrupt controller, a control level 1 interrupt, according to the control level set in ICR, has priority for selection, and other interrupt requests are held pending.
Page 135
Program execution state Interrupt generated? Address trap interrupt? Hold pending Control level 1 interrupt? H S W 1 H S W 1 H S W 2 H S W 2 I = 0 I = 0 UI = 0 Save PC and CCR I ←...
6.4.4 Interrupt Exception Handling Sequence Figure 6.8 shows the interrupt exception handling sequence. The example shown is for the case where interrupt control 0 is set in advanced mode, and the program area and stack area are in on- chip memory. Figure 6.8 Interrupt Exception Handling Rev.
6.4.5 Interrupt Response Times Table 6.8 shows interrupt response times-the interval between generation of an interrupt request and execution of the first instruction in the interrupt handling routine. The symbols used in table 6.8 are explained in table 6.9. Table 6.8 Interrupt Response Times Number of States Advanced Mode...
Usage Notes 6.5.1 Contention between Interrupt Generation and Disabling When an interrupt enable bit is cleared to 0 to disable interrupts, the disabling becomes effective after execution of the instruction. In other words, when an interrupt enable bit is cleared to 0 by an instruction such as BCLR or MOV, if an interrupt is generated during execution of the instruction, the interrupt concerned will still be enabled on completion of the instruction, and so interrupt exception handling for that interrupt will be executed on completion of the instruction.
6.5.2 Instructions that Disable Interrupts Instructions that disable interrupts are LDC, ANDC, ORC, and XORC. After any of these instructions is executed, all interrupts including NMI are disabled and the next instruction is always executed. When the I bit or UI bit is set by one of these instructions, the new value becomes valid two states after execution of the instruction ends.
Section 7 ROM Overview The H8S/2199 has 128 kbytes of on-chip ROM (flash memory or mask ROM), the H8S/2198 has 112 kbytes, the H8S/2197 has 96 kbytes, and the H8S/2196 has 80 kbytes*. The ROM is connected to the CPU by a 16-bit data bus. The CPU accesses both byte and word data in one state, enabling faster instruction fetches and higher processing speed.
Overview of Flash Memory 7.2.1 Features The features of the flash memory are summarized below. • Four flash memory operating modes Program mode Erase mode Program-verify mode Erase-verify mode • Programming/erase methods The flash memory is programmed 128 bytes at a time. Erasing is performed by block erase (in single-block units).
7.2.3 Flash Memory Operating Modes Mode Transitions When each mode pin and the FWE pin are set in the reset state and a reset-start is executed, the MCU enters one of the operating modes shown in figure 7.3. In user mode, flash memory can be read but not programmed or erased.
Page 144
On-Board Programming Modes • Boot mode 2. Writing control program transfer 1. Initial state The flash memory is in the erased state when the When boot mode is entered, the boot program in device is shipped. The description here applies to this LSI chip (originally incorporated in the chip) is the case where the old program version or data is started, and SCI communication check is carried...
Page 145
• User program mode 1. Initial state 2. Programming/erase control program transfer When the FWE pin is driven high, user software (1) The FWE assessment program that confirms that confirms this fact, executes the transfer program in the the FWE pin has been driven high, and (2) the flash memory, and transfers the programming/erase program that will transfer the programming/erase control program to RAM.
Page 146
Differences between Boot Mode and User Program Mode Boot Mode User Program Mode Entire memory erase Block erase Programming control program* Program/program-verify Erase/erase-verify Program/program-verify Note: * To be provided by the user, in accordance with the recommended algorithm. Block Configuration The main ROM area is divided into three 64-kbyte blocks, one 32-kbyte block, and eight 4-kbyte blocks.
7.2.4 Pin Configuration The flash memory is controlled by means of the pins shown in table 7.1. Table 7.1 Flash Memory Pins Pin Name Abbreviation Function Reset Input Reset Flash write enable Input Flash program/erase protection by hardware Mode 0 Input Sets this LSI operating mode Port 12...
Flash Memory Register Descriptions 7.3.1 Flash Memory Control Register 1 (FLMCR1) SWE1 ESU1 PSU1 Initial value —* Note: * Determined by the state of the FWE pin. FLMCR1 is an 8-bit register used for flash memory operating mode control. With addresses H'00000 to H'3FFFF, program-verify mode or erase-verify mode is entered by setting SWE to 1 when FWE = 1, then setting the PV1 bit and EV1 bit.
Page 149
Bit 6 Software Write Enable (SWE): Enables or disables flash memory programming. SWE should be set before setting bits 5 to 0, bits 7 to 0 in EBR1, and bits 3 to 0 in EBR2. Bit 6 SWE1 Description Writes are disabled...
Page 150
Bit 3 Erase-Verify (EV1): Selects erase-verify mode transition or clearing. Do not set the SWE1, ESU1, PSU1, PV1, E1, or P1 bit at the same time. Bit 3 Description Erase-verify mode cleared (Initial value) Transition to erase-verify mode [Setting condition] Setting is available when FWE = 1 and SWE = 1 are selected Bit 2...
7.3.2 Flash Memory Control Register 2 (FLMCR2) FLER SWE2 ESU2 PSU2 Initial value FLMCR2 is an 8-bit register used for flash memory operating control mode. With addresses H'40000 to H'47FFF, program-verify mode and erase-verify mode is entered by setting SWE2 when FWE (FLMCR1) = 1, then setting the EV2 bit and the PV2 bit. Program mode is entered by setting SWE2 when FWE (FLMCR1) = 1, then setting the SWE2 bit and PSU2 bit, and finally setting the P2 bit.
Page 152
Bit 6 Software Write Enable 2 (SWE2): Enables or disables flash memory programming (target address range: H'40000 to H'47FFF). SW2 should be set when setting bits 5 to 0 and bits 7 to 4 in EBR2. Bit 6 SWE2 Description Writes are disabled...
Page 153
Bit 2 Program-Verify 2 (PV2): Selects program-verify mode transition or clearing (target address range: H'40000 to H'47FFF). Do not set the ESU2, PSU2, EV2, E2, and P2 bits at the same time. Bit 2 Description Program-verify mode cleared Transition to program-verify mode [Setting condition] Setting is available when FWE=1 and SWE2=1 are selected...
7.3.3 Erase Block Register 1 (EBR1) EBR2 Initial value EBR1 is an 8-bit register that specify the flash memory erase area block by block. EBR1 is initialized to H'00 by a reset, in standby mode, when a low level is input to the FWE pin, and when a high level is input to the FWE pin and the SWE1 bit in FLMCR1 is not set.
Table 7.3 Flash Memory Erase Blocks Block (Size) Address EB0 (4 kbytes) H'000000 to H'000FFF EB1 (4 kbytes) H'001000 to H'001FFF EB2 (4 kbytes) H'002000 to H'002FFF EB3 (4 kbytes) H'003000 to H'003FFF EB4 (4 kbytes) H'004000 to H'004FFF EB5 (4 kbytes) H'005000 to H'005FFF EB6 (4 kbytes) H'006000 to H'006FFF...
Page 156
Bit 3 Flash Memory Control Register Enable (FLSHE): Setting the FLSHE bit to 1 enables read/write access to the flash memory control registers. If FLSHE is cleared to 0, the flash memory control registers are deselected. In this case, the flash memory control register contents are retained.
On-Board Programming Modes When pins are set to on-board programming mode, program/erase/verify operations can be performed on the on-chip flash memory. There are two on-board programming modes: boot mode and user program mode. The pin settings for transition to each of these modes are shown in table 7.4.
7.4.1 Boot Mode When boot mode is used, the flash memory programming control program must be prepared in the host beforehand. The channel 1 SCI to be used is set to asynchronous mode. When a reset-start is executed after the LSI’s pins have been set to boot mode, the boot program built into the MCU is started and the programming control program prepared in the host is serially transmitted to the LSI via the SCI.
Page 159
Start Set pins to boot mode and execute reset-start Host transfers data (H'00) continuously at prescribed bit rate This LSI measures low period of H'00 data transmitted by host This LSI calculates bit rate and sets value in bit rate register After bit rate adjustment, transmits one H'00 data byte to host to indicate end of adjustment...
Page 160
Automatic SCI Bit Rate Adjustment Start Stop Low period (9 bits) measured (H'00 data) High period (1 or more bits) Figure 7.9 Automatic SCI Bit Rate Adjustment When boot mode is initiated, the LSI measures the low period of the asynchronous SCI communication data (H'00) transmitted continuously from the host.
Page 161
On-Chip RAM Area Divisions in Boot Mode: In boot mode, the TBD-byte area from TBD to TBD is reserved for use by the boot program, as shown in figure 7.10. The area to which the programming control program is transferred is TBD to TBD (TBD bytes). The boot program area can be used when the programming control program transferred into RAM enters the execution state.
Page 162
Notes on Use of Boot Mode: 1. When the chip comes out of reset in boot mode, it measures the low period of the input at the SCI's SI1 pin. The reset should end with SI1 pin high. After the reset ends, it takes about 100 states for the chip to get ready to measure the low period of the SI1 pin input.
7.4.2 User Program Mode When set to user program mode, the chip can program and erase its flash memory by executing a user program/erase control program. Therefore, on-board reprogramming of the on-chip flash memory can be carried out by providing on-board means of FWE control and supply of programming data, and storing a program/erase control program in part of the program area as necessary.
Programming/Erasing Flash Memory In the on-board programming modes, flash memory programming and erasing is performed by software, using the CPU. There are four flash memory operating modes: program mode, erase mode, program-verify mode, and erase-verify mode. With addresses H'00000 to H'3FFFF, transitions to these modes can be made by setting the PSU1, ESU1, P1, E1, PV1 and EV1 bits in FLMCR1.
which the Pn bit is set is the flash memory programming time. Make a program setting for one programming operation using the table in the programming flowchart. 7.5.2 Program-Verify Mode In program-verify mode, the data written in program mode is read to check whether it has been correctly written in the flash memory.
Page 166
Start Set SWE1 (2) bit in FLMCR(2) Wait 1 µs Store 128-byte program data in program data area and reprogram data area Programming pulse apply subroutine Enable WDT n= 1 m= 0 Set PSU1 (2) bit in FLMCR1 (2) Wait 50 µs Write 128-byte program data in RAM reprogram data area consecutevely to flash memory Set P1 (2) bit in FLMCR1 (2)
7.5.3 Erase Mode (n = 1 when the target address range is H'00000 to H'3FFFF and n = 2 when the target address range is H'40000 to H'47FFF) Flash memory erasing should be performed block by block following the procedure shown in the erase/erase-verify flowchart (single-block erase) shown in figure 7.13.
Page 168
START Set SWE bit in FLMCR1 Wait 1 µs n = 1 Set EBR1 (2) Enable WDT Set ESU1 (2) bit in FLMCR1 (2) Wait 100 µs Start of erase Set E1 (2) bit in FLMCR1 (2) Wait 10 ms Halt erase Clear E1 (2) bit in FLMCR1 (2) Wait 10 µs...
7.5.4 Erase-Verify Mode (n = 1 when the target address range is H'00000 to H'3FFFF and n = 2 when the target address range is H'40000 to H'47FFF) In erase-verify mode, data is read after memory has been erased to check whether it has been correctly erased.
Flash Memory Protection There are three kinds of flash memory program/erase protection: hardware protection, software protection, and error protection. 7.6.1 Hardware Protection Hardware protection refers to a state in which programming/erasing of flash memory is forcibly disabled or aborted. Hardware protection is reset by settings in flash memory control registers 1 and 2 (FLMCR1, FLMCR2) and erase block registers 1 and 2 (EBR1, EBR2).
7.6.2 Software Protection Software protection can be implemented by setting the SWE1 bit in FLMCR1 and SWE2 bit in FLMCR2 and erase block registers 1 and 2 (EBR1, EBR2). When software protection is in effect, setting the P1 or E1 bit in flash memory control register 1 (FLMCR1) or P2 or E2 bit in flash memory control register 2 (FLMCR2) does not cause a transition to program mode or erase mode.
7.6.3 Error Protection In error protection, an error is detected when MCU runaway occurs during flash memory programming/erasing, or operation is not performed in accordance with the program/erase algorithm, and the program/erase operation is aborted. Aborting the program/erase operation prevents damage to the flash memory due to overprogramming or overerasing. If the MCU malfunctions during flash memory programming/erasing, the FLER bit is set to 1 in FLMCR2 and the error protection state is entered.
Interrupt Handling when Programming/Erasing Flash Memory All interrupts, including NMI input is disabled when flash memory is being programmed or erased (when the P1 or E1 bit is set in FLMCR1, or the P2 or E2 bit is set in FLMR2), and while the boot program is executing in boot mode , to give priority to the program or erase operation.
7.8.3 Writer Mode Operation Table 7.9 shows how the different operating modes are set when using writer mode, and table 7.10 lists the commands used in writer mode. Details of each mode are given below. • Memory Read Mode: Memory read mode supports byte reads. •...
7.8.4 Memory Read Mode • After the end of an auto-program, auto-erase, or status read operation, the command wait state is entered. To read memory contents, a transition must be made to memory read mode by means of a command write before the read is executed. •...
Page 177
Table 7.12 AC Characteristics when Entering Another Mode from Memory Read Mode − − − − Preliminary − − − − = 5.0 V ±10%, V = 0 V, Ta = 25°C ±5°C Conditions: V Item Symbol Unit Notes µs Command write cycle nxtc...
Page 178
− − − − Preliminary − − − − Table 7.13 AC Characteristics in Memory Read Mode (2) = 5.0 V ±10%, V = 0 V, Ta = 25°C ±5°C Conditions: V Item Symbol Unit Notes µs Access time ...
7.8.5 Auto-Program Mode AC Characteristics − − − − Preliminary − − − − Table 7.14 AC Characteristics in Auto-Program = 5.0 V ±10%, V = 0 V, Ta = 25°C ±5°C Conditions: V Item Symbol Unit Notes µs Command write cycle nxtc ...
Page 180
A18 to A0 ADDRESS STABLE nxtc nxtc Data transfer wsts 1 byte to 128 bytes (1 to 3,000 ms) write Programming operation end identification signal Programming normal end identification signal Programming wait H'40 DATA DATA IO5 to IO0 H'00 Figure 7.20 Auto-Program Mode Timing Waveforms Notes on Use of Auto-Program Mode •...
7.8.6 Auto-Erase Mode AC Characteristics − − − − Preliminary − − − − Table 7.15 AC Characteristics in Auto-Erase Mode = 5.0 V ±10%, V = 0 V, Ta = 25°C ±5°C Conditions: V Item Symbol Unit Notes µs Command write cycle nxtc...
Notes on Use of Erase-Program Mode • Auto-erase mode supports only entire memory erasing. • Do not perform a command write during auto-erasing. • Confirm normal end of auto-erasing by checking IO6. Alternatively, status read mode can also be used for this purpose (IO7 status polling uses the auto-erase operation end identification pin).
Page 183
A18 to A0 nxtc nxtc nxtc H'71 H'71 IO7 to IO0 DATA Note: IO2 and IO3 are undefined. Figure 7.22 Status Read Mode Timing Waveforms Table 7.17 Status Read Mode Return Commands Pin Name IO3 IO2 IO1 Attribute Normal end Command Programming...
7.8.8 Status Polling The IO7 status polling flag indicates the operating status in auto-program or auto-erase mode. The IO6 status polling flag indicates a normal or abnormal end in auto-program or auto-erase mode. Table 7.18 Status Polling Output Truth Table Internal Operation ...
Notes: 1. The flash memory is initially in the erased state when the device is shipped by Hitachi. For other chips for which the erasure history is unknown, it is recommended that auto- erasing be executed to check and supplement the initialization (erase) level.
Notes when Converting the F–ZTAT Application Software to the Mask-ROM Versions Please note the following when converting the F-ZTAT application software to the mask-ROM versions. The values read from the internal registers for the flash ROM of the mask-ROM version and F–ZTAT version differ as follows.
The H8S/2199, H8S/2198, H8S/2197, and H8S/2196 have 3 kbytes of on-chip high-speed static RAM, and the H8S/2199 F-ZTAT has 8 kbytes. The on-chip RAM is connected to the CPU by a 16-bit data bus, enabling both byte data and word data to be accessed in one state. This makes it possible to perform fast word data transfer.
Section 9 Clock Pulse Generator Overview This LSI has a built-in clock pulse generator (CPG) that generates the system clock (φ), the bus master clock, and internal clocks. The clock pulse generator consists of a system clock oscillator, a duty adjustment circuit, clock selection circuit, medium-speed clock divider, subclock oscillator, and subclock division circuit.
Register Descriptions 9.2.1 Standby Control Register (SBYCR) SSBY STS2 STS1 STS0 — — SCK1 SCK0 Initial value — — SBYCR is an 8-bit readable/writable register that performs power-down mode control. Only bits 0 and 1 are described here. For a description of the other bits, see section 4.2.1, Standby Control Register (SBYCR).
9.2.2 Low-Power Control Register (LPWRCR) DTON LSON NESEL — — — Initial value — — — LPWRCR is an 8-bit readable/writable register that performs power-down mode control. Only bit 1 and 0 is described here. For a description of the other bits, see section 4.2.2, Low- Power Control Register (LPWRCR).
Oscillator Clock pulses can be supplied by connecting a crystal resonator, or by input of an external clock. 9.3.1 Connecting a Crystal Resonator Circuit Configuration: A crystal resonator can be connected as shown in the example in figure 9.2. An AT-cut parallel-resonance crystal should be used. OSC1 = 10 to 22pF L1 =...
Page 192
Note on Board Design: When a crystal resonator is connected, the following points should be noted. Other signal lines should be routed away from the oscillator circuit to prevent induction from interfering with correct oscillation. See figure 9.4. When designing the board, place the crystal resonator and its load capacitors as close as possible to the OSC1 and OSC2 pins.
9.3.2 External Clock Input Circuit Configuration: An external clock signal can be input as shown in the examples in figure 9.5. If the OSC2 pin is left open, make sure that stray capacitance is no more than 10 pF. In example (b), make sure that the external clock is held high in standby mode, subactive mode, subsleep mode, and watch mode.
Page 194
External Clock: The external clock signal should have the same frequency as the system clock (φ). Table 9.3 and figure 9.6 show the input conditions for the external clock. Table 9.3 External Clock Input Conditions = 4.0 to 5.5 V Item Symbol Unit...
Page 195
Table 9.4 External Clock Output Settling Delay Time Conditions: V = 4.0 V to 5.5 V, AV = 4.0 V to 5.5 V, V = AV = 0 V Item Symbol Unit Notes µs External clock output settling Figure 9.7 DEXT delay time of 5(6 pulse width (t...
Duty Adjustment Circuit When the oscillator frequency is 5 MHz or higher, the duty adjustment circuit adjusts the duty cycle of the clock signal from the oscillator to generate the system clock (φ). Medium-Speed Clock Divider The medium-speed divider divides the system clock to generate φ/16, φ/32, and φ/64 clocks. Bus Master Clock Selection Circuit The bus master clock selection circuit selects the system clock (φ) or one of the medium-speed clocks (φ/16, φ/32 or φ/64) to be supplied to the bus master (CPU), according to the settings of bits...
Subclock Oscillator Circuit 9.7.1 Connecting 32.768 kHz Crystal Resonator When using a subclock, connect a 32.768 kHz crystal resonator to X1 and X2 pins as shown in figure 9.8. For precautions on connecting, see Note on Board Design, in section 9.3.1 Connecting a Crystal Resonator.
9.7.2 When Subclock is not Needed Connect X1 pin to V , and X2 pin should remain open as shown in figure 9.10. Open Figure 9.10 Terminal When Subclock is not Needed Subclock Waveform Shaping Circuit To eliminate noise in the subclock input from the X1 pin, this circuit samples the clock using a clock obtained by dividing the φ...
Section 10 I/O Port 10.1 Overview 10.1.1 Port Functions This LSI has seven 8-bit I/O ports (including one CMOS high-current port), and one 8-bit input port. Table 10.1 shows the functions of each port. Each I/O part a port control register (PCR) that controls an input and output and a port data register (PDR) for storing output data.
Page 200
Table 10.1 Port Functions Function Switching Port Description Pins Alternative Functions Register Port 0 P07 to P00 input- P07/AN7 to Analog data input channels 7 to 0 PMR0 only ports P00/AN0 Port 1 P17 to P10 I/O ports P17/TMOW Prescalar unit frequency division clock PMR1 (Built-in MOS pull-up output...
Page 201
Function Switching Port Description Pins Alternative Functions Register Port 8 P87 to P80 I/O ports P87/DPG PMR8 DPG signal input PMRC P86/EXTTRG External trigger signal input P85/COMP/B Pre-amplifier output result signal input Color signal output (B) P84/H.AMP Pre-amplifier output select signal SW/G input Color signal output (G)
10.1.3 MOS Pull-Up Transistors The MOS pull-up transistors in ports 1 to 3 can be switched on or off by the MOS pull-up select registers 1 to 3 (PUR1 to PUR3) in units of bits. Settings in PUR1 to PUR3 are valid when the pin function is set to an input by PCR1 to PCR3.
10.2 Port 0 10.2.1 Overview Port 0 is an 8-bit input-only port. Table 10.2 shows the port 0 configuration. Port 0 consists of pins that are used both as standard input ports (P07 to P00) and analog input channels (AN7 to AN0). It is switched by port mode register 0 (PMR0). Table 10.2 Port 0 Configuration Port Function...
10.2.2 Register Configuration Table 10.3 shows the port 0 register configuration. Table 10.3 Port 0 Register Configuration Name Abbrev. Size Initial Value Address* Port mode register 0 PMR0 Byte H'00 H'FFCD Port data register 0 PDR0 Byte H'FFC0 Note: * Lower 16 bits of the address. (1) Port Mode Register 0 (PMR0) Bit : PMR07...
(2) Port Data Register 0 (PDR0) PDR07 PDR06 PDR05 PDR04 PDR03 PDR02 PDR01 PDR00 Initial value : — — — — — — — — R/W : Port data register 0 (PDR0) reads the port states. When the corresponding bit of PMR0 is 0 (general input port), the pin state is read if PDR0 is read.
10.3 Port 1 10.3.1 Overview Port 1 is an 8-bit I/O port. Table 10.5 shows the port 1 configuration. Port 1 consists of pins that are used both as standard I/O ports (P17 to P10) and frequency division clock output (TMOW), input capture input (,&), or external interrupt request inputs (,548 to ,543).
Page 207
Port Mode Register 1 (PMR1) Bit : PMR17 PMR16 PMR15 PMR14 PMR13 PMR12 PMR11 PMR10 Initial value : R/W : Port mode register 1 (PMR1) controls switching of each pin function of port 1. The switching is specified in a unit of bit. PMR1 is an 8-bit read/write enable register.
Page 208
Bit 7 P17/TMOW Pin Switching (PMR17): PMR17 sets whether the P17/TMOW pin is used as a P17 I/O pin or a TMOW pin for the frequency division clock output. Bit 7 PMR17 Description The P17/TMOW pin functions as a P17 I/O pin (Initial value) The P17/TMOW pin functions as a TMOW output pin Bit 6...
Page 209
Bits 7 to 0 P17 to P10 Pin Switching (PCR17 toPCR10) Bit n PCR1n Description The P1n pin functions as an input pin (Initial value) The P1n pin functions as an output pin (n = 7 to 0) Port Data Register 1 (PDR1) Bit : PDR17...
10.3.3 Pin Functions This section describes the port 1 pin functions and their selection methods. P17/TMOW: P17/TMOW is switched as shown below according to the PMR17 bit in PMR1 and the PCR17 bit in PCR1. PMR17 PCR17 Pin Function P17 input pin P17 output pin TMOW output pin Note: * Don’t care...
Page 211
10.3.4 Pin States Table 10.7 shows the port 1 pin states in each operation mode. Table 10.7 Port 1 Pin States Pins Reset Active Sleep Standby Watch Subactive Subsleep P17/TMOW High- Operation Holding High- High- Operation Holding P16/,& impedance impedance impedance P15/,548 P10/,543...
10.4 Port 2 10.4.1 Overview Port 2 is an 8-bit I/O port. Table 10.8 shows the port 2 configuration. Port 2 consists of pins that are used both as standard I/O ports (P27 to P20) and SCI clock I/O (SCK1), receive data input (SI1), send data output (SO1), I C bus interface clock I/O (SCL0, SCL1), or data I/O (SDA0, SDA1).
Page 213
Port Control Register 2 (PCR2) Bit : PCR27 PCR26 PCR25 PCR24 PCR23 PCR22 PCR21 PCR20 Initial value : R/W : Port control register 2 (PCR2) controls the I/Os of pins P27 to P20 of port 2 in a unit of bit. When PCR2 is set to 1, the corresponding P27 to P20 pins become output pins, and when it is set to 0, they become input pins.
Page 214
MOS Pull-Up Select Register 2 (PUR2) Bit : PUR27 PUR26 PUR25 PUR24 PUR23 PUR22 PUR21 PUR20 Initial value : R/W : MOS pull-up selector register 2 (PUR2) controls the ON and OFF of the MOS pull-up transistor of port 2. Only the pin whose corresponding bit of PCR2 was set to 0 (input) becomes valid. If the corresponding bit of PCR2 is set to 1 (output), the corresponding bit of PUR2 becomes invalid and the MOS pull-up transistor is turned off.
10.4.3 Pin Functions This section describes the port 2 pin functions and their selection methods. P27/SYNCI: P27/SYNCI is switched as shown below according to the PCR27 bit in PCR2. Pin Function P27 input pin P27 output pin Note: Because the SYNCI always functions, the alternative pin need always be set to the high or low level regardless of active mode or low power consumption mode.
Page 216
P23/SDA1: P23/SDA1 is switched as shown below according to the PCR23 bit in PCR2 and the II1CE bit in the I C Bus control register (ICCR1). II1CE PCR23 Pin Function P23 input pin P23 output pin SDA1 I/O pin Note: * Don’t care P22/SCK1: P22/SCK1 is switched as shown below according to the PCR22 bit in PCR2, the C/$ bit in SMR, and the CKE1 and CKE0 bits in SCR.
10.4.4 Pin States Table 10.10 shows the port 2 pin states in each operation mode. Table 10.10 Port 2 Pin States Pins Reset Active Sleep Standby Watch Subactive Subsleep P27/SYNCI High- Operation Holding High- High- Operation Holding P26/SCL0 impedance impedance impedance P25/SDA0 P24/SCL1...
10.5 Port 3 10.5.1 Overview Port 3 is an 8-bit I/O port. Table 10.11 shows the port 3 configuration. Port 3 consists of pins that are used both as standard I/O ports (P37 to P30) and timer J timer output (TMO), buzzer output (BUZZ), 8-bit PWM outputs (PWM3 to PWM0), SCI2 strobe output (STRB), or chip select input (&6).
Page 219
Port Mode Register 3 (PMR3) Bit : PMR37 PMR36 PMR35 PMR34 PMR33 PMR32 PMR31 PMR30 Initial value : R/W : Port mode register 3 (PMR3) controls switching of each pin function of port 3. The switching is specified in a unit of bit. PMR3 is an 8-bit read/write enable register.
Page 220
Bits 5 to 2 P35/PWM3 to P32/PWM0 Pin Switching (PMR35 to PMR32): PMR35 to PMR32 set whether the P3n/PWMm pin is used as a P3n I/O pin or a PWMm pin for the 8-bit PWM output. Bit n PMR3n Description The P3n/PWMm pin functions as a P3n I/O pin...
Page 221
Port Control Register 3 (PCR3) Bit : PCR37 PCR36 PCR35 PCR34 PCR33 PCR32 PCR31 PCR30 Initial value : R/W : Port control register 3 (PCR3) controls the I/Os of pins P37 to P30 of port 3 in a unit of bit. When PCR3 is set to 1, the corresponding P37 to P30 pins become output pins, and when it is set to 0, they become input pins.
MOS Pull-Up Select Register 3 (PUR3) Bit : PUR37 PUR36 PUR35 PUR34 PUR33 PUR32 PUR31 PUR30 Initial value : R/W : MOS pull-up selector register 3 (PUR3) controls the ON and OFF of the MOS pull-up transistor of port 3. Only the pin whose corresponding bit of PCR3 was set to 0 (input) becomes valid. If the corresponding bit of PCR3 is set to 1 (output), the corresponding bit of PUR3 becomes invalid and the MOS pull-up transistor is turned off.
Page 223
P36/BUZZ: P36/BUZZ is switched as shown below according to the PMR36 bit in PMR3 and the PCR36 bit in PCR3. PMR36 PCR36 Pin Function P36 input pin P36 output pin BUZZ output pin Note: * Don’t care P35/PWM3: P35/PWM3 is switched as shown below according to the PMR3n bit in PMR3 and the PCR3n bit in PCR3.
Page 224
P32/PWM0: P32/PWM0 is switched as shown below according to the PMR32 bit in PMR3 and the PCR32 bit in PCR. PMR32 PCR32 Pin Function P32 input pin P32 output pin PWM0 output pin P31/SV2: P31/SV2 is switched as shown below according to the PMR31 bit in PMR3 and the PCR31 bit in PCR3.
10.5.4 Pin States Table 10.13 shows the port 3 pin states in each operation mode. Table 10.13 Port 3 Pin States Pins Reset Active Sleep Standby Watch Subactive Subsleep P37/TMO High- Operation Holding High- High- Operation Holding P36/BUZZ impedance impedance impedance P35/PWM3 P32/PWM0...
Page 226
10.6 Port 4 10.6.1 Overview Port 4 is an 8-bit I/O port. Table 10.14 shows the port 4 configuration. Port 4 consists of pins that are used both as standard I/O ports (P47 to P40) and output compare output (FTOA, FTOB), input capture input (FTIA, FTIB, FTIC, FTID) or 14-bit PWM output (PWM14).
Page 227
Port Mode Register 4 (PMR4) Bit : PMR40 PMR47 — — — — — — Initial value : R/W : — — — — — — Port mode register 4 (PMR4) controls switching of the P47/RPTRG pin and the P40/PWM14 pin function.
Page 228
Port Control Register 4 (PCR4) Bit : PCR47 PCR46 PCR45 PCR44 PCR43 PCR42 PCR41 PCR40 Initial value : R/W : Port control register 4 (PCR4) controls the I/Os of pins P47 to P40 of port 4 in a unit of bit. When PCR4 is set to 1, the corresponding P47 to P40 pins become output pins, and when it is set to 0, they become input pins.
Page 229
10.6.3 Pin Functions This section describes the port 4 pin functions and their selection methods. P47/RPTRG: P47/RPTRG is switched as shown below according to the PMR47 bit in PMR4 and the PMR47 bit in PMR4 and the PCR47 bit in PCR4. PMR47 PCR47 Pin Function...
Page 230
P43/FTIC: P43/FTIC is switched as shown below according to the PCR43 bit in PCR4. PCR43 Pin Function P43 input pin FTIC input pin P43 output pin P42/FTIB: P42/FTIB is switched as shown below according to the PCR42 bit in PCR4. PCR42 Pin Function P42 input pin...
Page 231
10.6.4 Pin States Table 10.16 shows the port 4 pin states in each operation mode. Table 10.16 Port 4 Pin States Pins Reset Active Sleep Standby Watch Subactive Subsleep High- Operation Holding High- High- Operation Holding P46/FTOB impedance impedance impedance P45/FTOA P44/FTID P43/FTIC...
10.7 Port 6 10.7.1 Overview Port 6 is an 8-bit I/O port. Table 10.17 shows the port 6 configuration. Port 6 is a large current I/O port. The synchronous current is 20 mA maximum (VOL=1.5 V) and four pins can be turned on at the same time.
10.7.2 Register Configuration Table 10.18 shows the port 6 register configuration. Table 10.18 Port 6 Register Configuration Name Abbrev. Size Initial Value Address* Port mode register 6 PMR6 Byte H'00 H'FFDD Port mode register A PMRA Byte H'3F H'FFD9 Port control register 6 PCR6 Byte H'00...
Page 234
Port Mode Register A (PMRA) Bit : PMRA7 PMRA6 — — — — — — Initial value : R/W : — — — — — — Port mode register A (PMRA) switches the pin functions in port 6. Switching is specified in a unit of bit.
Page 235
Port Control Register 6 (PCR6) Bit : PCR67 PCR66 PCR65 PCR64 PCR63 PCR62 PCR61 PCR60 Initial value : R/W : Port control register 6 (PCR6) selects the general I/O of port 6 and controls the realtime output in a unit of bit together with PMR6. When PMR6 = 0, the corresponding P67 to P60 pins become general output pins if PCR6 is set to 1, and they become general input pins if it is set to 0.
Page 236
Realtime Output Trigger Select Register (RTPSR1) Bit : RTPSR17 RTPSR16 RTPSR15 RTPSR14 RTPSR13 RTPSR12 RTPSR11 RTPSR10 Initial value : R/W : The realtime output trigger select register (RTPSR1) sets whether the external trigger (RPTRG pin input) or the internal trigger (HSW) is used as an trigger input for the realtime output in a unit of bit.
Page 237
Real Time Output Trigger Edge Select Register (RTPEGR) Bit : — — — — — — RTPEGR1 RTPEGR0 Initial value : R/W : — — — — — — The realtime output trigger edge select register (RTPEGR) specifies the edge sense of the external or internal trigger input for the realtime output.
Page 238
10.7.3 Pin Functions This section describes the port 6 pin functions and their selection methods. P67/RP7/TMBI: P67/RP7/TMBI is switched as shown below according to the PMRA7 bit in PMRA, PMR67 bit in PMR6, and PCR67 bit in PCR6. Value When PDR6n PMRA7 PMR67 PCR67...
P65/RP5 to P60/RPD: P65/RP5 to P60/RPD are switched below according to the PMRAn bit in PMRA, PMR6n bit in PMR6, and PCR6n bit in PCR6. PMR6n PCR6n Pin Function Output Value Value When PDR6n Was Read P6n input pin P6n pin P6n output pin PDR6n...
10.7.4 Operation Port 6 can be used as a realtime output port or general I/O output port by PMR6. Port 6 functions as a realtime output port when PMR6 = 1 and as a general I/O port when PMR6 = 0. The operation per port 6 function is shown below.
• Operation of the Realtime Output Port (PMR6 = 1) When PMR6 is 1, it operates as a realtime output port. When a trigger is input, the PDR6 data is transferred to PDRS6 and the PCR6 is transferred data to PCRS6, respectively. In this case, when PCRS6 is 1, the PDRS6 data of the corresponding bit is output to the RP pin.
10.8 Port 7 10.8.1 Overview Port 7 is an 8-bit I/O port. Table 10.20 shows the port 7 configuration. Port 7 consists of pins that are used both as standard I/O ports (P77 to P70) and HSW timing generation circuit (programmable pattern generator: PPG) outputs (PPG7 to PPG0). It is switched by port mode register 7 (PMR7) and port control register 7 (PCR7).
10.8.2 Register Configuration Table 10.21 shows the port 7 register configuration. Table 10.21 Port 7 Register Configuration Name Abbrev. Size Initial Value Address* Port mode register 7 PMR7 Byte H'00 H'FFDE Port mode register B PMRB Byte H'0F H'FFDA Port control register 7 PCR7 Byte H'00...
Page 244
Port Mode Register 7 (PMR7) Bit : PMR77 PMR76 PMR75 PMR74 PMR73 PMR72 PMR71 PMR70 Initial value : R/W : Port mode register 7 (PMR7) controls switching of each pin function of port 7. The switching is specified in a unit of bit. PMR7 is an 8-bit read/write enable register.
Page 245
Bits 7 to 4 P77/RP7B to P74/RP8 Pin Switching (PMRB7 to PMRB4): P77/RP7B to P74/RP8 set whether the P7n/RPm pin is used as a P7n I/O pin or a RPm pin for the realtime output port. (n= 7 to 4 and m= B, A, 9, or 8) Bit n PMRBn Description...
Page 246
Port Data Register 7 (PDR7) Bit : PDR77 PDR76 PDR75 PDR74 PDR73 PDR72 PDR71 PDR70 Initial value : R/W : Port data register 7 (PDR7) stores the data for the pins P77 to P70 of port 7. If PCR7 is 1 (output) when PMRB=0, the PDR7 values are directly read when port 7 is read. Accordingly, the pin states are not affected.
Page 247
Bits 7 to 4 RPB to RP8 Pin Trigger Switching (RTPSR27 to RTPSR24) Bit7 RTPSR2n Description Selects external trigger (RPTRG pin input) for trigger input (Initial value) Selects internal trigger (HSW) for trigger input (n = 7 to 4) Realtime Output Trigger Edge Selection Register (RTPEGR) Bit : —...
10.8.3 Pin Functions This section describes the port 7 pin functions and their selection methods. P77/PPG7/RPB to P74/PPG4/RP8: P77/PPG7/RPB to P74/PPG4/RP8 are switched as shown below according to the PMRBn bit in PMRB and the PCR7n bit in PCR7. Value Returned when PMRBn PMR7n PCR7n...
10.8.4 Operation Port 7 can be used by the PMRB as a realtime output port or an I/O port. Port 7 functions as a realtime output port when PMRB=1 and functions as an I/O port when PMRB=0. Figure 10.3 show the block diagram of port 7. Internal trigger HSW RTPEGR write...
Port 7 functions as follows: 1. Realtime output port function (PMRB=1) Port function as a realtime output port when PMRB is 1. After a trigger input, the PDR7 data is transferred to PDRS7 and PCR7 data is transferred to PCRS7. In this case, when PCRS7 is 1, the PDRS7 data of the corresponding bit is output from the RP pin.
10.9 Port 8 10.9.1 Overview Port 8 is an 8-bit I/O port. Table 10.23 shows the port 8 configuration. Port 8 consists of pins that are used both as standard-current I/O ports (P87 to P80) and an external CTL signal input (EXCTL), a pre-amplifier output result signal input (COMP), color signal outputs (R, G, and B), a pre-amplifier output selection signal output (H.Amp SW), a control signal output for processing color signal (C.Rotary), a DPG signal input (DPG), a capstan external sync signal input (EXCAP), an OSD character display position output (YB0), an OSD character data...
10.9.2 Register Configuration Table 10.24 shows the port 8 register configuration. Table 10.24 Port 8 Register Configuration Name Abbrev. Size Initial Value Address* Port mode register 8 PMR8 Byte H'00 H'FFDF Port mode register C PMRC Byte H'C5 H'FFE0 Port control register 8 PCR8 Byte H'00...
Page 253
Port Mode Register 8 (PMR8) Bit : PMR87 PMR86 PMR85 PMR84 PMR83 PMR82 PMR81 PMR80 Initial value : R/W : Port mode register 8 (PMR8) controls switching of each pin function of port 8. The switching is specified in a unit of bit. PMR8 is an 8-bit read/write enable register.
Page 254
Bit 4 P84/H.Amp SW Pin Switching (PMR84): PMR84 sets whether the P84/H.Amp SW pin is used as a P84 I/O pin or H.Amp SW pin of the preamplifier output select signal output. Bit 4 PMR84 Description P84/H.Amp SW pin functions as a P84 I/O pin (Initial value) P84/H.Amp SW pin functions as a H.Amp SW output pin Bit 3...
Page 255
Port Mode Register C (PMRC) Bit : — — PMRC5 PMRC4 PMRC3 — PMRC1 — Initial value : R/W : — — — — Port mode register C (PMRC) controls switching of each pin function of port 8. The switching is specified in a unit of a bit.
Page 256
Bit 1 P81/YB0 Pin Switching (PMRC1): PMRC1 sets whether to use the P81/YB0 pin as a P81 I/O pin or a YB0 pin of the OSD character display position output. Bit7 PMR1 Description P81/YB0 pin functions as a P81 I/O pin (Initial value) P81/YB0 pin functions as a YB0 output pin Port Control Register 8 (PCR8)
Page 257
Port Data Register 8 (PDR8) Bit : PDR87 PDR86 PDR85 PDR784 PDR83 PDR82 PDR81 PDR80 Initial value : R/W : Port data register 8 (PDR8) stores the data of pins P87 to P80 port 8. When PCR is 1 (output), the pin states are read is port 8 is read.
10.9.3 Pin Functions This section describes the port 8 pin functions and their selection methods. P87/DPG: P87/DPG is switched as shown below according to the PMR87 bit in PMR8 and PCR87 bit in PCR8. PMR87 PCR87 Pin Function P87 input pin P87 output pin DPG input pin P86/EXTTRG: P86/EXTTRG is switched as shown below according to the PMR86 bit in PMR8...
Page 259
P83/C.Rotary/R: P83/C.Rotary/R is switched as shown below according to the PMR83bit in PMR8, PMRC3 bit in PMRC, and PCR83 bit in PCR8. PMRC3 PMR83 PCR83 Pin Function P83 input pin P83 output pin C.Rotary output pin R output pin P82/EXCTL: P82/EXCTL is switched as shown below according to the PMR82 bit in PMR8 and PCR82 bit in PCR8.
10.9.4 Pin States Table 10.25 shows the port 8 pin states in each operation mode. Table 10.25 Port 8 Pin States Pins Reset Active Sleep Standby Watch Subactive Subsleep P87/DPG High- Operation Holding High- High- Operation Holding P86/ impedance impedance impedance EXTTRG P85/COMP/...
Section 11 Timer A 11.1 Overview Timer A is an 8-bit interval timer. It can be used as a clock timer when connected to a 32.768 kHz crystal oscillator. 11.1.1 Features Features of timer A are as follows: • Choices of eight different types of internal clocks (φ/16384, φ/8192, φ/4096, φ/1024, φ/512, φ/256, φ/64 and φ/16) are available for your selection.
11.2 Register Descriptions 11.2.1 Timer Mode Register A (TMA) Bit : — — TMAOV TMAIE TMA3 TMA2 TMA1 TMA0 Initial value : — — R/W : R/(W)* Note: * Only 0 can be written to clear the flag. The timer mode register A (TMA) works to control the interrupts of timer A and to select the input clock.
Page 264
Bit 3 Selection of the Clock Source and Prescaler (TMA3): This bit works to select the PSS or PSW as the clock source for the Timer A. Bit 3 TMA3 Description Selects the PSS as the clock source for the Timer A (Initial value) Selects the PSW as the clock source for the Timer A Bits 2 to 0...
11.2.2 Timer Counter A (TCA) Bit : TCA7 TCA6 TCA5 TCA4 TCA3 TCA2 TCA1 TCA0 Initial value : R/W : The timer counter A (TCA) is an 8-bit up-counter that counts up on inputs from the internal clock. The inputting clock can be selected by TMA3 to TMA0 bits of the TMA When the TCA overflows, the TMAOV bit of the TMA is set to 1.
11.3 Operation Timer A is an 8-bit interval timer. It can be used as a clock timer when connected to a 32.768 kHz crystal oscillator. 11.3.1 Operation as the Interval Timer When the TMA3 bit of the TMA is cleared to 0, timer A works as an 8-bit interval timer. After reset, the TCA is cleared to H'00 and as the TMA3 bit is cleared to 0, the Timer A continues counting up as the interval counter without interrupts right after resetting.
Section 12 Timer B 12.1 Overview Timer B is an 8-bit up-counter. Timer B is equipped with two different types of functions namely, the interval function and the auto reloading function. 12.1.1 Features • Seven different types of internal clocks (φ/16384, φ/4096, φ/1024, φ/512, φ/128, φ/32 and φ/8) or an of external clock can be selected.
12.1.3 Pin Configuration Table 12.1 shows the pin configuration of timer B. Table 12.1 Pin Configuration Name Abbrev. Function Event inputs to timer B TMBI Input Event input pin for inputs to the TCB 12.1.4 Register Configuration Table 12.2 shows the register configuration of timer B. The TCB and TLB are being allocated to the same address.
Page 269
12.2 Register Descriptions 12.2.1 Timer Mode Register B (TMB) Bit : — — TMB17 TMBIF TMBIE TMB12 TMB11 TMB10 Initial value : R/W : R/(W)* — — Note: * Only 0 can be written to clear the flag. The TMB is an 8-bit read/write register which works to control the interrupts, to select the auto reloading function and to select the input clock.
Page 270
Bit 5 Enabling Interrupt of the Timer B (TMBIE): This bit works to permit/prohibit occurrence of interrupt of timer B when the TCB overflows and when the TMBIF is set to 1. Bit 5 TMBIE Description Prohibits interrupt of timer B (Initial value) Permits interrupt of timer B Bits 4 and 3...
12.2.2 Timer Counter B (TCB) Bit : TCB17 TCB16 TCB15 TCB14 TCB13 TCB12 TCB11 TCB10 Initial value : R/W : The TCB is an 8-bit readable register which works to count up by the internal clock inputs and external event inputs. The input clock can be selected by the TMB12 to TMB10 of the TMB. When the TCB overflows (H'FF →...
12.2.4 Port Mode Register A (PMRA) Bit : — — — PMRA7 PMRA6 — — — Initial value : — — — — — — R/W : The port mode register A (PMRA) works to changeover the pin functions of the port 6 and to designate the edge sense of the event inputs of timer B (TMBI).
12.2.5 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR are 8-bit read/write twin registers which work to control the module stop mode. When the MSTP14 bit is set to 1, the Timer B stops its operation at the ending point of the bus cycle to shift to the module stop mode.
12.3 Operation 12.3.1 Operation as the Interval Timer When the TMB17 bit of the TMB is set to 0, timer B works as an 8-bit interval timer. When reset, since the TCB is cleared to H'00 and as the TMB17 bit is cleared to 0, timer B continues counting up as the interval timer without interrupts right after resetting.
Section 13 Timer J 13.1 Overview Timer J consists of twin counters. It carries different operation modes such as reloading and event counting. 13.1.1 Features Timer J consists of an 8-bit reloading timer and an 8-bit/16-bit selectable reloading timer. It has various functions as listed below.
13.1.3 Pin Configuration Table 13.1 shows the pin configuration of timer J. Table 13.1 Pin Configuration Name Abbrev. Function ,544 Event input pin Input Event inputs to the TMJ-1 ,545 Event input pin Input Event inputs to the TMJ-2 13.1.4 Register Configuration Table 13.2 shows the register configuration of timer J.
Page 278
13.2 Register Descriptions 13.2.1 Timer Mode Register J (TMJ) Bit : PS11 PS10 8/16 PS21 PS20 Initial value : R/W : The timer mode register J (TMJ) works to select the inputting clock for the TMJ-1 and TMJ-2 and to set the operation mode. The TMJ is an 8-bit register and bit 1 is for read only.
Page 279
Bit 5 Starting the Remote Controlled Operation (ST): This bit works to start the remote controlled operations. When this bit is set to 1, clock signal is supplied to the TMJ-1 to start signal transmissions. When this bit is cleared to 0, clock supply stops to discontinue the operation. The ST bit will be valid under the remote controlling mode, namely, when bit 0 (T/R bit) is 1 and bit 4 (8/16 bit) is 0.
Page 280
Bit 0 Switching Over Between Timer Output/Remote Controlling Output (T/R): This bit works to select if using the timer outputs from the TMJ-1 as the output signal through the TMO pin or if using the toggle outputs (remote controlled transmission data) from the TMJ-2 as the output signal through the TMO pin.
13.2.2 Timer J Control Register (TMJC) Bit : PS22 BUZZ1 BUZZ0 MON1 MON0 TMJ2IE TMJ1IE Initial value : R/W : The timer J control register (TMJC) works to select the buzzer output frequency and to control permission/prohibition of interrupts. The TMJC is an 8-bit read/write register. When reset, the TMJC is initialized to H'09.
Page 282
Bits 5 and 4 Selecting the Monitor Signals (MON1 or MON0): These bits work to select the type of signals being output through the BUZZ pin for monitoring purpose. These settings are valid only when the BUZZ1 and BUZZ0 bits are being set to 10. When PB-CTL or REC-CTL is chosen, signal duties will be output as they are.
Page 283
Bit 1 Enabling Interrupt of the TMJ1I (TMJ1IE): This bit works to permit/prohibit occurrence of TMJ1I interrupt of the TMJS in 1-set of the TMJ1I. Bit 1 TMJ1IE Description Prohibits occurrence of TMJ1I interrupt (Initial value) Permits occurrence of TMJ1I interrupt Bit 0...
13.2.3 Timer J Status Register (TMJS) Bit : TMJ2I TMJ1I — — — — — — Initial value : — — — — — — R/(W)* R/(W)* R/W : Note: * Only 0 can be written to clear the flag. The timer J status register (TMJS) works to indicate issuance of the interrupt request of timer J.
13.2.4 Timer Counter J (TCJ) Bit : TDR17 TDR16 TDR15 TDR14 TDR13 TDR12 TDR11 TDR10 Initial value : R/W : The timer counter J (TCJ) is an 8-bit readable down-counter which works to count down by the internal clock inputs or external clock inputs. The inputting clock can be selected by the PS11 and PS10 bits of the TMJ.
13.2.6 Timer Load Register J (TLJ) Bit : TLR17 TLR16 TLR15 TLR14 TLR13 TLR12 TLR11 TLR10 Initial value : R/W : The timer load register J (TLJ) is an 8-bit write only register which works to set the reloading value of the TCJ. When the reloading value is set to the TLJ, the value will be simultaneously loaded to the TCJ and the TCJ starts counting down from the set value.
13.2.8 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR are 8-bit read/write twin registers which work to control the module stop mode. When the MSTP13 bit is set to 1, timer J stops its operation at the ending point of the bus cycle to shift to the module stop mode.
13.3 Operation 13.3.1 8-bit Reload Timer (TMJ-1) The TMJ-1 is an 8-bit reload timer. As the clock source, dividing clock or edge signals through the ,544 pin are being used. By selecting the edge signals through the ,544 pin, it can also be used as an event counter.
information on the 16-bit or 24-bit reload timer, see section 13.3.1, 8-bit Reload Timer (TMJ-1). The TMJ-2 and TMJ-1, in combination, can be operated by remote controlled data transmission. Regarding the remote controlled data transmission, see section 13.3.3, Remote Controlled Data Transmission.
Page 291
When the Timer J is set to the remote controlled operation mode, since the start bit (ST) is being set or cleared in synchronization with the inputting clock to the TMJ-2, a delay upto a cycle of the inputting clock at the maximum occurs, namely, after the ST bit has been set to 1 until the remote controlled data transmission starts.
13.3.4 TMJ-2 Expansion Function The TMJ-2 expansion function is enabled by setting the EXN bit in the timer J control register (TMJC) to 0. This function makes TMJ-2, which usually works as an 8-bit counter, work as a 16- bit counter. When this function is selected, timer counter K (TCK) and timer load register K (TLK) must be accessed as follows: TCK Read: To read TCK, use the word-length MOV instruction.
Section 14 Timer L 14.1 Overview Timer A is an 8-bit up/down counter using the control pulses or the CFG division signals as the clock source. 14.1.1 Features Features of timer L are as follows: • Two types of internal clocks (φ/128 and φ/64), DVCFG2 (CFG division signal 2), PB and REC-CTL (control pulses) are available for your selection.
14.1.2 Block Diagram Figure 14.1 shows a block diagram of timer L. INTERNAL CLOCK φ/128 φ/64 Read DVCFG2 OVF/UDF PB and REC-CTL Reloading Match clear Comparator Interrupting circuit Write [Legend] DVCFG2 : Division signal 2 of the CFG Interrupt request PB and REC-CTL : Control pluses necessary when making reproduction and storage LMR : Timer L mode register...
14.1.3 Register Configuration Table 14.1 shows the register configuration of timer L. The linear time counter (LTC) and the reload compare patch register (RCR) are being allocated to the same address. Reading or writing determines the accessing register. Table 14.1 Register Configuration Name Abbrev.
14.2 Register Descriptions 14.2.1 Timer L Mode Register (LMR) Bit : LMIF LMIE LMR3 LMR2 LMR1 LMR0 — — Initial value : — — R/W : R /(W)* Note: * Only 0 can be written to clear the flag. The timer L mode register A (LMR) is an 8-bit read/write register which works to control the interrupts, to select between up-counting and down-counting and to select the clock source.
Page 297
1. When Controlled to the Up-Counting Function When any other values than H'00 are input to the RCR, the LTC will be cleared to H'00 before starting counting up. When the LTC value and the RCR value match, the LTC will be cleared to H'00.
14.2.2 Linear Time Counter (LTC) Bit : LTC7 LTC6 LTC5 LTC4 LTC3 LTC2 LTC1 LTC0 Initial value : R/W : The linear time counter (LTC) is a readable 8-bit up/down-counter. The inputting clock can be selected by the LMR2 to LMR0 bits of the LMR. When reset, the LTC is initialized to H'00.
14.2.4 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR are 8-bit read/write twin registers which work to control the module stop mode. When the MSTP12 bit is set to 1, timer L stops its operation at the ending point of the bus cycle to shift to the module stop mode.
14.3 Operation Timer L is an 8-bit up/down counter. The inputting clock for Timer L can be selected by the LMR2 to LMR0 bits of the LMR from the choices of the internal clock (φ/128 and φ/64), DVCDG2, PB and REC-CTL. Timer L is provided with three different types of operation modes, namely, the compare match clear mode when controlled to the up-counting function, the auto reloading mode when controlled to the down-counting function and the interval timer mode.
Page 301
φ PB-CTL Count-up signal Compare match clear signal H' 00 Interrupt request Figure 14.3 Compare Match Clearing Timing Chart (In case the rising edge of the PB-CTL is selected) Rev. 1.0, 02/00, page 287 of 1141...
Section 15 Timer R 15.1 Overview Timer R consists of triple 8-bit down-counters. It carries VCR mode identification function and slow tracking function in addition to the reloading function and event counter function. 15.1.1 Features The Timer R consists of triple 8-bit reloading timers. By combining the functions of three units of reloading timers/counters and by combining three units of timers, it can be used for the following applications: •...
Page 303
Figure 15.1 Block Diagram of Timer R Rev. 1.0, 02/00, page 290 of 1141...
15.1.3 Pin Configuration Table 15.1 shows the pin configuration of timer R. Table 15.1 Pin Configuration Name Abbrev. Function ,546 Input capture inputting pin Input Input capture inputting for the Timer R 15.1.4 Register Configuration Table 15.2 shows the register configuration of timer R. Table 15.2 Register Configuration Name Abbrev.
15.2 Register Descriptions 15.2.1 Timer R Mode Register 1 (TMRM1) Bit : CLR2 AC/BR RLCK PS21 PS20 RLD/CAP Initial value : R/W : The timer R mode register 1 (TMRM1) works to control the acceleration and braking processes and to select the inputting clock for the TMRU-2. This is an 8-bit read/write register. When reset, the TMRM1 is initialized to H'00.
Page 306
Bit 5 Using/Not Using the TMRU-2 for Reloading (RLD): This bit is used for selecting if the TMRU-2 reload function is to be turned on or not. Bit 5 Description Not using the TMRU-2 as the reload timer (Initial value) Using the TMRU-2 as the reload timer Bit 4...
Bit 0 Capture Signals of the TMRU-1 (CPS): In combination with the LAT bit (Bit 7) of the TMR2, this bit works to select the capture signals of the TMRU-1. This bit becomes valid when the LAT bit is being set to 1. It will also become valid when the RLD/CAP bit (Bit 1) is being set to 1.
Page 308
Bit 7 Capture Signals of the TMRU-2 (LAT): In combination with the CPS bit (Bit 0) of the TMRM1, this bit works to select the capture signals of the TMRU-2. TMRM2 TMRM1 Bit 7 Bit 0 Description Captures when the TMRU-3 underflows (Initial value) Captures at the rising edge of the CFG...
Page 309
Bit 2 Interrupt Causes (CP/SLM): This bit works to select the interrupt causes for the TMRI3. Bit 2 CP/SLM Description Makes interrupt requests upon the capture signals of the TMRU-2 valid (Initial value) Makes interrupt requests upon ending of the slow tracking mono-multi valid Bit 1...
15.2.3 Timer R Control/Status Register (TMRCS) Bit : — — TMRI3E TMRI2E TMRI1E TMRI3 TMRI2 TMRI1 Initial value : — — R/(W)* R/(W)* R/(W)* R/W : Note: * Only 0 can be written to clear the flag. The timer R control/status register (TMRCS) works to control the interrupts of timer R. The TMRCS is an 8-bit read/write register.
Page 311
Bit 5 Enabling the TMRI1 Interrupt (TMRI1E): This bit works to permit/prohibit occurrence of the TMRI1 interrupt when the TMRI1 has been set to 1 by issuance of the underflow signal of the TMRU-1. Bit 5 TMRI1E Description Prohibits occurrences of TMRI1 interrupts (Initial value)
Bit 2 TMRI1 Interrupt Requesting Flag (TMRI1): This is the TMRI1 interrupt requesting flag. It indicates occurrences of the TMRU-1 underflow signals. Bit 2 TMRI1 Description [Clearing conditions] (Initial value) When 0 is written after reading 1. [Setting conditions] When the TMRU-1 underflows.
15.2.5 Timer R Capture Register 2 (TMRCP2) Bit : TMRC27 TMRC26 TMRC25 TMRC24 TMRC23 TMRC22 TMRC21 TMRC20 Initial value : R/W : The timer R capture register 2 (TMRCP2) works to store the capture data of the TMRU-2. At each CFG edge, IRQ3 edge, or at occurrence of underflow of the TMRU-3, the TMRU-2 counter readings are captured by the TMRCP2.
15.2.7 Timer R Load Register 2 (TMRL2) Bit : TMR27 TMR26 TMR25 TMR24 TMR23 TMR22 TMR21 TMR20 Initial value : R/W : The timer R load register 2 (TMRL2) is an 8-bit write only register which works to set the load value of the TMRU-2.
15.2.9 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR are 8-bit read/write twin registers which work to control the module stop mode. When the MSTP11 bit is set to 1, timer R stops its operation at the ending point of the bus cycle to shift to the module stop mode.
15.3 Operation 15.3.1 Reload Timer Counter Equipped with Capturing Function TMRU-1 TMRU-1 is a reload timer counter equipped with capturing function. It consists of an 8-bit down- counter, a reloading register and a capture register. The clock source can be selected from among the leading edge of the CFG signals and three types of dividing clocks.
15.3.2 Reload Timer Counter Equipped with Capturing Function TMRU-2 TMRU-2 is a reload timer counter equipped with capturing function. It consists of an 8-bit down- counter, a reloading register and a capture register. The clock source can be selected from among the undedrflowing signal of the TMRU-1 and three types of dividing clocks.
searches. These DVCTL signals can also be used for phase controls of the capstan motor. Also, by selecting the dividing clock as the clock source, it is possible to make a delay with the edges of the DVCTL to provide the slow tracking mono-multi function. 15.3.4 Mode Identification When making mode identification (2/4/6 identification) of the SP/LP/EP modes of reproducing...
underflowing works to set to CFG mask F/F (masking movement) and the reload timer will be cleared by the CFG. • When the acceleration has been finished (when the CFG signal is input before the prescribed time has elapsed = reloading movement has been made before the down counter underflows), an interrupt request will be issued because of the CFG.
Page 320
Compensation for vertical vibrations (Supplementary V-pulse) FG acceleration detection Accelerating the Hi-Z capstan motor Acceleration process DVCTL↑ Interrupt Slow tracking mono-multi Slow tracking delay FG stopping detection Reloading Reverse Braking the rotation capstan motor Forward rotation Braking process Braking the Servo drum motor Compensation for...
15.4 Interrupt Cause In timer R, bits TMRI1 to TMRI3 of the timer R control/status register cause interrupts. The following are descriptions of the interrupts. 1. Interrupts caused by the underflowing of the TMRU-1 (TMRI1) These interrupts will constitute the timing for reloading with the TMRU-1. 2.
15.5 Settings for Respective Functions 15.5.1 Mode Identification When making mode identification (2/4/6 identification) of the SP/LP/EP modes of reproducing tapes, the TMRU-1 (CFG dividing circuit), TMRU-2 (capturing function/without reloading function) and TMRU-3 (DVCTL dividing circuit) of the timer R should be used. Timer R will be initialized to this mode identification status after a reset.
15.5.2 Reeling Controls CFG counts can be captured by making 16-bit capturing operation combining the TMRU-1 and TMRU-2. By choosing the IRQ3 as the capture signal, and by counting the CFG within the duration of the reel pulse being input through the ,546 pin, reeling controls, etc. can be effected. Settings •...
Settings • Setting the timer R mode register 2 (TMRM2) PS31 and PS30 (bits 4 and 3) = Other than (0, 0): The dividing clock is to be used as the clock source for the TMRU-3. CP/SLM bit (bit 2) = 1: The slow tracking delay signal is to work to issue the TMRI3 interrupt request.
Page 325
PS21 and PS20 (bits 3 and 2) = Other than (0, 0): The dividing clock is to be used as the clock source for the TMRU-2. • Setting the timer R load register 2 (TMRL2) Set the count reading for the duration until the braking process finishes. When the count is n, the set value should be (n - 1).
Section 16 Timer X1 16.1 Overview Timer X1 is capable of outputting two different types of independent waveforms using a 16-bit free running counter (FRC) as the basic means and it is also applicable to measurements of the durations of input pulses and the cycles external clocks. 16.1.1 Features Timer X1 has the following features:...
16.1.3 Pin Configuration Table 16.1 shows the pin configuration of timer X1. Table 16.1 Pin Configuration Name Abbrev. Function Output comparing A output-pin FTOA Output Output pin for the output comparing A Output comparing B output-pin FTOB Output Output pin for the output comparing B Input capture A input-pin FTIA Input...
16.2 Register Descriptions 16.2.1 Free Running Counter (FRC) Free running counter H (FRCH) Free running counter L (FRCL) Bit : Initial value : R/W : FRCH FRCL The FRC is a 16-bit read/write up-counter which counts up by the inputting internal clock/external clock.
16.2.2 Output Comparing Registers A and B (OCRA and OCRB) Output comparing register AH and BH (OCRAH and OCRBH) Output comparing register AL and BL (OCRAL and OCRBL) OCRA, OCRB Bit : Initial value : R/W : OCRAH, OCRBH OCRAL, OCRBL The OCR consists of twin 16-bit read/write registers (OCRA and OCRB).
16.2.3 Input Capture Registers A Through D (ICRA Through ICRD) Input capture register AH to DH (ICRAH to ICRDH) Input capture register AL to DL (ICRAL to ICRDL) ICRA, ICRB, ICRC, ICRD Bit : Initial value : R/W : ICRAH, ICRBH, ICRCH, ICRDH ICRAL, ICRBL, ICRCL, ICRDL The ICR consists of four 16-bit read-only registers (ICRA through ICRD).
Page 333
IEDGA BUFEA IEDGC Edge detection and FTIA capture signal generating circuit. ICRC ICRA Figure 16.2 Buffer Operation (Example) Table 16.3 Input Signal Edge Selection when Making Buffer Operation IEDGA IEDGC Selection of the Input Signal Edge Captures at the falling edge of the input capture input A (Initial value) Captures at both rising and falling edges of the input capture input A Captures at the rising edge of the input capture input A Reading can be made from the ICR through the CPU at 8-bit or 16-bit.
16.2.4 Timer Interrupt Enabling Register (TIER) Bit : ICIAE ICIBE ICICE ICIDE OCIAE OCIBE OVIE ICSA Initial value : R/W : The TIER is an 8-bit read/write register that controls permission/prohibition of interrupt requests. The TIER is initialized to H'00 when reset or under the standby mode, watch mode, subsleep mode, module stop mode or subactive mode.
Page 335
Bit 4 Enabling the Input Capture Interrupt D (ICIDE): This bit works to permit/prohibit interrupt requests (ICID) by the ICFD when the ICFD of the TCSRX is being set to 1. Bit 4 ICIDE Description Prohibits interrupt requests (ICID) by the ICFD (Initial value) Permits interrupt requests (ICID) by the ICFD Bit 3...
Page 336
Bit 0 Selecting the Input Capture A Signals (ICSA): This bit works to select the input capture A signals. Bit 0 ICSA Description Selects the FTIA pin for inputting of the input capture A signals (Initial value) Selects the HSW for inputting of the input capture A signals Rev.
16.2.5 Timer Control/Status Register X (TCSRX) Bit : ICFA ICFB ICFC ICFD OCFA OCFB CCLRA Initial value : R/W : R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* Note: * Only 0 can be written to clear the flag for Bits 7 to 1. The TCSRX is an 8-bit register which works to select counter clearing timing and to control respective interrupt requesting signals.
Page 338
Bit 6 Input Capture Flag B (ICFB): This status flag indicates the fact that the value of the FRC has been transferred to the ICRB by the input capture signals. When the BUFEB of the TCRX is being set to 1, the ICFB indicates the status that the FRC value has been transferred to the ICRB by the input capture signals and that the ICRB value before being updated has been transferred to the ICRC.
Page 339
Bit 4 Input Capture Flag D (ICFD): This status flag indicates the fact that the value of the FRC has been transferred to the ICRD by the input capture signals. When an input capture signal occurs while the BUFEB of the TCRX is being set to 1, although the ICFD will be set out, data transference to the ICRD will not be performed.
Page 340
Bit 2 Output Comparing Flag B (OCFB): This status flag indicates the fact that the FRC and the OCRB have come to a comparing match. This flag should be cleared by use of the software. Such setting should only be made by use of the hardware.
16.2.6 Timer Control Register X (TCRX) Bit : IEDGA IEDGB IEDGC IEDGD BUFEA BUFEB CKS1 CKS0 Initial value : R/W : The TCRX is an 8-bit read/write register that selects the input capture signal edge, designates the buffer operation, and selects the inputting clock for the FRC. The TCRX is initialized to H'00 when reset or under the standby mode, watch mode, subsleep mode, module stop mode or subactive mode.
Page 342
Bit 4 Input Capture Signal Edge Selection D (IEDGD): This bit works to select the rising edge or falling edge of the input capture signal D (FTID). Bit 4 IEDGD Description Captures the falling edge of the input capture signal D (Initial value) Captures the rising edge of the input capture signal D Bit 3...
16.2.7 Timer Output Comparing Control Register (TOCR) Bit : ICSB ICSC ICSD OSRS OLVLA OLVLB Initial value : R/W : The TOCR is an 8-bit read/write register that select input capture signals and output comparing output level, permits output comparing outputs, and controls switching over of the access of the OCRA and OCRB.
Page 344
Bit 4 Selecting the Output Comparing Register (OCRS): The addresses of the OCRA and OCRB are the same. The OCRS works to control which register to choose when reading/writing this address. The choice will not influence the operation of the OCRA and OCRB. Bit 4 OCRS Description...
Bit 0 Output Level B (OLVLB): This bit works to select the output level to output through the FTOB pin by use of the comparing match B (matching signal between the FRC and OCRB). Bit 0 OLVLB Description Low level (Initial value)
16.3 Operation 16.3.1 Operation of Timer X1 • Output Comparing Operation Right after resetting, the FRC is initialized to H'0000 to start counting up. The inputting clock can be selected from among three different types of internal clocks or the external clock by setting the CKS1 and CKS0 of the TCRX.
16.3.2 Counting Timing of the FRC The FRC is counted up by the inputting clock. By setting the CKS1 and CKS0 of the TCRX, the inputting clock can be selected from among three different types of clocks (φ/4, φ/16 and φ/64) and the DVCFG.
16.3.3 Output Comparing Signal Outputting Timing When a comparing match occurs, the output level having been set by the OLVL of the TOCR is output through the output comparing signal outputting pins (FTOA and FTOB). Figure 16.5 shows the timing chart for the output comparing signal outputting A. φ...
16.3.5 Input Capture Signal Inputting Timing • Input Capture Signal Inputting Timing As for the input capture signal inputting, rising or falling edge is selected by settings of the IEDGA through IEDGD bits of the TCRX. Figure 16.7 shows the timing chart when the rising edge is selected (IEDGA through IEDGD = φ...
Even when the ICRC or ICRD is used as the buffer register, the input capture flag will be set up corresponding to the designated edge change of respective input capture signals. For example, when using the ICRC as the buffer register for the ICRA, when an edge change having been designated by the IEDGC bit is detected with the input capture signals C and if the ICIEC bit is duly set, an interrupt request will be issued.
16.3.7 Output Comparing Flag (OCFA and OCFB) Setting Up Timing The OCFA and OCFB are being set to 1 by the comparing match signal being output when the values of the OCRA, OCRB and FRC match. The comparing match signal is generated at the last state of the value match (the timing of the FRC's updating the matching count reading).
16.5 Interrupt Causes Total seven interrupt causes exist with Timer X1, namely, ICIA through ICID, OCIA, OCIB and FOVI. Table 16.5 lists the contents of interrupt causes. Interrupt requests can be permitted or prohibited by setting interrupt enabling bits of the TIER. Also, independent vector addresses are allocated to respective interrupt causes.
16.6 Exemplary Uses of Timer X1 Figure 16.12 shows an example of outputting at optional phase difference of the pulses of the 50% duty. For this setting, follow the procedures listed below. 1. Set the CCLRA bit of the TCSRX to 1. 2.
16.7 Precautions when Using Timer X1 Pay great attention to the fact that the following competitions and operations occur during operation of timer X1. 16.7.1 Competition between Writing and Clearing with the FRC When a counter clearing signal is issued under the T2 state where the FRC is under the writing cycle, writing into the FRC will not be effected and the priority will be given to clearing of the FRC.
16.7.2 Competition between Writing and Counting Up with the FRC When a counting up cause occurs under the T2 state where the FRC is under the writing cycle, the counting up will not be effected and the priority will be given to count writing. Figure 16.14 shows the timing chart.
16.7.3 Competition between Writing and Comparing Match with the OCR When a comparing match occurs under the T2 state where the OCRA and OCRB are under the writing cycle, the priority will be given to writing of the OCR and the comparing match signal will be prohibited.
16.7.4 Changing Over the Internal Clocks and Counter Operations Depending on the timing of changing over the internal clocks, the FRC may count up. Table 16.6 shows the relations between the timing of changing over the internal clocks (Re-writing of the CKS1 and CKS0) and the FRC operations.
Page 359
Rewriting Timing for the CKS1 and CKS0 FRC Operation High → low level Clock before changeover the changeover Clock after the changeover Count clock Rewriting of the CKS1 and CKS0 High → high level Clock before changeover the changeover Clock after the changeover Count clock...
Section 17 Watchdog Timer (WDT) 17.1 Overview This LSI has an on-chip watchdog timer with one channel (WDT) for monitoring system operation. The WDT outputs an overflow signal if a system crash prevents the CPU from writing to the timer counter, allowing it to overflow. At the same time, the WDT can also generate an internal reset signal or internal NMI interrupt signal.
17.1.3 Register Configuration The WDT has two registers, as described in table 17.1. These registers control clock selection, WDT mode switching, the reset signal, etc. Table 17.1 WDT Registers Address Name Abbrev. Initial Value Write Read Watchdog timer WTCSR R/ (W) H'00 H'FFBC H'FFBC...
17.2 Register Descriptions 17.2.1 Watchdog Timer Counter (WTCNT) Bit : Initial value : R/W : TCNT is an 8-bit readable/writable* up-counter. When the TME bit is set to 1 in WTCSR, WTCNT starts counting pulses generated from the internal clock source selected by bits CKS2 to CKS0 in WTCSR. When the count overflows (changes from H'FF to H'00), the OVF flag in WTCSR is set to 1.
Page 364
Bit 7 Overflow Flag (OVF): A status flag that indicates that WTCNT has overflowed from H'FF to H'00. Bit 7 Description [Clearing conditions] (Initial value) 1. Write 0 in the TME bit 2. Read WTCSR when OVF = 1, then write 0 in OVF [Setting condition] When WTCNT overflows (changes from H'FF to H'00) When internal reset request generation is selected in watchdog timer mode, OVF is...
Page 365
Bit 3 Reset or NMI (RST/10, 10,): Specifies whether an internal reset or NMI interrupt is requested on WTCNT overflow in watchdog timer mode. Bit 3 RST/10, Description An NMI interrupt request is generated (Initial value) An internal reset request is generated Bits 2 to 0...
17.2.3 System Control Register (SYSCR) Bit : — — INTM1 INTM0 XRST — — — Initial value : — — — — — R/W : Only bit 3 is described here. For details on functions not related to the watchdog timer, see sections 3.2.2 and 6.2.1, System Control Register (SYSCR), and the descriptions of the relevant modules.
17.2.4 Notes on Register Access The watchdog timer's WTCNT and WTCSR registers differ from other registers in being more difficult to write to. The procedures for writing to and reading these registers are given below. • Writing to WTCNT and WTCSR These registers must be written to by a word transfer instruction.
17.3 Operation 17.3.1 Watchdog Timer Operation To use the WDT as a watchdog timer, set the WT/,7 and TME bits in WTCSR to 1. Software must prevent WTCNT overflows by rewriting the WTCNT value (normally by writing H'00) before overflow occurs. This ensures that WTCNT does not overflow while the system is operating normally.
17.3.2 Interval Timer Operation To use the WDT as an interval timer, clear the WT/,7 bit in WTCSR to 0 and set the TME bit to 1. An interval timer interrupt (WOVI) is generated each time WTCNT overflows, provided that the WDT is operating as an interval timer, as shown in figure 17.4.
17.3.3 Timing of Setting of Overflow Flag (OVF) The OVF bit in WTCSR is set to 1 if WTCNT overflows during interval timer operation. At the same time, an interval timer interrupt (WOVI) is requested. This timing is shown in figure 17.5. If NMI request generation is selected in watchdog timer mode, when WTCNT overflows the OVF bit in WTCSR is set to 1 and at the same time an NMI interrupt is requested.
17.4 Interrupts During interval timer mode operation, an overflow generates an interval timer interrupt (WOVI). The interval timer interrupt is requested whenever the OVF flag is set to 1 in WTCSR. OVF must be cleared to 0 in the interrupt handling routine. When NMI interrupt request generation is selected in watchdog timer mode, an overflow generates an NMI interrupt request.
17.5.2 Changing Value of CKS2 to CKS0 If bits CKS2 to CKS0 in WTCSR are written to while the WDT is operating, errors could occur in the incrementation. Software must stop the watchdog timer (by clearing the TME bit to 0) before changing the value of bits CKS2 to CKS0.
Section 18 8-Bit PWM 18.1 Overview The 8-bit PWM incorporates 4 channels of the duty control method. Its outputs can be used to control a reel motor or loading motor. 18.1.1 Features • Conversion period: 256-state • Duty control method 18.1.2 Block Diagram Figure 18.1 shows a block diagram of the 8-bit PWM (1 channel).
18.2.2 8-bit PWM Control Register (PW8CR) Bit : — — — — PWC3 PWC2 PWC1 PWC0 Initial value : — — — — R/W : The 8-bit PWM control register (PW8CR) is an 8-bit readable/writable register that controls PWM functions. PW8CR is initialized to H'00 by a reset. Bits 7 to 4...
18.2.3 Port Mode Register 3 (PMR3) Bit : PMR37 PMR36 PMR35 PMR34 PMR33 PMR32 PMR31 PMR30 Initial value : R/W : The port mode register 3 (PMR3) controls function switching of each pin in the port 3. Switching is specified for each bit. The PMR3 is a 8-bit readable/writable register and is initialized to H'00 by a reset.
18.2.4 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR consists of two 8-bit readable/writable registers that control module stop mode. When MSTP4 bit is set to 1, the 8-bit PWM stops its operation upon completion of the bus cycle and transits to the module stop mode.
18.3 8-Bit PWM Operation The 8-bit PWM outputs PWM pulses having a cycle length of 256 states and a pulse width determined by the data registers (PWR). The output PWM pulse can be converted to a DC voltage through integration in a low-pass filter. Figure 18.2 shows the output waveform example of 8-bit PWM.
Section 19 12-Bit PWM 19.1 Overview The 12-bit PWM incorporates 2 channels of the pulse pitch control method and functions as the drum and capstan motor controller. 19.1.1 Features Two on-chip 12-bit PWM signal generators are provided to control motors. These PWMs use the pulse-pitch control method (periodically overriding part of the output).
19.1.2 Block Diagram Figure 19.1 shows a block diagram of the 12-bit PWM (1 channel). The PWM signal is generated by combining quantizing pulses from a 12-bit pulse generator with quantizing pulses derived from the contents of a data register. Low-frequency components are reduced because the two quantizing pulses have different frequencies.
19.2 Register Descriptions 19.2.1 12-Bit PWM Control Registers (CPWCR, DPWCR) CPWCR Bit : CPOL CHiZ CH/L CSF/DF CCK2 CCK1 CCK0 Initial value : R/W : DPWCR Bit : DPOL DHiZ DH/L DSF/DF DCK2 DCK1 DCK0 Initial value : R/W : CPWCR is the PWM output control register for the capstan motor.
Page 384
Bits 5 and 4 PWM Pin Output (HiZ, H/L): When bit DC is set to 1, the 12-bit PWM output pins (CAPPWM, DRMPWM) output a value determined by the HiZ and H/L bits. The output is not affected by bit POL. In power-down modes, the 12-bit PWM circuit and pin statuses are retained.
Page 385
Bits 2 to 0 Carrier Frequency Select (CK2 to CK0): Selects the carrier frequency of the PWM modulated signal. Do not set them to 111. Bit 2 Bit 1 Bit 0 Description φ2 φ4 φ8 (Initial value) φ16 φ32 φ64...
19.3 Operation 19.3.1 Output Waveform The PWM signal generator combines the error data with the output from an internal pulse generator to produce a pulse-width modulated signal. When Vcc/2 is set as the reference value, the following conditions apply: 1. When the motor is running at the correct speed and phase, the PWM signal is output with a 50% duty cycle.
Page 388
Figure 19.2 Sample Waveform Output by 12-Bit PWM (4 Bits) Rev. 1.0, 02/00, page 377 of 1141...
Section 20 14-Bit PWM 20.1 Overview The 14-bit PWM is a pulse division type PWM that can be used for electronic tuner control, etc. 20.1.1 Features Features of the 14-bit PWM are given below: • Choice of two conversion periods A conversion period of 32768/φ...
20.2.2 PWM Data Registers U and L (PWDRU, PWDRL) PWDRU Bit : — — PWDRU5 PWDRU4 PWDRU3 PWDRU2 PWDRU1 PWDRU0 Initial value : R/W : — — PWDRL Bit : PWDRL7 PWDRL6 PWDRL5 PWDRL4 PWDRL3 PWDRL2 PWDRL1 PWDRL0 Initial value : R/W : PWM data registers U and L (PWDRU and PWDRL) indicate high level width in one PWN waveform cycle.
20.2.3 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The module stop control register (MSTPCR) consists of two 8-bit readable/writable registers that control the module stop mode functions.
20.3 14-Bit PWM Operation When using the 14-bit PWM, set the registers in this sequence: 1. Set bit PWM40 to 1 in port mode register 4 (PMR4) so that pin P40/PWM14 is designated for PWM output. 2. Set bit PWCR0 in the PWM control register (PWCR) to select a conversion period of either 32768/φ...
Section 21 Prescalar Unit 21.1 Overview The prescalar unit (PSU) has a 18-bit free running counter (FRC) that uses φ as a clock source and a 5-bit counter that uses φW as a clock source. 21.1.1 Features • Prescalar S (PSS) Generates frequency division clocks that are input to peripheral functions.
21.1.3 Pin Configuration Table 21.1 shows the pin configuration of the prescalar unit. Table 21.1 Pin Configuration Name Abbrev. Function ,& Input capture input Input Prescalar unit input capture input pin Frequency division clock TMOW Output Prescalar unit frequency division clock output output pin 21.1.4...
21.2 Registers 21.2.1 Input Capture Register 1 (ICR1) Bit : ICR17 ICR16 ICR15 ICR14 ICR13 ICR12 ICR11 ICR10 Initial value : R/W : Input capture register 1 (ICR1) captures 8-bit data of 2 to 2 of the FRC according to the edge of the ,&...
Page 400
Bit 6 Input Capture Interrupt Enable (ICIE): When ICIF was set to 1 by the input capture according to the edge of the ,& pin, ICIE enables and disables the generation of an input capture interrupt. Bit 6 ICIE Description Disables the generation of an input capture interrupt...
Page 401
Bits 2 to 0 Frequency Division Clock Output Select (DCS2 to DCS0): DCS2 to DCS0 select eight types of frequency division clocks that are output from the TMOW pin. Bit 2 Bit 1 Bit 0 DCS2 DCS1 DCS0 Description Outputs PSS, φ/32...
21.2.3 Port Mode Register 1 (PMR1) Bit : PMR17 PMR16 PMR15 PMR14 PMR13 PMR12 PMR11 PMR10 Initial value : R/W : The port mode register 1 (PMR1) controls switching of each pin function of port 1. The switching is specified in a unit of bit. PMR1 is an 8-bit read/write enable register.
21.3 Noise Cancel Circuit The ,& pin has a built-in a noise cancel circuit. The circuit can be used for noise protection such as remote control receiving. The noise cancel circuit samples the input values of the ,& pin twice at an interval of 256 states.
21.4.2 Prescalar W (PSW) PSW is a counter that uses the subclock as an input clock. The PSW also generates the input clock of the timer A. In this case, the timer A functions as a clock time base. When reset, the PSW is initialized to H'00, and starts increment after reset has been released. Even if the mode has been shifted to the standby mode *, watch mode *, subactive mode *, and subsleep mode *, the PSW continues the operation as long as the clocks are supplied by the X1 and X2 pins.
21.4.4 8-bit PWM This 8-bit PWM controls the duty control PWM signal in the conversion cycle 256 states. It counts the cycle and the duty cycle at 2 to 2 of the FRC. It can be used for controlling reel motors and loading motors.
Section 22 Serial Communication Interface 1 (SCI1) 22.1 Overview The serial communication interface (SCI) can handle both asynchronous and clocked synchronous serial communication. A function is also provided for serial communication between processors (multiprocessor communication function). 22.1.1 Features SCI1 features are listed below. •...
Page 407
• Full-duplex communication capability The transmitter and receiver are mutually independent, enabling transmission and reception to be executed simultaneously Double-buffering is used in both the transmitter and the receiver, enabling continuous transmission and continuous reception of serial data •...
22.1.3 Pin Configuration Table 22.1 shows the serial pins used by the SCI. Table 22.1 SCI Pins Channel Pin Name Symbol Function Serial clock pin 1 SCK1 SCI1 clock input/output Receive data pin 1 Input SCI1 receive data input Transmit data pin 1 Output SCI1 transmit data output 22.1.4...
22.2 Register Descriptions 22.2.1 Receive Shift Register 1 (RSR1) Bit : R/W : — — — — — — — — RSR1 is a register used to receive serial data. The SCI sets serial data input from the SI1 pin in RSR1 in the order received, starting with the LSB (bit 0), and converts it to parallel data.
22.2.3 Transmit Shift Register 1 (TSR1) Bit : R/W : — — — — — — — — TSR1 is a register used to transmit serial data. To perform serial data transmission, the SCI first transfers transmit data from TDR1 to TSR1, then sends the data to the SO1 pin starting with the LSB (bit 0).
22.2.5 Serial Mode Register 1 (SMR1) Bit : STOP CKS1 CKS0 Initial value : R/W : SMR1 is an 8-bit register used to set the SCI's serial transfer format and select the baud rate generator clock source. SMR1 can be read or written to by the CPU at all times. SMR1 is initialized to H'00 by a reset, and in standby mode, watch mode, subactive mode, subsleep mode, and module stop mode.
Page 413
Bit 5 Parity Enable (PE): In asynchronous mode, selects whether or not parity bit addition is performed in transmission, and parity bit checking in reception. In synchronous mode, or when a multiprocessor format is used, parity bit addition and checking is not performed, regardless of the PE bit setting.
Page 414
Bit 3 Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length in asynchronous mode. The STOP bit setting is only valid in asynchronous mode. If synchronous mode is set the STOP bit setting is invalid since stop bits are not added. Bit 3 STOP Description...
Bits 1 and 0 Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source for the baud rate generator. The clock source can be selected from φ, φ/4, φ/16, and φ/64, according to the setting of bits CKS1 and CKS0. For the relation between the clock source, the bit rate register setting, and the baud rate, see section 22.2.8, Bit Rate Register 1.
Page 416
Bit 6 Receive Interrupt Enable (RIE): Enables or disables receive-data-full interrupt (RXI) request and receive-error interrupt (ERI) request generation when serial receive data is transferred from RSR1 to RDR1 and the RDRF flag in SSR1 is set to 1. Bit 6 Description Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI) request...
Page 417
Bit 3 Multiprocessor Interrupt Enable (MPIE): Enables or disables multiprocessor interrupts. The MPIE bit setting is only valid in asynchronous mode when receiving with the MP bit in SMR1 set to 1. The MPIE bit setting is invalid in clock synchronous mode or when the MP bit is cleared to 0. Bit 3 MPIE Description...
Page 418
Bits 1 and 0 Clock Enable 1 and 0 (CKE1, CKE0): These bits are used to select the SCI clock source and enable or disable clock output from the SCK pin. The combination of the CKE1 and CKE0 bits determines whether the SCK pin functions as an I/O port, the serial clock output pin, or the serial clock input pin.
22.2.7 Serial Status Register 1 (SSR1) Bit : TDRE RDRF ORER TEND MPBT Initial value : R/W : R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* Note: * Only 0 can be written to clear the flag. SSR1 is an 8-bit register containing status flags that indicate the operating status of the SCI, and multiprocessor bits.
Page 420
Bit 5 Overrun Error (ORER): Indicates that an overrun error occurred during reception, causing abnormal termination. Bit 5 ORER Description [Clearing conditions] (Initial value) When 0 is written in ORER after reading ORER = 1 [Setting conditions] When the next serial reception is completed while RDRF = 1 Notes: 1.
Page 421
Bit 3 Parity Error (PER): Indicates that a parity error occurred during reception using parity addition in asynchronous mode, causing abnormal termination. Bit 4 Description [Clearing conditions] (Initial value) When 0 is written in PER after reading PER = 1 [Setting conditions] When, in reception, the number of 1 bits in the receive data plus the parity bit does not match the parity setting (even or odd) specified by the O/( bit in SMR1...
Bit 0 Multiprocessor Bit Transfer (MPBT): When transmission is performed using a multiprocessor format in asynchronous mode, MPBT stores the multiprocessor bit to be added to the transmit data. The MPBT bit setting is invalid when a multiprocessor format is not used, when not transmitting, and in synchronous mode.
Page 423
Table 22.3 BRR1 Settings for Various Bit Rates (Asynchronous Mode) Operating Frequency φ φ φ φ (MHz) 2.097152 2.4576 Error Error Error Error Bit Rate (bits/s) −0.04 −0.26 0.03 0.03 0.16 0.21 0.00 0.16 0.16 0.21 0.00 0.16 0.16 0.21 0.00 0.16 −0.70...
Page 425
Table 22.4 BRR1 Settings for Various Bit Rates (Synchronous Mode) Operating Frequency φ φ φ φ (MHz) Bit Rate (bits/s) 2.5 k 10 k 25 k 50 k 100 k 250 k 500 k 2.5 M Note: As far as possible, the setting should be made so that the error is no more than 1%.
Page 426
The BRR1 setting is found from the following equations. • Asynchronous mode: φ 6 − 1 × 10 64 × 2 × B 2n−1 • Synchronous mode: φ 6 − 1 × 10 8 × 2 × B 2n−1 Where Bit rate (bits/s) BRR1 setting for baud rate generator (0 ≤...
Page 427
Table 22.5 Maximum Bit Rate for Each Frequency (Asynchronous Mode) φ φ φ φ (MHz) Maximum Bit Rate (bits/s) 62500 2.097152 65536 2.4576 76800 93750 3.6864 115200 125000 4.9152 153600 156250 187500 6.144 192000 7.3728 230400 250000 9.8304 307200 312500 Rev.
Page 428
Table 22.6 Maximum Bit Rate with External Clock Input (Asynchronous Mode) φ φ φ φ (MHz) External Input Clock (MHz) Maximum Bit Rate (bits/s) 0.5000 31250 2.097152 0.5243 32768 2.4576 0.6144 38400 0.7500 46875 3.6864 0.9216 57600 1.0000 62500 4.9152 1.2288 76800 1.2500...
22.2.9 Serial Interface Mode Register 1 (SCMR1) Bit : — — — — SDIR SINV — SMIF Initial value : R/W : — — — — — SCMR1 is an 8-bit readable/writable register used to select SCI functions. SCMR1 is initialized to H'F2 by a reset, and in standby mode, watch mode, subactive mode, subsleep mode, and module stop mode.
22.2.10 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : MSTPCR, comprising two 8-bit readable/writable registers, performs module stop mode control. When bit MSTP8 is set to 1, SCI1 operation stops at the end of the bus cycle and a transition is made to module stop mode.
22.3 Operation 22.3.1 Overview The SCI can carry out serial communication in two modes: asynchronous mode in which synchronization is achieved character by character, and synchronous mode in which synchronization is achieved with clock pulses. Selection of asynchronous or synchronous mode and the transmission format is made using SMR1 as shown in table 22.8.
Page 432
Table 22.8 SMR1 Settings and Serial Transfer Format Selection SMR1 Settings SCI Transfer Format Bit 7 Bit 6 Bit 2 Bit 5 Bit 3 Data Multiproc- Parity Stop Bit C/$ $ $ $ STOP Mode Length essor Bit Length Asynchro- 8-bit 1 bit nous mode...
22.3.2 Operation in Asynchronous Mode In asynchronous mode, characters are sent or received, each preceded by a start bit indicating the start of communication and followed by one or two stop bits indicating the end of communication. Serial communication is thus carried out with synchronization established on a character-by- character basis.
Page 434
• Data Transfer Format Table 22.10 shows the data transfer formats that can be used in asynchronous mode. Any of 12 transfer formats can be selected by settings in SMR1. Table 22.10 Serial Transfer Formats (Asynchronous Mode) SMR1 Settings Serial Transfer Format and Frame Length STOP 8-bit data STOP...
Page 435
• Clock Either an internal clock generated by the built-in baud rate generator or an external clock input at the SCK pin can be selected as the SCI's serial clock, according to the setting of the C/$ bit in SMR1 and the CKE1 and CKE0 bits in SCR1. For details of SCI clock source selection, see table 22.9.
Page 436
• Data Transfer Operations SCI Initialization (Asynchronous Mode) Before transmitting and receiving data, first clear the TE and RE bits in SCR1 to 0, then initialize the SCI as described below. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before making the change using the following procedure.
Page 437
Serial Data Transmission (Asynchronous Mode) Figure 22.5 shows a sample flowchart for serial transmission. The following procedure should be used for serial data transmission. SCI initialization: Initialization The SO1 pin is automatically designated as the transmit data output pin. Start transmission SCI status check and transmit data write: Read SSR and check that the TDRE flag is...
Page 438
In serial transmission, the SCI operates as described below. 1. The SCI monitors the TDRE flag in SSR1, and if it is 0, recognizes that data has been written to TDR1, and transfers the data from TDR1 to TSR1. 2. After transferring data from TDR1 to TSR1, the SCI sets the TDRE flag to 1 and starts transmission.
Page 439
Figure 22.6 shows an example of the operation for transmission in asynchronous mode. Data Data Start Parity Stop Parity Stop Start Idle state (mark state) TDRE TEND TXI interrupt Data written to TDR1 and TXI interrupt request TEI interrupt request request TDRE flag cleared to 0 generated...
Page 440
Serial Data Reception (Asynchronous Mode) Figures 22.7 and 22.8 show sample flowcharts for serial reception. The following procedure should be used for serial data reception. SCI initialization: Initialization The SI1 pin is automatically designated as the receive data input pin. Start reception Receive error handling and break [2][3]...
Page 441
Error handling ORER=1 Overrun error handling FER=1 Break? Framing error handling Clear RE bit in SCR1 to 0 PER=1 Parity error handling Clear ORER, PER, and FER flags in SSR1 to 0 < End > Figure 22.8 Sample Serial Reception Data Flowchart (2) Rev.
Page 442
In serial reception, the SCI operates as described below. 1. The SCI monitors the transmission line, and if a 0 stop bit is detected, performs internal synchronization and starts reception. 2. The received data is stored in RSR1 in LSB-to-MSB order. 3.
Figure 22.9 shows an example of the operation for reception in asynchronous mode. Data Data Start Parity Stop Parity Stop Start Idle state (mark state) RDRF RXI interrupt RDR1 data read ERI interrupt request request and RDRF flag generated by framing generation cleared to 0 in error...
Page 444
1. Data Transfer Format There are four data transfer formats. When a multiprocessor format is specified, the parity bit specification is invalid. For details, see table 22.10. 2. Clock See the section on asynchronous mode. Transmitting station Serial communication line Receiving Receiving Receiving...
Page 445
SCI initialization: Initialization The SO2 pin is automatically designated as the transmit data output pin. Start transmission SCI status check and transmit data write: Read SSR and check that the TDRE flag is Read TDRE flag in SSR1 set to 1, then write transmit data to TDR1. Set the MPBT bit in SSR1 to 0 or 1.
Page 446
In serial transmission, the SCI operates as described below. 1. The SCI monitors the TDRE flag in SSR1, and if it is 0, recognizes that data has been written to TDR1, and transfers the data from TDR1 to TSR1. 2. After transferring data from TDR1 to TSR1, the SCI sets the TDRE flag to 1 and starts transmission.
Page 447
Figure 22.12 shows an example of SCI operation for transmission using a multiprocessor format. Multi- Multi- Data Data processor Start processor Stop Start Stop bit 1 Idle state (mark state) TDRE TEND Data written to TDR1 and TXI interrupt request TXI interrupt TEI interrupt TDRE flag cleared to 0...
Page 448
Initialization SCI initialization: The SI1 pin is automatically designated as the receive data input pin. Start reception ID reception cycle: Set the MPIE bit in SCR1 to 1. Set MPIE bit in SCR1 to 1 SCI status check, ID reception and Read ORER and FER flags in SSR1 comparison: Read SSR and check that the RDRF flag is...
Page 449
Error handling ORER=1 Overrun error handling FER=1 Break? Framing error handling Clear RE bit in SCR1 to 0 Clear ORER, PER, and FER flags in SSR1 to 0 < End > Figure 22.14 Sample Multiprocessor Serial Reception Flowchart (2) Rev. 1.0, 02/00, page 440 of 1141...
Page 450
Figure 22.15 shows an example of SCI operation for multiprocessor format reception. Data (ID1) Data (Data 1) Start Stop Start Stop Idle state (mark state) MPIE RDRF RDR1 value MPIE=0 RXI interrupt RDR1 data read If not this station's RXI interrupt request request (multi- is not generated, and and RDRF flag...
22.3.4 Operation in Synchronous Mode In synchronous mode, data is transmitted or received in synchronization with clock pulses, making it suitable for high-speed serial communication. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex communication by use of a common clock. Both the transmitter and the receiver also have a double-buffered structure, so that data can be read or written during transmission or reception, enabling continuous data transfer.
Page 452
• Data Transfer Operations SCI Initialization (Synchronous Mode) Before transmitting and receiving data, first clear the TE and RE bits in SCR1 to 0, then initialize the SCI as described below. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before making the change using the following procedure.
Page 453
Serial Data Transmission (Synchronous Mode) Figure 22.18 shows a sample flowchart for serial transmission. The following procedure should be used for serial data transmission. SCI initialization: Initialization The SO2 pin is automatically designated as the transmit data output pin. Start transmission SCI status check and transmit data write: Read SSR1 and check that the TDRE flag...
Page 454
In serial transmission, the SCI operates as described below. 1. The SCI monitors the TDRE flag in SSR1, and if it is 0, recognizes that data has been written to TDR1, and transfers the data from TDR1 to TSR1. 2. After transferring data from TDR1 to TSR1, the SCI sets the TDRE flag to 1 and starts transmission.
Page 455
Serial Data Reception (Synchronous Mode) Figure 22.20 shows a sample flowchart for serial reception. The following procedure should be used for serial data reception. When changing the operating mode from asynchronous to synchronous, be sure to check that the ORER, PER, and FER flags are all cleared to 0. The RDRF flag will not be set if the FER or PER flag is set to 1, and neither transmit nor receive operations will be possible.
Page 456
SCI initialization: Initialization The SI1 pin is automatically designated as the receive data input pin. Start reception Receive error handling: [2][3] IF a receive error occurs, read the ORER flag in SSR1, and after performing the Read ORER flag in SSR1 appropriate error handling, clear the ORER flag to 0.
Page 457
In serial reception, the SCI operates as described below. 1. The SCI performs internal initialization in synchronization with serial clock input or output. 2. The received data is stored in RSR1 in LSB-to-MSB order. After reception, the SCI checks whether the RDRF flag is 0 and the receive data can be transferred from RSR1 to RDR1.
Page 458
Simultaneous Serial Data Transmission and Reception (Synchronous Mode) Figure 22.22 shows a sample flowchart for simultaneous serial transmit and receive operations. The following procedure should be used for simultaneous serial data transmit and receive operations. SCI initialization: Initialization The SO2 pin is designated as the transmit data output pin, and the SI1 pin is Start transfer designated as the receive data input pin,...
22.4 SCI Interrupts The SCI has four interrupt sources: the transmit-end interrupt (TEI) request, receive-error interrupt (ERI) request, receive-data-full interrupt (RXI) request, and transmit-data-empty interrupt (TXI) request. Table 22.12 shows the interrupt sources and their relative priorities. Individual interrupt sources can be enabled or disabled with the TIE, RIE, and TEIE bits in SCR1. Each kind of interrupt request is sent to the interrupt controller independently.
22.5 Usage Notes The following points should be noted when using the SCI. • Relation between Writes to TDR1 and the TDRE Flag The TDRE flag in SSR1 is a status flag that indicates that transmit data has been transferred from TDR1 to TSR1.
Page 461
• Break Detection and Processing When framing error (FER) detection is performed, a break can be detected by reading the SI1 pin value directly. In a break, the input from the SI1 pin becomes all 0s, and so the FER flag is set, and the parity error flag (PER) may also be set.
Page 462
16 clocks 8 clocks 15 0 15 0 Internal basic clock Receive data Start bit Synchronization sampling timing Data sampling timing Figure 22.23 Receive Data Sampling Timing in Asynchronous Mode Thus the reception margin in asynchronous mode is given by formula (1) below. | D –...
Page 463
• Operation in Case of Mode Transition Transmission Operation should be stopped (by clearing TE, TIE, and TEIE to 0) before making a module stop mode, standby mode, watch mode, subactive mode, or subsleep mode transition. TSR1, TDR1, and SSR1 are reset. The output pin states in module stop mode, standby mode, watch mode, subactive mode, or subsleep mode depend on the port settings, and becomes high-level output after the relevant mode is cleared.
Page 464
<Transmission> [1] Data being transmitted is interrupted. All data transmitted? After exiting software standby mode, etc., normal CPU transmis- sion is possible by setting TE to 1, reading SSR1, writing TDR1, and Read TEND flag in SSR1 clearing TDRE to 0. [2] If TIE and TEIE are set to 1, clear TEND = 1 them to 0 in the same way.
Page 465
Transition Exit from End of Start of transmission transmission to standby standby TE bit Port input/output SCK1 output pin SO1 output pin Port input/output High output Start Stop Port input/output High output SCI TxD Port Port SCI TxD output output Figure 22.25 Asynchronous Transmission Using Internal Clock End of Transition...
Page 466
<Reception> Read RDRF flag in SSR1 Receive data being received RDRF= 1 becomes invalid. Read receive data in RDR1 RE= 0 Transition to standby Includes module stop mode, mode, etc. watch mode, subactive mode, and subsleep mode. Exit from standby mode, etc.
Section 23 I C Bus Interface (IIC) 23.1 Overview This LSI incorporates a 2-channel I C bus interface. The I C bus interface conforms to and provides a subset of the Philips I C bus (inter-IC bus) interface functions. The register configuration that controls the I C bus differs partly from the Philips configuration, however.
23.1.2 Block Diagram Figure 23.1 shows a block diagram of the I C bus interface. Figure 23.2 shows an example of I/O pin connections to external circuits. I/O pins are driven only by NMOS and apparently function as NMOS open-drain outputs. However, applicable voltages to input pins depend on the power (Vcc) voltage of this LSI.
(Master) This chip (Slave 1) (Slave 2) Figure 23.2 I C Bus Interface Connections (Example: This Chip as Master) 23.1.3 Pin Configuration Table 23.1 summarizes the input/output pins used by the I C bus interface. Table 23.1 I C Bus Interface Pins Channel Name Abbrev.* I/O Function...
23.1.4 Register Configuration Table 23.2 summarizes the registers of the I C bus interface. Table 23.2 Register Configuration Channel Name Abbrev. Initial Value Address C bus control register ICCR0 H'01 H'D0E8 C bus status register ICSR0 H'00 H'D0E9 C bus data register ICDR0 H'D0EE* C bus mode register...
23.2 Register Descriptions 23.2.1 C Bus Data Register (ICDR) Bit : ICDR7 ICDR6 ICDR5 ICDR4 ICDR3 ICDR2 ICDR1 ICDR0 Initial value : — — — — — — — — R/W : ICDRR Bit : ICDRR7 ICDRR6 ICDRR5 ICDRR4 ICDRR3 ICDRR2 ICDRR1 ICDRR0...
Page 472
ICDR is an 8-bit readable/writable register that is used as a transmit data register when transmitting and a receive data register when receiving. ICDR is divided internally into a shift register (ICDRS), receive buffer (ICDRR), and transmit buffer (ICDRT). ICDRS cannot be read or written by the CPU, ICDRR is read-only, and ICDRT is write-only.
Page 473
TDRE Description The next transmit data is in ICDR (ICDRT), or transmission cannot be started [Clearing conditions] (Initial value) 1. When transmit data is written in ICDR (ICDRT) in transmit mode (TRS = 1) 2. When a stop condition is detected in the bus line state after a stop condition is issued with the I C bus format or serial format selected 3.
23.2.2 Slave Address Register (SAR) Bit : SVA6 SVA5 SVA4 SVA3 SVA2 SVA1 SVA0 Initial value : R/W : SAR is an 8-bit readable/writable register that stores the slave address and selects the communication format. When the chip is in slave mode (and the addressing format is selected), if the upper 7 bits of SAR match the upper 7 bits of the first frame received after a start condition, the chip operates as the slave device specified by the master device.
Page 475
Bit 0 Format Select (FS): Used together with the FSX bit in SARX and the SW bit in DDCSWR to select the communication format. • I C bus format: addressing format with acknowledge bit • Synchronous serial format: non-addressing format without acknowledge bit, for master mode only •...
23.2.3 Second Slave Address Register (SARX) Bit : SVAX6 SVAX5 SVAX4 SVAX3 SVAX2 SVAX1 SVAX0 Initial value : R/W : SARX is an 8-bit readable/writable register that stores the second slave address and selects the communication format. When the chip is in slave mode (and the addressing format is selected), if the upper 7 bits of SARX match the upper 7 bits of the first frame received after a start condition, the chip operates as the slave device specified by the master device.
23.2.4 C Bus Mode Register (ICMR) Bit : WAIT CKS2 CKS1 CKS0 Initial value : R/W : ICMR is an 8-bit readable/writable register that selects whether the MSB or LSB is transferred first, performs master mode wait control, and selects the master mode transfer clock frequency and the transfer bit count.
Page 478
Bit 6 Wait Insertion Bit (WAIT) Selects whether to insert a wait between the transfer of data and the acknowledge bit, in master mode with the I C bus format. When WAIT is set to 1, after the fall of the clock for the final data bit, the IRIC flag is set to 1 in ICCR, and a wait state begins (with SCL at the low level).
Page 479
Bits 5 to 3 Transfer Clock Select (CKS2 to CKS0): These bits, together with the IICX1 bit (for channel 1) or IICX0 bit (for channel 0) in STCR, select the serial clock frequency in master mode. They should be set according to the required transfer rate. STCR Bits 5, 6 Bit 5...
Page 480
Bits 2 to 0 Bit Counter (BC2 to BC0): Bits BC2 to BC0 specify the number of bits to be transferred next. With the I C bus format (when the FS bit in SAR or the FSX bit in SARX is 0), the data is transferred with one addition acknowledge bit.
23.2.5 C Bus Control Register (ICCR) Bit : IEIC ACKE BBSY IRIC Initial value : R/(W)* R/W : Note: * Only 0 can be written to clear the flag. ICCR is an 8-bit readable/writable register that enables or disables the I C bus interface, enables or disables interrupts, selects master or slave mode and transmission or reception, enables or disables acknowledgement, confirms the I...
Page 482
Bits 5 and 4 Master/Slave Select (MST) and Transmit/Receive Select (TRS): MST selects whether the I C bus interface operates in master mode or slave mode. TRS selects whether the I C bus interface operates in transmit mode or receive mode. In master mode with the I C bus format, when arbitration is lost, MST and TRS are both reset by hardware, causing a transition to slave receive mode.
Page 483
Bit 4 Description Receive mode (Initial value) [Clearing conditions] 1. When 0 is written by software (in cases other than setting condition 3) 2. When 0 is written in TRS after reading TRS = 1 (in case of setting condition 3) 3.
Page 484
Bit 2 Bus Busy (BBSY): The BBSY flag can be read to check whether the I C bus (SCL, SDA) is busy or free. In master mode, this bit is also used to issue start and stop conditions. A high-to-low transition of SDA while SCL is high is recognized as a start condition, setting BBSY to 1.
Page 485
Bit 1 IRIC Description Waiting for transfer, or transfer in progress (Initial value) [Clearing condition] When 0 is written in IRIC after reading IRIC = 1 Interrupt requested [Setting conditions] • I C bus format master mode 1. When a start condition is detected in the bus line state after a start condition is issued (when the TDRE flag is set to 1 because of first frame transmission) 2.
Page 486
When, with the I C bus format selected, IRIC is set to 1 and an interrupt is generated, other flags must be checked in order to identify the source that set IRIC to 1. Although each source has a corresponding flag, caution is needed at the end of a transfer. When the TDRE or RDRF internal flag is set, the readable IRTR flag may or may not be set.
Page 487
Table 23.3 Flags and Transfer States BBSY ESTP STOP IRTR AASX AL ACKB State Idle state (flag clearing required) Start condition issuance Start condition established Master mode wait Master mode transmit/receive end Arbitration lost SAR match by first frame in slave mode General call address match SARX match...
23.2.6 C Bus Status Register (ICSR) Bit : ESTP STOP IRTR AASX ACKB Initial value : R/W : R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* Note: * Only 0 can be written to clear the flag. ICSR is an 8-bit readable/writable register that performs flag confirmation and acknowledge confirmation and control.
Page 489
Bit 6 Normal Stop Condition Detection Flag (STOP): Indicates that a stop condition has been detected after completion of frame transfer in I C bus format slave mode. Bit 6 STOP Description No normal stop condition (Initial value) [Clearing condition] 1.
Page 490
Bit 4 Second Slave Address Recognition Flag (AASX): In I C bus format slave receive mode, this flag is set to 1 if the first frame following a start condition matches bits SVAX6 to SVAX0 in SARX. AASX is cleared by reading AASX after it has been set to 1, then writing 0 in AASX.
Page 491
Bit 2 Slave Address Recognition Flag (AAS): In I C bus format slave receive mode, this flag is set to 1 if the first frame following a start condition matches bits SVA6 to SVA0 in SAR, or if the general call address (H'00) is detected.
Bit 0 Acknowledge Bit (ACKB): Stores acknowledge data. In transmit mode, after the receiving device receives data, it returns acknowledge data, and this data is loaded into ACKB. In receive mode, after data has been received, the acknowledge data set in this bit is sent to the transmitting device.
23.2.8 DDC Switch Register (DDCSWR) Bit : CLR3 CLR2 CLR1 CLR0 Initial value : R/W : R/(W)* Notes: 1. Only 0 can be written to clear the flag. Always read as 1. DDCSWR is an 8-bit read/write register that controls automatic format switching for IIC channel 0 and IIC internal latch clearing.
Page 494
Bit 5 DDC Mode Switch Interrupt Enable Bit (IE): Enables or disables an interrupt request to the CPU when the format for IIC channel 0 is automatically switched. Bit 5 Description Disables an interrupt at automatic format switching (Initial value) Enables an interrupt at automatic format switching Bit 4...
Page 495
Bit 3 Bit 2 Bit 1 Bit 0 CLR3 CLR2 CLR1 CLR0 Description This setting must not be used This setting must not be used IIC0 internal latch cleared IIC1 internal latch cleared IIC 0 and IIC1 internal latches cleared ...
23.3 Operation 23.3.1 C Bus Data Format The I C bus interface has serial and I C bus formats. The I C bus formats are addressing formats with an acknowledge bit. These are shown in figures 23.3(1) and (2). The first frame following a start condition always consists of 8 bits. Formatless transfer can be selected only for IIC channel 0.
FS = 1 and FSX = 1 DATA DATA Transfer bit count (n = 1 to 8) Transfer frame count (m = 1 or above) Figure 23.4 I C Bus Data Format (Serial Format) DATA DATA Figure 23.5 I C Bus Timing Table 23.4 I C Bus Data Format Symbols Symbol...
Page 499
TDRE internal flag is set to 1 and the IRIC and IRTR flags are also set to 1. If IEIC is set to 1 in ICCR, a CPU interrupt is requested. 3. If bit FS is 0 in SAR or bit FSX is 0 in SARX, the first frame following the start condition contains a 7-bit slave address and indicates the transmit/receive direction.
Page 500
Start condition issuance (Master output) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 (Master output) Slave address Data 1 (Slave output) TDRE Interrupt Interrupt request IRIC request generated generated ICDRT Data 1...
Page 501
When continuously transmitting data, 6. Clear IRIC flag to 0 before startup of the 9th transmit clock of the data being transmitted, and then write the next transmit data in ICDR. 7. 1 frame data transmission ends, and upon startup of the 9th transmit clock, IRIC flag in ICCR is set to 1.
23.3.3 Master Receive Operation In master receive mode, the master device outputs the receive clock, receives data, and returns an acknowledge signal. The slave device transmits the data. The receive procedure and operations in master receive mode are described below. 1.
Page 503
Master transmit Master receive mode mode (Master output) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 (Slave output) Data 1 Data 2 (Master output) RDRF Interrupt Interrupt IRIC request request generated...
23.3.4 Slave Receive Operation In slave receive mode, the master device outputs the transmit clock and transmit data, and the slave device returns an acknowledge signal. The receive procedure and operations in slave receive mode are described below. 1. Set bit ICE in ICCR to 1. Set bits MLS in ICMR and bits MST and TRS in ICCR according to the operating mode.
Page 505
Start condition issurance (Master output) (Slave output) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 (Master output) Slave address Data 1 (Slave output) RDRF Interrupt request IRIC generated ICDRS Address + R/W ICDRR...
Page 506
(Master output) (Slave output) Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (Master output) Data 1 Data 2 (Slave output) RDRF Interrupt Interrupt IRIC request request generated generated ICDRS Data 1 Data 2...
23.3.5 Slave Transmit Operation In slave transmit mode, the slave device outputs the transmit data, and the master device outputs the transmit clock and returns an acknowledge signal. The transmit procedure and operations in slave transmit mode are described below. 1.
Slave receive mode Slave transmit mode (Master output) (Slave output) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 (Slave output) Data 1 Data 2 (Master output) TDRE Interrupt Interrupt Interrupt IRIC...
Page 509
(a) When WAIT = 0, and FS = 0 or FSX = 0 (I C bus format, no wait) IRIC User Clear Write to ICDR (transmit) or processing IRIC read ICDR (receive) (b) When WAIT = 1, and FS = 0 or FSX = 0 (I C bus format, wait inserted) IRIC User...
23.3.7 Automatic Switching from Formatless Transfer to I C Bus Format Transfer Setting the SW bit in DDCSWR to 1 selects the IIC0 formatless transfer operation. When an SCL falling edge is detected, the operating mode automatically switches from formatless transfer to I bus format transfer (slave mode).
23.3.8 Noise Canceler The logic levels at the SCL and SDA pins are routed through noise cancelers before being latched internally. Figure 23.13 shows a block diagram of the noise canceler circuit. The noise canceler consists of two cascaded latches and a match detector. The SCL (or SDA) input signal is sampled on the system clock, but is not passed forward to the next circuit unless the outputs of both latches agree.
Page 512
Start Test the status of the SCL and SDA lines. Initialize Select master transmit mode. Read BBSY flag in ICCR Generate a start condition. Set transmit data for the first byte (slave BBSY=0? address +R/W) Wait for 1 byte to be transmitted. Set MST=1 and TRS=1 in ICCR Test for acknowledgement by the...
Page 513
Master receive mode Select receive mode. Set TRS=0 in ICCR Set acknowledge data. Clear IRIC flag in ICCR Start receiving. The first read is a dummy Set ACKB=0 in ICSR read. Wait for 1 byte to be received. Last receive? Set acknowledge data for the last receive.
Page 514
Start Initialize Set MST=0 and TRS=0 in ICCR Set ACKB=0 in ICSR Read IRIC flag in ICCR IRIC=1? Read AAS and ADZ flags in ICSR AAS=1 and General call address processing ADZ=0? *Description omitted Read TRS bit in ICCR Slave transmit mode TRS=0? Last receive? Read ICDR...
Set transmit data for the second and Slave transmit mode subsequent bytes. Clear IRIC in ICCR Wait for 1 byte to be transmitted. Write transmit data in ICDR Test for end of transfer. Clear IRIC flag in ICCR Select slave receive mode. Dummy read (to release the SCL line).
Page 516
• Internal latches which holds the register read information to set or clear the flags in ICMR, ICCR, ICSR, and DDCSWR • Bit counter (BC2 to BC0) value in ICMR • Sources of interrupts generated (interrupts that has been transferred to the interrupt controller) (2) Notes on Initialization •...
23.4 Usage Notes 1. In master mode, if an instruction to generate a start condition is immediately followed by an instruction to generate a stop condition, neither condition will be output correctly. To output consecutive start and stop conditions, after issuing the instruction that generates the start condition, read the relevant ports, check that SCL and SDA are both low, then issue the instruction that generates the stop condition.
Page 518
5. The I C bus interface specification for the SCL rise time t is under 1000 ns (300 ns for high- speed mode). In master mode, the I C bus interface monitors the SCL line and synchronizes one bit at a time during communication. If t (the time for SCL to go from low to V ) exceeds the time determined by the input clock of the I...
Page 519
7. Precautions on reading ICDR at the end of master receive mode When terminating the master receive mode, set TRS bit to 1, and select "write" for ICCR BBSY = 0 and SCP = 0. This forces to move SDA from low to high level when SCL is at high level, thereby generating the stop condition.
Page 520
Table 23.7 I C Bus Timing (with Maximum Influence of t Time Indication (at Maximum Transfer Rate) [ns] C Bus Influence Specification φ φ φ φ = 8 MHz φ φ φ φ = 10 MHz Item Indication (Max.) (Min.) −1000 ←...
Section 24 A/D Converter 24.1 Overview This LSI incorporates a 10-bit successive-approximations A/D converter that allows up to 12 analog input channels to be selected. 24.1.1 Features A/D converter has the following features. • 10-bit resolution • 12 input channels •...
24.1.2 Block Diagram Figure 24.1 shows a block diagram of the A/D converter. Internal data bus Reference Voltage 10-bit Hardware control circuit ADTRG (HSW timing generator) Vref ADTRG Chopper type Control circuit comparator φ/2 Sample-and- φ/4 hold circuit Interrupt request [Legend] : Software trigger A/D result register ADTRG, DFG...
24.1.3 Pin Configuration Table 24.1 summarizes the input pins used by the A/D converter. Table 24.1 A/D Converter Pins Name Abbrev. Function Analog power supply pin Input Analog block power supply and A/D conversion reference voltage Analog ground pin Input Analog block ground and A/D conversion reference voltage Analog input pin 0...
24.2 Register Descriptions 24.2.1 Software-Triggered A/D Result Register (ADR) ADRH ADRL Bit : ADR9 ADR8 ADR7 ADR6 ADR5 ADR4 ADR3 ADR2 ADR1 ADR0 — — — — — — Initial value : — — — — — — R/W : The software-triggered A/D result register (ADR) is a register that stores the result of an A/D conversion started by software.
AHR can be read by the CPU at any time, but the AHR value during A/D conversion is not fixed. The upper bytes can always be read directly, but the data in the lower bytes is transferred via a temporary register (TEMP). For details, see section 24.3, Interface to Bus Master. AHR is a 16-bit read-only register which is initialized to H'0000 at a reset, and in module stop mode, standby mode, watch mode, subactive mode and subsleep mode.
Page 527
States Instruction execution MOV.B WRITE Start flag Conversion frequency Conversion period (134 or 266 states) Interrupt request flag IRQ sampling (CPU) Note: IRQ sampling; When conversion ends, the start flag is cleared and the interrupt request flag is set. The CPU recognizes the interrupt in the last execution state of an instruction, and executes interrupt exception handling after completing the instruction.
Page 528
Bits 3 to 0 Software Channel Select (SCH3 to SCH0): These bits select the analog input channel that is converted by software triggering. When channels AN0 to AN7 are used, appropriate pin settings must be made in port mode register 0 (PMR0).
24.2.4 A/D Control/Status Register (ADCSR) Bit : SEND HEND ADIE BUSY SCNL — Initial value : R/(W)* R/(W)* — R/W : Note: * Only 0 can be written to bits 7 and 6, to clear the flag. The A/D status register (ADCSR) is an 8-bit register that can be used to start or stop A/D conversion, or check the status of the A/D converter.
Page 530
Bit 5 A/D Interrupt Enable (ADIE): Selects enable or disable of interrupt (ADI) generation upon A/D conversion end. Bit 5 ADIE Description Interrupt (ADI) upon A/D conversion end is disabled (Initial value) Interrupt (ADI) upon A/D conversion end is enabled Bit 4...
Page 531
Bit 2 Busy Flag (BUSY): During hardware- or external-triggered A/D conversion, if software attempts to start A/D conversion by writing to the SST bit, the SST bit is not modified and instead the BUSY flag is set to 1. This flag is cleared when the hardware-triggered A/D result register (AHR) is read.
24.2.5 Trigger Select Register (ADTSR) Bit : — — — — — — TRGS1 TRGS0 Initial value : R/W : — — — — — — The trigger select register (ADTSR) selects hardware- or external-triggered A/D conversion start factor. ADTSR is an 8-bit readable/writable register that is initialized to H'FC by a reset, and in module stop mode, standby mode, watch mode, subactive mode and subsleep mode.
Bits 7 to 0 P07/AN7 to P00/AN0 Pin Switching (PMR07 to PMR00): These bits set the P0n/ANn pin as the input pin for P0n or as the ANn pin for A/D conversion analog input channel. Bit n PMR0n Description P0n/ANn functions as a general-purpose input port...
24.3 Interface to Bus Master ADR and AHR are 16-bit registers, but the data bus to the bus master is only 8 bits wide. Therefore, in accesses by the bus master, the upper byte is accessed directly, but the lower byte is accessed via a temporary register (TEMP).
24.4 Operation The A/D converter operates by successive approximations with 10-bit resolution. 24.4.1 Software-Triggered A/D Conversion A/D conversion starts when software sets the software A/D start flag (SST bit) to 1. The SST bit remains set to 1 during A/D conversion, and is automatically cleared to 0 when conversion ends. Conversion can be software-triggered on any of the 12 channels provided by analog input pins AN0 to ANB.
24.4.2 Hardware- or External-Triggered A/D Conversion The system contains the hardware trigger function that allows to turn on A/D conversion at a specified timing by use of the hardware trigger (internal signals: ADTRG and DFG) and the incoming external trigger ($'75*). This function can be used to measure an analog signal that varies in synchronization with an external signal at a fixed timing.
24.5 Interrupt Sources When A/D conversion ends, SEND or HEND flag in ADCSR is set to 1. The A/D conversion end interrupt (ADI) can be enabled or disabled by ADIE bit in ADCSR. Figure 24.4 shows the block diagram of A/D conversion end interrupt. A/D control/status register (ADCSR) SEND HEND...
Section 25 Address Trap Controller (ATC) 25.1 Overview The address trap controller (ATC) is capable of generating interrupt by setting an address to trap, when the address set appears during bus cycle. 25.1.1 Features Address to trap can be set independently at three points. 25.1.2 Block Diagram Figure 25.1 shows a block diagram of the address trap controller.
25.1.3 Register Configuration Table 25.1 Register List Name Abbrev. Initial Value Address * Address trap control register ATCR H'F8 H'FFB9 Trap address register 0 TAR0 H'F00000 H'FFB0 to H'FFB2 Trap address register 1 TAR1 H'F00000 H'FFB3 to H'FFB5 Trap address register 2 TAR2 H'F00000 H'FFB6 to H'FFB8...
Page 540
Bit 1 Trap Control 1 (TRC1): Sets ON/OFF operation of the address trap function 1. Bit 1 TRC1 Description Address trap function 1 disabled (Initial value) Address trap function 1 enabled Bit 0 Trap Control 0 (TRC0): Sets ON/OFF operation of the address trap function 0. Bit 0 TRC0 Description...
25.2.2 Trap Address Register 2 to 0 (TAR2 to TAR0) Bit : Initial value : R/W : Bit : Initial value : R/W : Bit : — Initial value : — R/W : The TAR is composed of three 8-bit readable/writable registers (TARnA, B, and C)(n = 2 to 0) The TAR sets the address to trap.
25.3 Precautions in Usage Address trap interrupt arises 2 states after prefetching the trap address. Trap interrupt may occur after the trap instruction has been executed, depending on a combination of instructions immediately preceding the setting up of the address trap. If the instruction to trap immediately follows the branch instruction or the conditional branch instruction, operation may differ, depending on whether the condition was satisfied or not, or the address to be stacked may be located at the branch.
Page 543
2. Figure 25.3 shows the operation when the instruction immediately preceding the trap address is that of 2 states or more of the execution cycle and the next instruction prefetch occurs in the second state from the last. The address to be stacked is 0268. Start of exception Data instruc-...
25.3.2 Enabling The address trap function becomes valid after executing one instruction following the setting of the enable bit of the address trap control register (TRCR) to 1. 029C BSET #0, @TRCR MOV.W R0, R1 *029E After executing the MOV instruction, 02A0 MOV.B R1L, R3H the address trap interrupt does not...
Page 545
2. When the condition is not satisfied by Bcc instruction (8-bit displacement) If the trap address is the next instruction to the Bcc instruction and the condition is not satisfied by the Bcc instruction and thus it fails to branch, transition is made to the address trap interrupt after executing the trap address instruction and prefetching the next instruction.
Page 546
3. When condition is not satisfied by Bcc instruction (16-bit displacement) If the trap address is the next instruction to the Bcc instruction and the condition is not satisfied by the Bcc instruction and thus it fails to branch, transition is made to the address trap interrupt after executing the trap address instruction (if the trap address instruction is that of 2 states or more.
Page 547
4. When the condition is not satisfied by Bcc instruction (Trap address at branch) When the trap address is at the branch of the Bcc instruction and the condition is not satisfied by the Bcc instruction and thus it fails to branch, transition is made into the address trap interrupt after executing the next instruction (if the next instruction is that of 2 states or more.
25.3.4 BSR Instruction 1. BSR Instruction (8-bit displacement) When the trap address is the next instruction to the BSR instruction and the addressing mode is an 8-bit displacement, transition is made to the address trap interrupt after prefetching the instruction at the branch. The address to be stacked is 02C2. Stack Start of instruc-...
25.3.5 JSR Instruction 1. JSR Instruction (Register indirect) When the trap address is the next instruction to the JSR instruction and the addressing mode is a register indirect, transition is made to the address trap interrupt after prefetching the instruction at the branch. The address to be stacked is 02C8. Stack Start of instruc-...
Page 550
2. JSR Instruction (Memory indirect) When the trap address is the next instruction to the JSR instruction and the addressing mode is memory indirect, transition is made to the address trap interrupt after prefetching the instruction at the branch. The address to be stacked is 02EA. Start of Data Stack...
25.3.6 JMP Instruction 1. JMP Instruction (Register indirect) When the trap address is the next instruction to the JMP instruction and the addressing mode is a register indirect, transition is made to the address trap interrupt after prefetching the instruction at the branch. The address to be stacked is 02AA. Data Start of instruc-...
2. JMP Instruction (Memory indirect) When the trap address is the next instruction to the JMP instruction and the addressing mode is memory indirect, transition is made to the address trap interrupt after prefetching the instruction at the branch. The address to be stacked is 02E4. Internal Data Start of...
25.3.8 SLEEP Instruction 1. SLEEP Instruction 1 When the trap address is the SLEEP instruction and the instruction execution cycle immediately preceding the SLEEP instruction is that of 2 states or more and prefetch does not occur in the last state, the SLEEP instruction is not executed and transition is made to the address trap interrupt without going into SLEEP mode.
Page 554
2. SLEEP Instruction 2 When the trap address is the SLEEP instruction and the instruction execution cycle immediately preceding the SLEEP instruction is that of 1 state 2 states or more and prefetch occurs in the last state, this puts in the SLEEP mode after execution of the SLEEP instruction, and the SLEEP mode is cancelled by the address trap interrupt and transition is made to the exception handling.
Page 555
3. SLEEP Instruction 3 When the trap address is the next instruction to the SLEEP instruction, this puts in the SLEEP mode after execution of the SLEEP instruction, and the SLEEP mode is cancelled by the address trap interrupt and transition is made to the exception handling. The address to be stacked is 0282.
Page 556
4. SLEEP Instruction 4 (Standby or Watch Mode Setting) When the trap address is the SLEEP instruction and the instruction immediately preceding the SLEEP instruction is that of 1 state or 2 states or more and prefetch occurs in the last state, this puts in the standby (watch) mode after execution of the SLEEP instruction.
5. SLEEP Instruction 5 (Standby or Watch Mode Setting) When the trap address is the next instruction to the SLEEP instruction, this puts in the standby (watch) mode after execution of the SLEEP instruction. After that, if the standby (watch) mode is cancelled by the NMI interruption, transition is made to the NMI interrupt following the CCR and PC (at the address of 0266) stack saving and vector reading.
Page 558
0296 MOV.B R2L, @Port 029A 029C Set one of these to the 029E trap address 02A0 02A2 02A4 Start of general interrupt processing Data Data instruc- instruc- instruc- instruc- tion tion tion tion write read Range of start of ATC pre-fetch pre-fetch pre-fetch...
Page 559
2. In case of NMI When the NMI interruption request is made at the timing in (1) (A) against the ATC interrupt request, the interrupt appears to take place in NMI at the timing earlier than usual, because higher priority is assigned to the NMI interrupt processing. The ATC interrupt processing starts after fetching the instruction at the starting address of the NMI interrupt processing.
Page 560
Figure 25.22 Competing Interrupt (In Case of NMI) Rev. 1.0, 02/00, page 553 of 1141...
Section 26 Servo Circuits 26.1 Overview 26.1.1 Functions Servo circuits for a video cassette recorder are included on-chip. The functions of the servo circuits can be divided into four groups, as listed in table 26.1. Table 26.1 Servo Circuit Functions Group Function Description...
Page 562
26.1.2 Block Diagram Figure 26.1 shows a block diagram of the servo circuits. PPG0 to 7/ PPG0 to 7/ (P70 to 77) (P70 to 77) RP0 to 7/ RP0 to 7/ (P60 to 67, (P60 to 67, P74 to 77) P74 to 77) EXTTRG(P86) Csync...
26.2 Servo Port 26.2.1 Overview This LSI is equipped with seventeen pins dedicated to the servo circuit and twenty-five pins multiplexed with general-purpose ports. It also has an input amplifier to amplify CTL signals, a CTL output amplifier, a CTL Schmitt comparator, and a CFG zero cross type comparator. The CTL input amplifier allows gain adjustment by software.
Page 564
2. CFG Input Circuit The CFG input pin has an amplifier and a zero cross type comparator. Figure 26.3 shows the input circuit of CFG. P250 VREF CFGCOMP M250 CFGCOMP VREF Res+ModuleSTOP Figure 26.3 CFG Input Circuit Rev. 1.0, 02/00, page 558 of 1141...
Page 565
3. CTL Input Circuit The CTL input pin has an amplifier. Figure 26.4 shows the input circuit of CTL. AMPON AMPSHORT (PB-CTL) (REC-CTL) CTLGR3 to 1 CTLFB CTLGR0 PB-CTL(+) PB-CTL(-) CTL( CTL(+) CTLREF CTLBias CTLFB CTLAmp(o) CTLSMT(i) Note Note: Be sure to connect a capacitor between CTLAmp (o) and CTLSMT (i) Figure 26.4 CTL Input Circuit Rev.
26.2.3 Pin Configuration Table 26.2 shows the pin configuration of the servo circuit. P30, P31, and P81 to P87 are general- purpose ports. As for P3, P6, P7, and P8, see section 10, I/O Port. Table 26.2 Pin Configuration Name Abbrev.
26.2.4 Register Configuration Table 26.3 shows the register configuration of the servo port section. Table 26.3 Register Configuration Name Abbrev. Size Initial Value Address Servo port mode register SPMR Byte H'5F H'D0A0 Servo monitor control register SVMCR Byte H'C0 H'D0A3 CTL gain control register CTLGR Byte...
Page 568
Servo Monitor Control Register (SVMCR) Bit : — — SVMCR5 SVMCR4 SVMCR3 SVMCR2 SVMCR1 SVMCR0 Initial value : R/W : — — SVMCR is an 8-bit read/write register that selects the monitor signal output from the SV1 and SV2 pins when the P30/SV1 pin is used as the SV1 monitor output pin or when the P31/SV2 pin is used as the SV2 monitor output pin.
Page 569
Bits 2 to 0 SV1 Pin Servo Monitor Output Control (SVMCR2 to SVMCR0): Select the servo monitor signal output from the SV1 pin. Bit 2 Bit 1 Bit 0 SVMCR2 SVMCR1 SVMCR0 Description Outputs REF30 signal to SV1 output pin. (Initial value) Outputs CAPREF30 signal to SV1 output pin.
Page 570
Bit 4 SW Bit of the Feedback Section of CTL Amplifier (CTLFB): Turns on or off the switch of the feedback section to adjust the gain. See figure 26.4. Bit 4 CTLFB Description Turns off CTLFB SW (Initial value) Turns on CTLFB SW Bits 3 to 0...
26.2.6 DFG/DPG Input Signals DFG and DPG signals can be input either as separate signals or as an overlapped signal. When the latter is selected (PMR87 = 1), take care to control the input levels of DFG and DPG. Figure 26.5 shows DFG/DPG input signals.
26.3 Reference Signal Generators 26.3.1 Overview The reference signal generators consist of a REF30 signal generator and a CREF signal generator and create the reference signals (REF30 and CREF signals) used in phase comparison, etc. The REF30 signal is used to control the phase of the drum and capstan. The CREF signal is used if REF30 signal cannot be used as the reference signal to control the phase of the capstan in REC mode.
Page 573
Figure 26.6 REF30 Signal Generator Rev. 1.0, 02/00, page 567 of 1141...
26.3.4 Register Description Reference Period Mode Register (RFM) Bit : OD/EV Initial value : R/W : RFM is an 8-bit write-only register which determines the operational state of the reference signal generators. If a read is attempted, an undetermined value is read out. It is initialized to H'00 by a reset and in stand-by and module stop modes.
Page 576
Bit 5 Manual Selection Bit (CVS): Selects whether the REF30 signal is generated synchrously with VD or it is operated in free-run state in the manual mode (VNA = 0). (This selection is ignored in PB mode except in TBC mode.) Bit 5 Description Synchronous with VD...
Page 577
Bit 1 Video FF Counter Set (VST): Selects whether the REF30 counter register value is set on or off by the Video FF signal when the drum phase is in FIX on in the PB mode. Bit 1 Description Counter set off by Video FF signal (Initial value)
Page 578
Reference Period Register 2 (CRF) Bit : CRF15 CRF14 CRF13 CRF12 CRF11 CRF10 CRF9 CRF8 CRF7 CRF6 CRF5 CRF4 CRF3 CRF2 CRF1 CRF0 Initial value : R/W : The reference period register 2 (CRF) is an 16-bit write-only buffer register which generates the reference signals to control the capstan phase (CREF).
Page 579
Reference Period Mode Register 2 (RFM2) Bit : Initial value : R/W : REM2 is an 8-bit read/write register which determines the operational state of the reference signal generators.
26.3.5 Operation • Operation of REF30 Signal Generator The REF30 signal generator generates the reference signals required to control the phase of the drum and capstan. To generate the REF30 signal, set the 1/2 the reference period to the reference period register 1 (RFD) corresponding to the 50 percent duty cycle.
Page 581
• Timing of the REF30 Signal Generation Figures 26.8 to 26.12 show the timing of the generation of REF30 and REF30P signals. Counter set Counter set Counter set Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) REF30 REF30P...
Page 582
Field signal Selected VD (OD/EV=0) Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period Counter mask Masking period (clear signal mask) About 75% REF30 REF30P Drum phase counter Sampling Sampling Sampling Figure 26.9 Generation of Reference Signal in Record Mode (Normal Operation)
Page 583
Field signal Drop-out of V Selected VD (OD/EV=0) Cleared Cleared Cleared Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period About 75% About 75% About 75% Counter mask Masking period (clear signal mask) About...
Page 584
Field signal Dislocation of V Selected VD (OD/EV=0) Cleared Cleared Cleared Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period About 75% About 75% Counter mask Masking period (clear signal mask) About 75% About 75% REF30...
Page 585
External sync signal Cleared Cleared Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Reset REF30 REF30P Figure 26.12 Generation of REF30 Signal by the External Sync Signal • CREF Signal Generator The CREF signal generator generates the CREF signal which is the reference signal to control the phase of capstan.
Page 586
• Timing Chart of the CREF Signal Generation Figures 26.13 to 26.15 show the generation of CREF signal. Cleared Cleared Cleared Value set in reference period register 2 (CRF) Counter Toggle signal CREF Figure 26.13 Generation of CREF Signal Rev. 1.0, 02/00, page 580 of 1141...
Page 587
Cleared Cleared Cleared Value set in reference period register 2 (CRF) Counter REC/PB Toggle signal Period set in CRF CREF PB(ASM) Figure 26.14 CREF Signal when PB is Switched to REC (when CRD Bit = 0) Rev. 1.0, 02/00, page 581 of 1141...
Page 588
Cleared Cleared Cleared Value set in reference period register 2 (CRF) Counter REC/PB DVCFG2 Toggle signal Period set in CRF CREF PB(ASM) Figure 26.15 CREF Signal when PB is Switched to REC (when CRD Bit = 1) Rev. 1.0, 02/00, page 582 of 1141...
Page 589
Figures 26.16 and 26.17 show REF30 (REF30P) when PB is switched to REC. REC(ASM) Field signal VD (except in PB) Selected VD* (OD/EV=0) REC/PB Value set in reference Cleared Cleared Cleared Cleared period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask...
Page 590
REC(ASM) Field signal VD (except in PB) Selected VD (OD/EV=0) REC/PB Value set in reference Cleared Cleared period register 1 (RFD) Cleared Counter Value set in REF30 counter register (RFC) Masking Toggle mask period Counter mask Masking period (Clear signal mask) About Cleared REF30...
Page 591
Figures 26.18 to 26.21 show REF30 (REF30P) when PB is switched to REC (where FDS bit = 1). REC(ASM) REC/PB VD (except in PB) Value set in reference Cleared Cleared Cleared period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask...
Page 592
REC(ASM) REC/PB VD (except in PB) Value set in reference period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period Counter mask Masking period (Clear signal mask) REF30 REF30P FDS bit = 1 Figure 26.19 Generation of the Reference Signal when PB is Switched to REC where RFD Bit is 1 (when VD Signal is Not Detected) (2) Rev.
Page 593
REC(ASM) REC/PB VD (except in PB) Value set in reference Cleared Cleared period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period Counter mask Masking period (Clear signal mask) 25% max. REF30 REF30P FDS bit = 1 Figure 26.20 Generation of the Reference Signal when PB is Switched to REC where RFD Bit is 1 (3) Rev.
Page 594
REC(ASM) REC/PB VD (except in PB) Value set in reference Cleared Cleared period register 1 (RFD) Counter Value set in REF30 counter register (RFC) Masking Toggle mask period Counter mask Masking period (Clear signal mask) 25% max. REF30 REF30P FDS bit = 1 Figure 26.21 Generation of the Reference Signal when PB is Switched to REC where RFD Bit is 1 (4) Rev.
26.4 HSW (Head-switch) Timing Generator 26.4.1 Overview The HSW timing generator consists of a 5-bit DFG counter, a 16-bit timer counter, a matching circuit, and two 31-bit 10-stage FIFOs. The 5-bit counter counts the DFG pulses following a DPG pulse. Each of them determines the timing to reset the 16-bit timer counter for each field.
Page 596
Figure 26.22 Block Diagram of the HSW Timing Generator Rev. 1.0, 02/00, page 590 of 1141...
26.4.3 HSW Timing Generator Configuration The HSW timing generator is composed of the elements shown in table 26.5. Table 26.5 Configuration of the HSW Timing Generator Element Function HSW mode register 1 (HSM1) Confirmation/determination of this circuits' operating status HSW mode register 2 (HSM2) Confirmation/determination of this circuits' operating status HSW loop stage number setting register...
26.4.4 Register Configuration Table 26.6 shows the register configuration of the HSW timing generator. Table 26.6 Register Configuration Name Abbrev. Size Initial Value Address HSW mode register 1 HSM1 Byte H'30 H'D060 HSW mode register 2 HSM2 Byte H'00 H'D061 HSW loop stage number setting HSLP Byte...
Page 599
Bit 7 FIFO2 Full Flag (FLB): When the FLB bit is 1, it indicates that the FIFO2 is full of the timing pattern data and the output pattern data. If a write is attempted in this state, the write operation becomes invalid, an interrupt is generated, the OVWB flag (bit 3) is set to 1, and the write data is lost.
Page 600
Bit 3 FIFO2 Overwrite Flag (OVWB): If a write is attempted when the FIFO2 is full of the timing pattern data and the output pattern data (FLB bit = 1), the write operation becomes invalid, an interrupt is generated, the OVWB flag is set to 1, and the write data is lost. Wait until space becomes available in the FIFO2, then write again.
Page 601
HSW Mode Register 2 (HSM2) Bit : FGR2OFF ISEL1 SOFG VFF/NFF Initial value : R/W : HSM2 is an 8-bit register which confirms and determines the operational state of the HSW timing generator. Bit 1 is a read-only bit, and write is disabled. Bit 0 is a write-only bit, and if a read is attempted, an undetermined value is read out.
Page 602
Bit 4 DFG Edge Selection Bit (EDG): Selects the edge by which to count DFG pulses. Bit 4 Description Counts by the rising edge of DFG (Initial value) Counts by the falling edge of DFG Bit 3 Interrupt Selection Bit (ISEL1): Selects the interrupt source. (IRRHSW1) Bit 3 ISEL1 Description...
Page 603
Bit 0 Output Switching Bit Between VideoFF and NarrowFF (VFF/NFF): Switches the signal output from the VideoFF pin. Bit 0 VFF/NFF Description VideoFF output (Initial value) NarrowFF output HSW Loop Stage Number Setting Register (HSLP) Bit : LOB3 LOB2 LOB1...
Page 604
Bits 7 to 4 FIFO2 Stage Number Setting Bits (LOB3 to LOB0): Set the number of FIFO2 stages in loop mode. They are valid only when the loop mode is set (LOP bit of HSM2 is 1). HSM2 HSLP Bit 5...
Page 605
Bits 3 to 0 FIFO1 Stage Number Setting Bits (LOA3 to LOA0): Set the number of FIFO1 stages in loop mode. They are valid only when the loop mode is set (LOP bit of HSM2 is 1). HSM2 HSLP Bit 5...
Page 606
FIFO Output Pattern Register 1 (FPDRA) Bit : ADTRGA STRIGA NarrowFFA VFFA AFFA VpulseA MlevelA — Initial value : — R/W : Bit : PPGA7 PPGA6 PPGA5 PPGA4 PPGA3 PPGA2 PPGA1 PPGA0 Initial value : R/W : Note : * Don't care FPDRA is a buffer register for the FIFO1 output pattern register.
Page 607
FIFO Output Pattern Register 2 (FPDRB) Bit : — ADTRGB STRIGB NarrowFFB VFFB AFFB VpulseB MlevelB Initial value : — R/W : Bit : PPGB7 PPGB6 PPGB5 PPGB4 PPGB3 PPGB2 PPGB1 PPGB0 Initial value : R/W : Note : * Don't care FPDRB is a buffer register for the FIFO2 output pattern register.
Page 608
FIFO Timing Pattern Register 1 (FTPRA) Bit : FTPRA15 FTPRA14 FTPRA13 FTPRA12 FTPRA11 FTPRA10 FTPRA9 FTPRA8 Initial value : R/W : Bit : FTPRA7 FTPRA6 FTPRA5 FTPRA4 FTPRA3 FTPRA2 FTPRA1 FTPRA0 Initial value : R/W : Note : * Don't care FTPRA is a register to write the timing pattern data of FIFO1.
Page 609
DFG Reference Register 1 (DFCRA) Bit : ISEL2 CCLR CKSL DFCRA4 DFCRA3 DFCRA2 DFCRA1 DFCRA0 Initial value : R/W : Note : * Don't care DFCRA is a register which determines the operation of the HSW timing generator as well as the starting point of the timing of FIFO1.
Page 610
Bit 5 16-bit Timer Counter Clock Source Selection Bit (CKSL): Selects the clock source of the 16-bit timer counter. Bit 5 CKSL Description φs/4 (Initial value) φs/8 Bits 4 to 0 FIFO1 Output Timing Setting Bits (DFCRA4 to DFCRA0): Determines the starting point of the timing of FIFO1.
Page 611
FIFO Timer Capture Register (FTCTR) Bit : FTCTR15 FTCTR14 FTCTR13 FTCTR12 FTCTR11 FTCTR10 FTCTR9 FTCTR8 Initial value : R/W : Bit : FTCTR7 FTCTR6 FTCTR5 FTCTR4 FTCTR3 FTCTR2 FTCTR1 FTCTR0 Initial value : R/W : FTCRT is a register to display the count of the 16-bit timer counter. FTCRT is an 16-bit read-only register.
26.4.6 Operation 5-Bit DFG Counter: The 5-bit DFG counter increments the count at the DFG edges selected by the EDG bit of HSW Mode Register 2. The DFG counter is cleared by a DPG rising edge, or by writing to the CCLR bit of the DFG reference register 1. 16-Bit Timer Counter: The 16-bit timer counter can operate in DFG reference mode or in free- running mode.
Page 613
• Loop Mode The data output cycle is repeated from stage 0 to the final stage selected in the HSW loop number setting register. As in single mode, the output pattern data is output when the timing pattern matches the counter value. In loop mode, the FIFO data is retained. Data in each FIFO group can be modified in loop mode.
Page 614
Figure 26.23 Example of Timing Waveform of HSW (for 12 DFG Pulses) Rev. 1.0, 02/00, page 608 of 1141...
Page 615
Internal bus FPDRA FPDRB FTPRA FTPRB FIFO1 FIFO2 Output select buffer Output data buffer Comparator φ Timer counter Output pattern data Figure 26.24 Example of Operation of the HSW Timing Generator Rev. 1.0, 02/00, page 609 of 1141...
Page 616
• Example of operation in single mode (20 stages of FIFO used) 1 Set to single mode (LOP = 0) 2 Write the output pattern data (PA0) to FPDRA. 3 Write the output timing (t ) to FTPRA. t is written in FIFO1 together with PA0. This initializes the output pattern data to PA0.
Page 617
• Example of the operation in loop mode mode 1 Set the number of loop stages in HSLP register (e.g. HSLP = H'44) 2 Write the output pattern data (PA0) to FPDRA. 3 Write the output timing (t ) to FTPRA. t is written in FIFO1 together with PA0.
26.4.7 Interrupts The HSW timing generator generates interrupts under the following conditions. 1 IRRHSW1 occurs when pattern data is written (OVWA, OVWB = 1) while FIFO is full (FULL). 2 IRRHSW1 occurs when matching is detected while the STRIG bit of FIFO is 1. 3 IRRHSW1 occurs when the values of the 16-bit timer counter and 16-bit timing pattern register match.
26.4.8 Cautions • When both the 5-bit DFG counter and 16-bit timer counter are operating, the latter is not cleared if input of DPG and DFG signals is stopped. This leads to free-running of the 16-bit timer counter, and periodical detection of matching by the 16-bit timer counter. In such a case, the period of the output from the HSW timing generator is independent from DPG or DFG.
26.5 High-Speed Switching Circuit for Four-Head Special Playback 26.5.1 Overview This high-speed switching circuit generates a color rotary signal (C.Rotary) and head-amplifier switching signal (H.Amp SW) for use in four-head special playback. A pre-amplifier output comparison result signal is input from the COMP pin. The signal output to the C.Rotary pin is a chroma signal processing control signal.
26.5.3 Pin Configuration Table 26.7 summarizes the pin configuration of the high-speed switching circuit for four-head special playback. If this circuit is not used, the pins can be used as I/O port. See section 26.2, Servo Port. Table 26.7 Pin Configuration Name Abbrev.
Page 622
Special Playback Control Register (CHCR) Bit : HSWPOL SIG3 SIG2 SIG1 SIG0 Initial value : R/W : CHCR is an 8-bit write-only register. It cannot be read. It is initialized to H'00 by a reset, or in standby or module stop mode. Bits 7...
Page 623
Bit 4 H.AmpSW Synchronization Control Bit (HAH): Synchronizes H.AmpSW signal with the OSCH signal. Bit 4 Description Synchronous (Initial value) Asynchronous Bits 3 to 0 Signal Control (SIG3 to SIG0): These bits, combined with the state of the COMP input pin, control the outputs at the C.Rotary and H.AmpSW pins.
26.6 Drum Speed Error Detector 26.6.1 Overview Drum speed error control holds the drum at a constant revolution speed, by measuring the period of the DFG signal. A digital counter detects the speed error against a preset value. The speed error data is processed and added to phase error data in a digital filter.
Page 625
Figure 26.27 Block Diagram of the Drum Speed Error Detector Rev. 1.0, 02/00, page 619 of 1141...
26.6.3 Register Configuration Table 26.9 shows the register configuration of the drum speed error detector. Table 26.9 Register Configuration Name Abbrev. Size Initial Value Address Specified DFG speed DFPR Word H'0000 H'D030 preset data register DFG speed error data DFER Word H'0000 H'D032...
26.6.4 Register Description Specified DFG Speed Preset Data Register (DFPR) Bit : DFPR15 DFPR14 DFPR13 DFPR12 DFPR11 DFPR10 DFPR9 DFPR8 Initial value : R/W : Bit : DFPR7 DFPR6 DFPR5 DFPR4 DFPR3 DFPR2 DFPR1 DFPR0 Initial value : R/W : The DFG speed preset data is set in DFPR.
Page 628
DFG Speed Error Data Register (DFER) Bit : DFER15 DFER14 DFER13 DFER12 DFER11 DFER10 DFER9 DFER8 Initial value : R/W : R*/W R*/W R*/W R*/W R*/W R*/W R*/W R*/W Bit : DFER7 DFER6 DFER5 DFER4 DFER3 DFER2 DFER1 DFER0 Initial value : R/W : R*/W R*/W...
Page 629
DFG Lock LOWER Data Register (DFRLDR) Bit : DFRLDR15 DFRLDR14 DFRLDR13 DFRLDR12 DFRLDR11 DFRLDR10 DFRLDR9 DFRLDR8 Initial value : R/W : Bit : DFRLDR7 DFRLDR6 DFRLDR5 DFRLDR4 DFRLDR3 DFRLDR2 DFRLDR1 DFRLDR0 Initial value : R/W : DFRLDR is a 16-bit write-only register used to set the lock range on the LOWER side when drum speed lock is detected, and to set the limit value on LOWER side when limiter function is in use.
Page 630
Bits 7 and 6 Clock Source Selection Bits (DFCS1, DFCS0): DFCS1 and DFCS0 select the clock to be supplied to the counter. (φs = fosc/2) Bit 7 Bit 6 DFCS1 DFCS0 Description φs (Initial value) φs/2 φs/4 φs/8 Bit 5...
Page 631
Bit 2 Drum Phase System Filter Computation Automatic Start Bit (DPCNT): Enables the filter computation of the phase system if an underflow occurred in the drum lock counter. Bit 2 DPCNT Description Disables the filter computation by detection of the drum lock. (Initial value) Enables the filter computation of the phase system when drum lock is detected.
26.6.5 Operation The drum speed error detector detects the speed error based on the reference value set in the DFG specified speed preset register (DFPR). The reference value set in DFPR is preset in the counter by NCDFG signal, and the counter decrements the count by the selected clock. The timing of the counter presetting and the error data latching can be selected between the rising or falling edge of NCDFG signal.
Page 633
• Interrupt request IRRDRM1 is generated by the NCDFG signal latch and the overflow of the error detection counter. IRRDRM2 is generated by detection of lock (after the detection of the specified number of times of locking). NCDFG signal Error data latch signal (DFG ↑) Preset data load signal...
Page 634
26.6.6 Correction in Trick Play Mode In trick play mode, the tape speed relative to the video head changes. This change alters the horizontal sync signal (f ), causing skew. To correct the skew, the drum motor speed must be shifted to a different speed in each trick play mode, so as to obtain the normal horizontal sync frequency.
26.7 Drum Phase Error Detector 26.7.1 Overview The drum phase control system must start after the drum motor has reached the specified revolution speed by the speed control system. Drum phase control works as follows in record and playback mode. •...
26.7.4 Register Description Drum Phase Preset Data Registers (DPPR1, DPPR2) DPPR1 Bit : — — — — DPPR19 DPPR18 DPPR17 DPPR16 Initial value : — — — — R/W : DPPR2 Bit : DPPR15 DPPR14 DPPR13 DPPR12 DPPR11 DPPR10 DPPR9 DPPR8 Initial value : R/W :...
Page 639
Drum Phase Error Data Registers (DPER1, DPER2) DPER1 Bit : — — — — DPER19 DPER18 DPER17 DPER16 Initial value : — — — — R*/W R*/W R*/W R*/W R/W : DPER2 Bit : DPER15 DPER14 DPER13 DPER12 DPER11 DPER10 DPER9 DPER8 Initial value :...
Page 640
Drum Phase Error Detection Control Register (DPGCR) Bit : DPCS1 DPCS0 DPOVF HSWES — — — Initial value : — — — R/(W)* R/W : Note: Only 0 can be written. DPGCR is an 8-bit read/write register that controls the operation of drum phase error detection. Bits 2-0 are reserved, bit 5 accepts only read and 0 write.
Bit 3 Edge Selection Bit (HSWES): Selects the edge of the error data latch signal (HSW or NHSW). Bit 3 HSWES Description Latches at the rising edge (Initial value) Latches at the falling edge Bits 2 to 0 Reserved: Cannot be modified and are always read as 1. 26.7.5 Operation The drum phase error detector detects the phase error based on the reference value set in the drum...
Page 642
REF30P HSW (NHSW)* Preset Preset Counter Latch Latch Preset value Preset value Note: Edge selectable Figure 26.30 Drum Phase Control in Playback Mode (HSW Rising Edge Selected) Reset Reset REF30P HSW (NHSW)* Preset Preset Counter Latch Latch Preset value Preset value Note: Edge selectable Figure 26.31 Drum Phase Control in Record Mode (HSW Rising Edge Selected) Rev.
26.7.6 Phase Comparison The phase comparison circuit measures the difference of time between the reference signal and the comparing signal with a digital counter. REF30 signal is used for the reference signal, and HSW signal (VideoFF) or NHSW signal (NarrowFF) from the HSW timing generator is used for the comparing signal.
26.8 Capstan Speed Error Detector 26.8.1 Overview Capstan speed control holds the capstan motor at a constant revolution speed, by measuring the period of the CFG signal. A digital counter detects the speed error against a preset value. The speed error data is added to phase error data in a digital filter. This filter controls a pulse-width modulated (PWM) output, which controls the revolution speed and phase of the capstan motor.
26.8.3 Register Configuration Table 26.11 shows the register configuration of the capstan speed error detector. Table 26.11 Register Configuration Name Abbrev. Size Initial Value Address Specified CFG speed CFPR Word H'0000 H'D050 preset data register CFG speed error data CFER Word H'0000 H'D052...
26.8.4 Register Description Specified CFG Speed Preset Data Register (CFPR) Bit : CFPR15 CFPR14 CFPR13 CFPR12 CFPR11 CFPR10 CFPR9 CFPR8 Initial value : R/W : Bit : CFPR7 CFPR6 CFPR5 CFPR4 CFPR3 CFPR2 CFPR1 CFPR0 Initial value : R/W : The 16-bit preset data that defines the specified CFG speed is set in CFPR.
Page 648
CFG Speed Error Data Register (CFER) Bit : CFER15 CFER14 CFER13 CFER12 CFER11 CFER10 CFER9 CFER8 Initial value : R/W : R*/W R*/W R*/W R*/W R*/W R*/W R*/W R*/W Bit : CFER7 CFER6 CFER5 CFER4 CFER3 CFER2 CFER1 CFER0 Initial value : R/W : R*/W R*/W...
Page 649
CFG Lock LOWER Data Register (CFRLDR) Bit : CFRLDR15 CFRLDR14 CFRLDR13 CFRLDR12 CFRLDR11 CFRLDR10 CFRLDR9 CFRLDR8 Initial value : R/W : Bit : CFRLDR7 CFRLDR6 CFRLDR5 CFRLDR4 CFRLDR3 CFRLDR2 CFRLDR1 CFRLDR0 Initial value : R/W : CFRLDR is a 16-bit write-only register used to set the lock range on the LOWER side when capstan speed lock is detected, and to set the limit value on LOWER side when limiter function is in use.
Page 650
Bits 7 and 6 Clock Source Selection Bits (CFCS1, CFCS0): CFCS1 and CFCS0 select the clock to be supplied to the counter. (φs = fosc/2) Bit 7 Bit 6 CFCS1 CFCS0 Description φs (Initial value) φs/2 φs/4 φs/8 Bit 5...
Page 651
Bit 2 Capstan Phase System Filter Computation Automatic Start Bit (CPCNT): Enables the filter computation of the phase system if an underflow occurred in the capstan lock counter. Bit 2 CPCNT Description Disables the filter computation by detection of the capstan lock. (Initial value) Enables the filter computation of the phase system when capstan lock is detected.
26.8.5 Operation The capstan speed error detector detects the speed error based on the reference value set in the CFG specified speed preset register (CFPR). The reference value set in CFPR is preset in the counter by the DVCFG signal, and the counter decrements the count by the selected clock. The timing of the counter presetting and the error data latching can be selected between the rising or falling edge of DVCFG signal.
Page 653
Error data latch signal (DVCFG) Preset data load signal Preset period Specified speed value (2 counts) Counter –value +value Preset value Latch data 0 (no error) Figure 26.33 Example of the Capstan Speed Error Detection Rev. 1.0, 02/00, page 647 of 1141...
26.9 Capstan Phase Error Detector 26.9.1 Overview The capstan phase control system must start operation after the capstan motor has reached the specified speed by the speed control system. The capstan phase control system operates as follows in record/playback mode: •...
Page 655
Figure 26.34 Block Diagram of Capstan Phase Error Detector Rev. 1.0, 02/00, page 649 of 1141...
26.9.4 Register Description Specified Capstan Phase Preset Data Registers (CPPR1, CPPR2) CPPR1 Bit : — — — — CPPR16 CPPR19 CPPR18 CPPR17 Initial value : — — — — R/W : CPPR2 Bit : CPPR15 CPPR14 CPPR13 CPPR12 CPPR11 CPPR10 CPPR9 CPPR8 Initial value :...
Page 658
Capstan Phase Error Data Registers (CPER1, CPER2) Bit : — — — — CPER19 CPER18 CPER17 CPER16 Initial value : R*/W R*/W R*/W R*/W R/W : — — — — Bit : CPER15 CPER14 CPER13 CPER12 CPER11 CPER10 CPER9 CPER8 Initial value : R*/W R*/W...
Page 659
Capstan Phase Error Detection Control Register (CPGCR) Bit : — — — CPCS1 CPCS0 CPOVF CR/RF SELCFG2 Initial value : — — — R/(W)* R/W : Note: Only 0 can be written CPGCR is an 8-bit read/write register that controls the operation of capstan phase error detection. Bits 2-0 are reserved, and bit 5 accepts only read and 0 write.
Bit 3 Latch Signal Selection Bit (SELCFG2): Selects the counter preset signal and the error data latch signal data in PB (ASM) mode. Bit 3 SELCFG2 Description Presets CAPREF30 signal; latches DVCTL signal (Initial value) Presets REF30P (CREF) signal; latches DVCFG2 signal Bits 2 to 0...
Page 661
CAPREF30 PB-CTL DVCTL DVCFG2 Preset Preset Counter Latch Latch Preset value Figure 26.35 Capstan Phase Control in Playback Mode REF30P CREF DVCFG2 Preset Preset Counter Latch Latch Preset value Figure 26.36 Capstan Phase Control in Record Mode Rev. 1.0, 02/00, page 655 of 1141...
26.10 X-Value and Tracking Adjustment Circuit 26.10.1 Overview To maintain compatibility with other VCRs, an on-chip adjustment circuit adjusts the phase of the reference signal (internal reference signal (REF30) or external reference signal (EXCAP)) during playback. Because of manufacturing tolerances, the physical distance between the video head and control head (the X-value: 79.244 mm) may vary from set to set, so when a tape that was recorded on a different set is played back, the phase of the reference signal may need to be adjusted.
Page 663
Figure 26.37 Block Diagram of X-Value Adjustment Circuit Rev. 1.0, 02/00, page 657 of 1141...
26.10.3 Register Description Register Configuration Table 26.13 shows the register configuration of X-value correction and tracking correction circuits. Table 26.13 Register Configuration Name Abbrev. Size Initial Value Address X-value and TRK-value XTCR Byte H'80 H'D074 control register X-value data register Word H'F000 H'D070...
Page 665
Bit 5 Capstan Phase Correction Auto/Manual Selection Bit (AT/08 08): Selects whether the generation of the correction reference signal (CAPREF30) for capstan phase control is controlled automatically or manually depending on the status of the ASM and REC/3% bits of CTL mode register.
Page 666
Bits 1 and 0 REF30P Division Ratio Selection Bit (DVREF1, DVREF0): Selects the division value of REF30P. If it is read-accessed, the counter value is read out. (The selected division value is set by the UDF of the counter.) Bit 1 Bit 0 DVREF1...
26.11 Digital Filters 26.11.1 Overview The digital filters required in servo control make extensive use of multiply-accumulate operations on signed integers (error data) and coefficients. A filter computation circuit (digital filter computation circuit) is provided in on-chip hardware to reduce the load on software, and to improve processing efficiency.
26.11.3 Arithmetic Buffer This buffer stores computational data used in the digital filters. See table 26.14. Write access is limited to the gain and coefficient data (Z ). The other data is used by hardware. None of the data can be read. Table 26.14 Arithmetic Buffer Register Configuration Buffer Data Length Arithmetic...
26.11.4 Register Configuration Table 26.15 shows the register configuration of the digital circuit. Table 26.15 Register Configuration Name Abbrev. Size Initial Value Address Capstan phase gain CGKp Word Undetermined H'D010 constant Capstan speed gain CGKs Word Undetermined H'D012 constant Capstan phase coefficient A Word Undetermined H'D014...
26.11.5 Register Description Gain Constants (DGKp, DGKs, CGKp, CGKs) Bit : Initial value : R/W : Note: * Initial value is uncertain. These registers are 16-bit write-only buffers that set accumulation gain of the digital filter. Only a word access is valid. Accumulation gain can be set to gain 1 value as maximum value. If a byte access is attempted, correct operation is not guaranteed.
Page 673
Offset (DOfp, DOfs, COfp, COfs) Bit : Initial value : R/W : Note: * Initial value is uncertain. These registers are 16-bit write-only buffers that set offset level of digital filter output. Only a word access is valid. If a byte access is attempted, correct operation is not guaranteed. If a read is attempted, an undetermined value is read out.
Page 674
Drum System Digital Filter Control Register (DFIC) Bit : DROV DPHA DZPON DZSON DSG2 DSG1 DSG0 — Initial value : — R/(W)* R/(W) R/W : Note: * Only 0 can be written DFIC is an 8-bit read/write register that controls the status of the drum digital filter and operating mode.
Page 675
Bit 4 Drum Phase System Z Initialization Bit (DZPON): Reflects the DZp value on Z of the phase system when computation processing of the drum phase system begins. If 1 is written, it is reflected on the computation, and then cleared to 0. Set this bit after writing data to DZp. Bit 4 DZPON Description...
Page 676
Capstan System Digital Filter Control Register (CFIC) Bit : — CROV CPHA CZPON CZSON CSG2 CSG1 CSG0 Initial value : — R/W : R/(W)* R/(W) Note: * Only 0 can be written CFIC is an 8-bit read/write register that controls the status of the capstan digital filter and operating mode.
Page 677
Bit 4 Capstan Phase System Z Initialization Bit (CZPON): Reflects the CZp value on Z the capstan phase system when computation processing of the phase system begins. If 1 is written, it is reflected on the computation, and then cleared to 0. Set this bit after writing data to CZp.
Page 678
Digital Filter Control Register (DFUCR) Bit : — — PTON CP/DP CFEPS DFEPS CFESS DFESS Initial value : — — R/W : DFUCR is an 8-bit read/write register which controls the operation of the digital filter. Only a byte access is valid. If a word access is attempted, correct operation is not guaranteed. It is initialized to H'00 by a reset, or in stand-by or module stop mode.
Page 679
Bit 3 Capstan Phase System Error Data Transfer Bit (CFEPS): Transfers the capstan phase system error data to the digital filter when the data write is enforced. Bit 3 CFEPS Description Error data is transferred by DVCFG2 signal latching. (Initial value) Error data is transferred when the data is written.
26.11.6 Filter Characteristics • Lag-Lead Filter A filter required for a servo loop is built in the hardware. This filter uses IIR (infinite impulse response) type digital filter (another type of the digital filter is FIR, i.e. finite impulse response type).
Page 681
• Frequency Characteristics The computation circuit repeats computation of the function, which is obtained by s-z conversion according to bi-linear approximation of the transfer function on the s-plane. Figure 26.41 shows the frequency characteristics of the lag-lead filter. 20log(f1/f2) Frequency (Hz) Figure 26.41 Frequency Characteristics of the Lag-Lead Filter The pulse transfer function G (Z) is obtained by the bi-linear approximation of the transfer G (S).
26.11.7 Operations in Case of Transient Response In case of transient response when the motor is activated, the digital filter computation circuit must prevent computation due to a large error. The convergence of the computations becomes slow and servo retraction deteriorates if a large error is input to the filter circuit when it is performing repeated computations.
Page 683
Usn-1 DZs11 to 0 DZp11 to 0 CZs11 to 0 Delay initialization CZp11 to 0 register DAs15 to 0 DBs15 to 0 DAp15 to 0 DBp15 to 0 CAs15 to 0 CBs15 to 0 initiali- CAp15 to 0 CBp15 to 0 zation bit DZSON DZPON...
26.12 Additional V Signal Generator 26.12.1 Overview The additional V signal generator outputs an additional vertical sync signal to take the place of Vsync in special playback. It is activated at both edges of the HSW signal output by the head- switch timing generator.
26.12.2 Pin Configuration Table 26.16 summarizes the pin configuration of the additional V signal. Table 26.16 Pin Configuration Name Abbrev. Function Additional V pulse pin Vpulse Output Output of additional V signal synchronized to video FF 26.12.3 Register Configuration Table 26.17 summarizes the register that controls the additional V signal. Table 26.17 Register Configuration Name Abbrev.
Page 686
Bit 3 High Impedance (HiZ): Set to 1 when the intermediate level is generated by an external circuit. Bit 3 Description Vpulse is a three-level output pin (Initial value) Vpulse is a three-state output pin (high, low, or high-impedance) Bits 2 to 0...
26.12.5 Additional V Pulse Signal Figure 26.44 shows the additional V pulse signal. The M level and V pulse signals are generated by the head-switch timing generator. The OSCH signal is combined with these to produce equalizing pulses. The polarity can be selected by the POL bit in the additional V control register (ADDVR).
Page 688
Additional V Pulses When Sync Signal is Not Detected: With additional V pulses, the pulse signal (OSCH) detected by the sync signal detector is superimposed on the V pulse and Mlevel signals generated by the head-switch timing generator. If there is a lot of noise in the input sync signal (Csync), or a pulse is missing, OSCH will be a complementary pulse, and therefore an H pulse of the period set in HRTR and HPWR will be superimposed.
Page 689
HSW signal edge M level signal V pulse signal OSCH Additional V pulse VPON=1, CUT=0, POL=0 Figure 26.46 Additional V Pulse When Negative Polarity Is Specified Rev. 1.0, 02/00, page 683 of 1141...
26.13 CTL Circuit 26.13.1 Overview The CTL circuit includes a Schmitt amplifier that amplifies and reshapes the CTL input, then outputs it as the PB-CTL signal to the servo, linear time counter, and other circuits. The PB-CTL signal is also sent to a duty discriminator in the CTL circuit that detects and records VISS, ASM, and VASS marks.
26.13.2 Block Diagram Figure 26.47 shows a block diagram of the CTL circuit. PB-CTL CTL mode IRRCTL Duty dis- VISS detect FW/RV criminator VISS control circuit detector VISS write REF30X Bit pattern register Write control circuit Duty I/O flag Internal bus Schmitt amplifier REC-...
26.13.5 Register Description CTL Control Register (CTCR) Bit : NT/PL FSLC FSLB FSLA LCTL UNCTL SLWM Initial value : R/W : CTCR is an 8-bit read/write register that controls PB-CTL rewrite and sets the slow mode. When CTL pulse cannot be detected with the input amplifier gain set at the CTL gain control register (CTLGR) in PB-CTL circuit, bit 1 (UNCTL) of CTCR is set to 1.
Page 694
Bits 3 Clock Source Select Bit (CCS): Selects clock source of CTL. Bit 3 Description φs (Initial value) φs/2 Bit 2 Long CTL Bit (LCTL): Sets the long CTL detection mode. Bit 2 LCTL Description Clock source (CCS) operates at the setting value (Initial value)
Page 695
CTL Mode Register (CTLM) Bit : REC/PB FW/RV Initial value : R/W : CTLM is an 8-bit read/write register that controls the operating state of the CTL circuit. If 1 is written in bits MD3 and MD2, they will be cleared to 0 one cycle (φ) later. CTLM is initialized to H'00 by a reset, and in standby mode and module stop mode.
Page 696
CTL input PB-CTL Figure 26.48 Internal PB-CTL Signal in Forward and Reverse Bits 4 to 0 CTL Mode Select (MD4 to MD0): These bits select the detect, record, and rewrite modes for VISS, VASS, and ASM marks. If 1 is written in bits MD3 and MD2, they will be cleared to 0 one cycle (φ) later.
Page 697
R/3 3 3 3 Mode Description • The duty I/O flag is set to 1 at VISS detect the point of write access to (index register CTLM detect) • The 1 pulses recognized by the duty discrimination circuit are counted in the VISS control circuit •...
Page 698
REC-CTL Duty Data Register 1 (RCDR1) Bit : — — — — CMT1B CMT1A CMT19 CMT18 CMT17 CMT16 CMT15 CMT14 CMT13 CMT12 CMT11 CMT10 Initial value : — — — — R/W : RCDR1 is a 12-bit write-only register that sets the REC-CTL rising timing. This setting is valid only for recording and rewriting, and is not used in detection.
Page 699
REC-CTL Duty Data Register 2 (RCDR2) Bit : — — — — CMT2B CMT2A CMT29 CMT28 CMT27 CMT26 CMT25 CMT24 CMT23 CMT22 CMT21 CMT20 Initial value : — — — — R/W : RCDR2 is a 12-bit write-only register that sets 1 pulse (short) falling timing of REC-CTL at recording and rewriting, and detects long/short pulses at detecting.
Page 700
REC-CTL Duty Data Register 3 (RCDR3) Bit : — — — — CMT3B CMT3A CMT39 CMT38 CMT37 CMT36 CMT35 CMT34 CMT33 CMT32 CMT31 CMT30 Initial value : R/W : — — — — RCDR3 is a 12-bit write-only register that sets 1 pulse (long) and assemble mark falling timing of REC-CTL at recording and rewriting, and detects long/short pulses at detecting.
Page 701
REC-CTL Duty Data Register 4 (RCDR4) Bit : — — — — CMT4B CMT4A CMT49 CMT48 CMT47 CMT46 CMT45 CMT44 CMT43 CMT42 CMT41 CMT40 Initial value : — — — — R/W : RCDR4 is a 12-bit write-only register that sets the timing of falling edge of the 0 pulse (short) of REC-CTL in record or rewrite mode.
Page 702
REC-CTL Duty Data Register 5 (RCDR5) Bit : — — — — CMT5B CMT5A CMT59 CMT58 CMT57 CMT56 CMT55 CMT54 CMT53 CMT52 CMT51 CMT50 Initial value : R/W : — — — — RCDR5 is a 12-bit write-only register that sets the timing of falling edge of the 0 pulse (short) of REC-CTL in record or rewrite mode.
Page 703
Duty I/O Register (DI/O) Bit : — VCTR2 VCTR1 VCTR0 BPON DI/O Initial value : — R/(W)* R/W : Note: * Only 0 can be written DI/O is an 8-bit register that confirms and determines the operating status of the CTL circuit. It is initialized to H'F1 by a reset, and in standby mode, module stop mode, and CTL stop mode.
Page 704
Bit 3 Bit Pattern Detection ON/OFF Bit (BPON): Determines ON or OFF of bit pattern detection. Note: When writing 1 to BPON bit, be sure to set appropriate data to RCDR 2 to 5 beforehand. Bit 3 BPON Description Bit pattern detection off...
Page 705
• VISS Detect Mode and VASS Detect Mode: The duty I/O flag indicates the result of duty discrimination. The duty I/O flag is 1 when the duty cycle of the PB-CTL signal is above 44% (a 0 pulse in the CTL signal). The duty I/O flag is 0 when the duty cycle of the PB-CTL signal is below 44% (a 1 pulse in the CTL signal).
Page 706
Bit Pattern Register (BTPR) Bit : LSP7 LSP6 LSP5 LSP4 LSP3 LSP2 LSP1 LSP0 Initial value : R/W : R/W* R/W* R/W* R/W* R/W* R/W* R/W* R/W* Note: * Write is prohibited when bit pattern detection is selected. BTPR is an 8-bit shift register which detects and records the bit pattern of the CTL pulses. If a CTL pulse is detected in PB or ASM mode, the register is shifted leftward at the rising edge of PB-CTL, and reflects the determined result of long/short on the bit 0 (long pulse = 1, short pulse = If BPON bit is set to 1 in PB mode, the register starts detection of bit pattern immediately after the...
26.13.6 Operation CTL Circuit Operation: As shown in figure 26.49, the CTL discrimination/record circuit is composed of a 16-bit up/down counter and 12-bit registers (×5). In playback (PB) mode, the 16-bit up/down counter counts on a φs/4 clock when the PB-CTL pulse is high, and on a φs/5 clock when low.
Page 708
The X-value is updated by REF30P. Modification of XDR must be performed before REF30P in the cycle in which the X-value is changed. X-value (XDR) is rewritten in this cycle REF30P X-value Latch after Preset change X-value Capstan phase control ASM mode, PB mode : REF30X-PB-CTL REC mode : REF30P-DVCFG2...
Page 709
The X-value is updated by REF30P. Modification of XDR must be performed before REF30P in the cycle in which the X-value is changed. X-value (XDR) is rewritten in this cycle REF30P X-value after change X value Capstan phase control ASM mode, PB mode: REF30X-PB-CTL REF30X PB-CTL REC-CTL...
26.13.7 CTL Input Section The CTL input section consists of an input amplifier of which gain can be controlled by the register setting and a Schmitt amplifier. Figure 26.52 shows a block diagram of the CTL input section. Trivial CTL pulse signal is received from the CTL head, amplified by the input amplifier, reshaped into a square wave by the Schmitt amplifier, and sent to the servo circuits, and the Timer L as the PB-CTL signal.
Page 711
CTL Detector: If the CTL detector fails to detect a CTL pulse, it sets the CTL control register (CTCR) bit 1 to 1 indicating that the pulse has not been detected. If a CTL pulse is detected after that, the bit is automatically cleared to 0. Duration used for determining detection or non- detection of the pulse depends on magnitude of phase shift of the last detected pulse from the reference phase (phase difference between REF30 and CTL signal).
Page 712
PB-CTL Waveform Shaper in Slow Mode Operation: If bit 0 in CTL control register (CTCR) is set to slow mode, slow reset function is activated. In slow mode, if falling edge is not detected within the specified time from rising edge detection, PB-CTL is forcibly shut down (slow reset). The time T (s) until the signal falls is the following interval after the rising edge of the internal CTL signal is detected:...
26.13.8 Duty Discriminator The duty discriminator circuit measures the period of the control signal recorded on the tape (PB- CTL signal) and discriminates its duty cycle. In VISS or VASS detection, the duty I/O flag is set or cleared according to the result of duty discrimination. The duty I/O flag is set to 1 when the duty cycle of the PB-CTL signal is above 44%, and is cleared to 0 when the duty cycle is below 44%.
Page 714
Input signal Short 1 pulse PB-CTL 25±0.5% Input signal Long 1 pulse PB-CTL 30±0.5% Input signal Short 0 pulse PB-CTL 57.5±0.5% Input signal Long 0 pulse PB-CTL 62.5±0.5% Input signal ASM mark PB-CTL 67 to 70% Figure 26.55 PB-CTL Signal Duty Cycle Rev.
Page 715
Figure 26.56 shows the duty discrimination circuit. A 44% duty cycle is discriminated by counting with the 16-bit up/down counter, using a φs/4 clock for the up-count and a φs/5 clock for the down-count. An up-count is performed when the PB-CTL signal is high, and a down-count when low.
Page 716
VISS (Index) Detect Mode: VISS detection is carried out by the VISS control circuit, which counts 1 pulses in the PB-CTL signal. If the pulse count detects any value set in the VISS interrupt setting bits (bits 5, 6, or 7 in the duty I/O register), an interrupt request is generated and the duty I/O flag is cleared to 0.
Page 717
Duty Detection Mode (VASS): VASS detection is carried out by the duty discriminator. Software can detect index sequences by reading the duty I/O flag at each CTL pulse. At each CTL pulse, the duty discriminator sends the result of duty discrimination to the duty I/O flag, and simultaneously generates an interrupt request.
Page 718
Detection of the Long/Short Pulse: The long/short pulse is detected in PB mode by the L/S determination based on the comparison of the REC-CTL duty register (RCDR2 to RCDR5) with the up/down counter and the results of the duty I/O flag. The results of the determination is stored in bit 0 (LSP0) of the bit pattern register (BTPR) at the rising edge of PB-CTL, shifting at the same time BTPR leftward.
26.13.9 CTL Output Section An on-chip control head amplifier is provided for writing the REC-CTL signal generated by the write control circuit onto the tape. The write control circuit controls the duty cycle of the REC-CTL signal in the writing of VISS and VASS sequences and ASM marks and the rewriting of VISS and VASS sequences.
Page 720
Internal bus RESET REF30X↑ Clear RCDR1 RCDR2or4 RCDR3or5 φs/4 UP/DOWN counter (12 bits) (12 bits) (12 bits) (12 bits) Upper 12 bits Compare Compare Compare REC-CTL rise timing REC-CTL1 pulse, REC-CTL 0 pulse fall ASM fall timing timing End of writing of one CTL pulse (except VISS) IRRCTL REF30X Counter...
Page 721
The 16-bit counter in the REC-CTL circuit continues counting on a clock derived by dividing the system clock φs (= f /2) by 4. The counter is cleared on the rise of REF30X in record mode, and on the rise of PB-CTL in rewrite mode. REC-CTL match detection is carried out by comparing the counter value with each RCDR value.
26.13.10 Trapezoid Waveform Circuit In rewriting, the trapezoid waveform circuit leaves the rising edge of the already-recorded PB- CTL signal intact, but changes the duty cycle. In rewriting, the CTL pulse is written with reference to the rise of PB-CTL. The CTL duty cycle for a rewrite is set in the REC-CTL duty data registers (RCDR2 to RCDR5).
26.13.11 Note on CTL Interrupt After a reset, the CTL circuit is in the VISS discrimination input mode. Depending on the CTL pin states, a false PB-CTL input pulse may be recognized and an interrupt request generated. If the interrupt request will be enabled, first clear the CTL interrupt request flag.
26.14 Frequency Dividers 26.14.1 Overview On-chip frequency dividers are provided for the pulse signal picked up from the control track during playback (the PB-CTL signal), and the pulse signal received from the capstan motor (CFG signal). The CTL frequency divider generates a CTL divided control signal (DVCTL) from the PB-CTL signal, for use in capstan phase control during high-speed search, for example.
Page 725
DVCTL Control Register (CTVC) Bit : Initial value : R/W : CTVC consists of the external input signal selection bits and the flags which show the CFG, HSW, and CTL levels. Note: It has an undetermined value by a reset or in stand-by mode. Bit 7...
Page 726
Bit 1 HSW Flag (HSW): Shows the level of the HSW signal selected by the VFF/NFF bit of the HSW mode register 2 (HSM2). Bit 1 Description HSW is at low level (Initial value) HSW is at high level Bit 0...
Page 727
Operation: During playback, control pulses recorded on the tape are picked up by the control head and input to the CTL pin. The control pulse signal is amplified by a Schmitt amplifier, reshaped, then input to the CTL frequency divider as the PB-CTL signal. This circuit is employed when the control pulse (PB-CTL signal) is used for phase control of the capstan motor.
Page 728
26.14.3 CFG Frequency Divider Block Diagram: Figure 26.65 shows a block diagram of the 7-bit CFG frequency divider and its mask timer. Internal bus CDVC CDIVR(7 bits) CDVC CDVC MCGin Edge Down counter (7 bits) select DVCFG ↑, ↑↓ Down counter (7 bits) DVCFG2 PB(ASM)→REC CDVC...
Page 729
Register Description: • Register configuration Table 26.23 shows the register configuration of the CFG frequency division circuit. Table 26.23 Register Configuration Name Abbrev. Size Initial Value Address DVCFG control register CDVC Byte H'60 H'D09A CFG frequency division CDIVR1 Byte H'80 H'D09B register 1 CFG frequency division...
Page 730
Bit 5 CFG Mask Status Bit (CMK): Indicates the status of the mask. It is initialized to 1 by a reset, or in stand-by or module stop mode. Bit 5 Description Indicates that the capstan mask timer has released masking Indicates that the capstan mask timer is currently masking (Initial value) Bit 4...
Page 731
Bits 1 and 0 CFG Mask Timer Clock Selection Bits (CPS1, CPS0): Selects the clock source for the CFG mask timer. (φs = fosc/2) Bit 1 Bit 0 CPS1 CPS0 Description φs/1024 (Initial value) φs/512 φs/256 φs/128 CFG Frequency Division Register 1 (CDIVR1) Bit : CDV16...
Page 732
CFG Frequency Division Register 2 (CDIVR2) Bit : CDV26 CDV25 CDV24 CDV23 CDV22 CDV21 CDV20 — Initial value : R/W : — CDIVR2 is an 8-bit write-only register to set the division value. If a read is attempted, an undetermined value is read out. Bit 7 is reserved. The frequency division value is written in the reload register and the down counter at the same time.
Page 733
Operation: • Frequency divider The CFG pulses output from the capstan motor are sent to internal circuitry as the CFG signal via the zero-cross type comparator. The CFG signal, shaped into a rectangular waveform by a reshaping circuit, is divided by the CFG frequency dividers, and used in servo control. The rising edge or both edges of the CFG signal can be selected for the frequency divider.
Page 735
• Mask timer The capstan mask timer is a 6-bit reload timer that uses a prescaled clock as a clock source. The mask timer is used for masking DVCFG signal intended for controlling the capstan speed. The capstan mask timer prevents edge detection to be carried out for an unnecessarily long duration by masking the edge detection for a certain period.
Page 736
Figures 26.68 and 26.69 show examples of CFG mask timer operations. CFG (racing) Edge detect Capstan motor Mask interval Mask interval mask timer DVCFG Cleared by wiring 0 after reading 1 MCGin flag Figure 26.68 CFG Mask Timer Operation (When Capstan Motor is Racing) Edge detect Capstan motor Mask interval...
26.14.4 DFG Noise Removal Circuit Block Diagram: Figure 26.70 shows the block diagram of the DFG noise removal circuit. Rising edge NCDFG detection Falling edge detection Delay circuit delay = 2φ Figure 26.70 DFG Noise Removal Circuit Register Description: Table 26.24 shows the register configuration of the DFG mask circuit. Table 26.24 Register Configuration Name Abbrev.
Page 738
Bit 0 DFG Edge Selection Bit (DRF): Selects the edge of the NCDFG signal used in the drum speed error detector. Bit 0 Description Selects the rising edge of NCDFG signal (Initial value) Selects the falling edge of NCDFG signal Operation The DFG noise removal circuit generates a signal (NCDFG signal) as a result of removing noise (signal fluctuation smaller than 2 φ) from the DFG signal.
26.15 Sync Signal Detector 26.15.1 Overview This block performs detection of the horizontal sync signal (Hsync) and vertical sync signal (Vsync) from the composite sync signal (Csync), noise counting, and field detection. It detects the horizontal and vertical sync signals by setting threshold in the register and based on the servo clock (φs = fosc/2).
26.15.2 Block Diagram Figure 26.72 shows the block diagram of the sync signal detector. Figure 26.72 Block Diagram of the Sync Signal Detector Rev. 1.0, 02/00, page 734 of 1141...
26.15.3 Pin Configuration Table 26.25 shows the pin configuration of the sync signal detector. Table 26.25 Pin Configuration Name Abbrev. Function Composite sync signal input pin Csync Input Composite sync signal input 26.15.4 Register Configuration Table 26.26 shows the register configuration of the sync signal detector. Table 26.26 Register Configuration Name Abbrev.
26.15.5 Register Description Vertical Sync Signal Threshold Register (VTR) Bit : — — VTR5 VTR4 VTR3 VTR2 VTR1 VTR0 Initial value : R/ W : — — VTR is an 8-bit write-only register that sets the threshold for the vertical sync signal when the signal is detected from the composite sync signal.
Page 743
Horizontal Sync Signal Threshold Register (HTR) Bit : HTR3 HTR2 HTR1 HTR0 — — — — Initial value : R/W : — — — — HTR is an 8-bit write-only register that sets the threshold for the horizontal sync signal when the signal is detected from the composite sync signal.
Page 744
Example The values set to detect the vertical and horizontal sync signals (SEPV, SEPH) from Csync are required to meet the following conditions. Assumed that the set values in VTHR register were VVTH and HVTH, (VVTH-1) × 2/φs > Hpulse (HVTH-2) ×...
Page 745
H Complement Start Time Setting Register (HRTR) Bit : HRTR7 HRTR6 HRTR5 HRTR4 HRTR3 HRTR2 HRTR1 HRTR0 Initial value : R/W : HRTR is an 8-bit write-only register that sets the timing to generate a complementary pulse if a pulse of the horizontal sync signal is missing. If a read is attempted, an undetermined value is read out.
Page 746
Noise Detection Window Setting Register (NWR) Bit : — — NWR5 NWR4 NWR3 NWR2 NWR1 NWR0 Initial value : R/W : — — NWR is an 8-bit write-only register that sets the period (window) when the drop-out of the horizontal sync signal pulse is detected and the noise is counted. Set the timing of the noise detection window in bits 5 to 0.
Page 747
Sync Signal Control Register (SYNCR) Bit : — — — — NIS/VD NOIS SYCT Initial value : — — — — R/W : R/(W)* Note: * Only 0 can be written SYNCR is an 8-bit register that controls the noise detection, field detection, polarity of the sync signal input, etc.
Page 748
Bit 1 Field Detection Flag (FLD): Indicates whether the field currently being scanned is even or odd. See figure 26.74. Bit 1 Description Odd field (Initial value) Even field Bit 0 Sync Signal Polarity Selection Bit (SYCT): Selects the polarity of the sync signal (Csync) to be input.
Page 749
Composite sync signal SEPV Noise detection window Field detection flag (FLD) Even field (a) Even field Composite sync signal SEPV Noise detection window Field detection flag (FLD) Odd field (b) Odd field Figure 26.74 Field Detection Rev. 1.0, 02/00, page 743 of 1141...
26.15.6 Noise Detection If a pulse of the horizontal sync signal is missing, a complementary pulse is set at the timing set in HPWR and with the set pulse width. Set the noise detection window with HWR of about 1/4 of the horizontal sync signal, and the pulse with equal high and low periods will be obtained.
Page 751
A horizontal sync The pulse in the mask pulse is missing period is ignored SEPH H counter H'00 H'E8 H reload counter Don't mask immediately Mask Mask Mask Mask after period period period period complement. Noise mask for H counter OSCH Mask Mask...
Page 752
Noise Detection Operation: The noise detector considers an irregular pulse of the composite sync signal (Csync) and a chip of a horizontal sync signal pulse within a frame as noise. The noise counter takes counts of the irregular pulses during the high period of the noise detection window and the chips and drop-outs of the horizontal sync signal pulses during the low period.
26.15.7 Activation of the Sync Signal Detector After release of reset or transition from the power down mode to the active mode, the sync signal detector starts operation by a sync signal input after release of module stop. The pulse of the polarity specified by the SYCT bit of the sync signal control register (SYNCR) is input to the detector.
26.16 Servo Interrupt 26.16.1 Overview The interrupt exception processing of the servo module is started by one of ten factors, i.e. the drum speed error detector (×2), drum phase error detector, capstan speed error detector (×2), capstan phase error detector, HSW timing generator (×2), sync detector, and CTL circuit. For these interrupt factors, see each of their circuit sections of this manual.
Page 755
Bit 7 Drum Phase Error Detection Interrupt Enable Bit (IEDRM3) Bit 7 IEDRM3 Description Disables the request of the interrupt by IRRDRM3 (Initial value) Enables the request of the interrupt by IRRDRM3 Bit 6 Drum Speed Error Detection (Lock Detection) Interrupt Enable Bit (IEDRM2) Bit 6 IEDRM2 Description...
Page 756
Bit 2 Capstan Speed Error Detection (OVF, Latch) Interrupt Enable Bit (IECAP1) Bit 2 IECAP1 Description Disables the request of the interrupt by IRRCAP1 (Initial value) Enables the request of the interrupt by IRRCAP1 Bit 1 HSW Timing Generation (counter clear, capture) Interrupt Enable Bit (IEHSW2) Bit 1 IEHSW2 Description...
Page 757
Servo Interrupt Enable Register 2 (SIENR2) Bit : — — — — — — IESNC IECTL Initial value : R/W : — — — — — — SIENR2 is an 8-bit read/write register that enables or disables interrupts in the servo section. It is initialized to H'FC by a reset, stand-by or module stop.
Page 758
Servo Interrupt Request Register 1 (SIRQR1) Bit : IRRDRM3 IRRDRM2 IRRDRM1 IRRCAP3 IRRCAP2 IRRCAP1 IRRHSW2 IRRHSW1 Initial value : R/W : R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* Note: * Only 0 can be written to clear the flag. SIRQR1 is an 8-bit read/write register that indicates interrupt request in the servo section.
Page 759
Bit 4 Capstan Phase Error Detector Interrupt Request Bit (IRRCAP3) Bit 4 IRRCAP3 Description No interrupt request from the capstan phase error detector. (Initial value) Interrupt requested from the capstan phase error detector. Bit 3 Capstan Speed Error Detector (Lock Detection) Interrupt Request Bit (IRRCAP2) Bit 3 IRRCAP2 Description...
Page 760
Bit 0 HSW Timing Generator (OVW, Matching, STRIG) Interrupt Permission Bit (IRRHSW1) Bit 0 IRRHSW1 Description No interrupt request from the HSW timing generator (OVW, matching, STRIG). (Initial value) Interrupt requested from the HSW timing generator (OVW, matching, STRIG). Rev.
Page 761
Servo Interrupt Request Register 2 (SIRQR2) Bit : IRRSNC IRRCTL — — — — — — Initial value : — — — — — — R/(W)* R/(W)* R/W : Note: * Only 0 can be written to clear the flag. SIRQR2 is an 8-bit read/write register that indicates interrupt request in the servo section.
Section 27 Sync Separator for OSD and Data Slicer 27.1 Overview The sync separator separates the horizontal sync signal and vertical sync signal from the composite video signal input from the CVin2 terminal and sends the sync signals to the on screen display (OSD) module and data slicer.
27.1.1 Features • Horizontal sync signal separation: Stable separation is provided by the AFC, and complement and mask functions are available. • AFC reference clock frequency: 576 or 448 times the frequency of the horizontal sync signal can be selected. •...
27.1.3 Pin Configuration Table 27.1 shows the pin configuration of the sync separator. Table 27.1 Sync Separator Pin Configuration Name Abbrev. Function Sync signal Csync/Hsync Input/output Composite sync signal input/output or input/output horizontal sync signal input VLPF/Vsync Input Pin for connecting external LPF for vertical sync signal or input pin for vertical sync signal AFC oscillation...
27.2 Register Description 27.2.1 Sync Separation Input Mode Register (SEPIMR) Bit : CCMPV1 CCMPV0 COMPSL SYNCT VSEL DLPFON — FRQSEL Initial value : R/W : — The SEPIMR is an 8-bit read/write register for selecting the source signals for sync separation. In addition to the internal switches controlled by this register setting, the external circuits are used to select the sources of the Hsync and Vsync signals to be supplied to the digital H separation counter and the digital V separation counter, respectively.
Page 768
Bit 5 Csync Separation Comparator Input Select (CCMPSL): Controls internal switch SW5 to select whether to use the Csync separation comparator input or Csync Schmitt input. Writing 0 to this bit selects the Csync separation comparator input, and writing 1 selects the Csync Schmitt input.
Page 769
Bit 2 Digital LPF Control (DLPFON): Specifies the digital LPF function, which masks noise components of the Vsync signal in a weak field. The digital LPF logically ORs the Csync signal (Vsync signal) and the SEPH signal that is separated by the digital H separation counter, then inputs the ORed result to the digital V separation counter.
27.2.2 Sync Separation Control Register (SEPCR) Bit : AFCVIE AFCVIF VCKSL VCMPON HCKSEL HHKON — Initial value : R/W : R/(W)* — Note: * Only 0 can be written to clear the flag. The SEPCR is an 8-bit read/write register for controlling the external Vsync interrupt, enabling or disabling the V complement function, selecting the clock source for the V complement and mask counter, selecting the clock source for the internal Csync generator, and indicating the field detected by the AFC.
Page 771
Bit 5 V Complement and Mask Counter Clock Source Select (VCKSL): Selects the clock source for the V complement and mask counter: double the frequency of the horizontal sync signal for the AFC (AFCH signal) or that for the H complement and mask counter (OSCH signal). When the text display mode is selected for the OSD and internally generated Hsync signal is selected as the reference Hsync signal for the AFC by setting the HSEL bit (bit 5) of the SEPACR, setting this VCKSL bit to 1 enables the external Vsync signal to be detected irrespectively of the text display...
Page 772
Bit 2 HHK Forcibly Turned On (HHKON): Forcibly operates the half Hsync killer (HHK) function when the H complement and mask counter interpolates complementary pulses three successive times. When the HVTHR is set within the range from 2.35 µs to 4.7 µs to remove equalizing pulses by using the digital H separation counter, the HHK function prevents Hsync- Vsync phase-difference errors during the V blanking period.
27.2.3 Sync Separation AFC Control Register (SEPACR) Bit : NDETIE NDETIF HSEL — — ARST — — Initial value : R/W : R/(W)* — — — — Note: * Only 0 can be written to clear the flag. The SEPACR is an 8-bit read/write register for controlling the AFC. The AFC generates a reference clock of 576 or 448 times the frequency of the horizontal sync signal.
Page 774
Bit 5 Reference Hsync Signal Select (HSEL): Selects the reference Hsync signal for the AFC: the external Hsync signal or the internally generated Hsync signal. When using the data slicer, select the external Hsync signal. When not using the data slicer but using the text display mode for the OSD, select the internally generated Hsync signal.
27.2.4 Horizontal Sync Signal Threshold Register (HVTHR) Bit : — — — HVTH4 HVTH3 HVTH2 HVTH1 HVTH0 Initial value : R/W : — — — The HVTHR is a 5-bit write-only register for specifying the threshold value for the digital H separation counter;...
Page 776
Csync HVTH Digital H separation counter SEPH About 3.2 µs to 2.0 µs Figure 27.4 HVTH Value and SEPH Generation Timing When Equalizing Pulses Are Not Detected The following shows examples of HVTHR settings. (HVTHR – 1) × (2/OSC) > 1.6 µs or 3.2 µs Condition: System clock OSC = 10 MHz 2/OSC = 5 MHz = 0.2 µs...
Page 777
Pulse lost Csync HVTH Digital H separation counter SEPH H complement and mask counter OSCH Comple- Comple- Hsync-Vsync ment ment phase-difference error Figure 27.5 Timing of Hsync-Vsync Phase-Difference Error When Equalizing Pulse Lost at Hsync Pulse Position Note: When 2.35-µs equalizing pulses are eliminated, the complement function operates for the eliminated period.
Csync HVTH Digital H separation counter SEPH H complement and mask counter Forcible HHK Forcible HHK operation operation OSCH Comple- Comple- Comple- Comple- Comple- Comple- ment ment ment ment ment ment Figure 27.7 Timing of HHK Operation When Complementary Pulses Inserted Three Successive Times While HHKON = 1 27.2.5 Vertical Sync Signal Threshold Register (VVTHR) Bit :...
Page 779
The following shows an example of VVTHR settings. (VVTHR – 1) × (2/OSC) > (Hsync period / 2 – 4.7 µs) × 1.5 = 41 µs Condition: System clock OSC = 10 MHz 2/OSC = 5 MHz = 0.2 µs Example 1: To detect 41-µs pulses Vsync detection threshold value: 41 µs 41 µs / 0.2 µs = 205...
Csync VVTH Digital H separation counter SEPV 1/2 AFCH (V sampling clock) V complement and mask counter AFCV Figure 27.10 AFCV Generation Timing When V Complement Function Is Enabled (for NTSC) 27.2.6 Field Detection Window Register (FWIDR) Bit : — —...
Page 781
Bit 0 Field Detection Flag (FLD): Indicates the field determined by the status of the field detection window signal generated by the AFC when the external Vsync signal (AFCV signal) rises. This flag is invalid when the internally generated Hsync signal is selected as the AFC reference Hsync signal.
27.2.7 H Complement and Mask Timing Register (HCMMR) Bit : HC8 HC7 HC6 HC5 HC4 HC3 HC2 HC1 HC0 HM6 HM5 HM4 HM3 HM2 HM1 HM0 Initial value : R/W : The HCMMR is a 16-bit write-only register for specifying the timing (Th: Hsync frequency) for generating a complementary pulse when a pulse in the Hsync signal is lost, and the timing (Tm and Tm2) for clearing the HHK (masking period).
Page 783
Noise Pulse Csync lost HVTH Digital H separation counter SEPH H complement and mask counter Killer Killer Killer Killer (for counter reset) 5 µs HHK2 Killer Killer Killer Killer (for OSCH generation) OSCH Comple- mentary pulse Figure 27.12 Complement and Mask Timing of the H Complement and Mask Counter Bits 15 to 7...
Bits 6 to 0 HHK Period Setting (HM6 to HM0): Specify the timing for clearing the HHK (masking period) for the Hsync signal. The H complement and mask counter starts counting at a rising edge of the SEPH signal; the HHK period specified by these bits starts at this timing. This value is also used as the timing for resetting the noise detection window signal.
27.2.9 Noise Detection Level Register (NDETR) Bit : Initial value : R/W : The NDETR is an 8-bit write-only register for specifying the noise detection level. The set value must be 1/4 of the actual noise detection level. The noise detection window signal is set to 1 at a falling edge of the OSCH signal, and reset to 0 after the time specified by the HHK period setting bits has passed.
27.2.10 Data Slicer Detection Window Register (DDETWR) Bit : SRWDE1 SRWDE0 SRWDS1 SRWDS0 CRWDE1 CRWDE0 CRWDS1 CRWDS0 Initial value : R/W : The DDETWR is an 8-bit write-only register for specifying the timing of the clock run-in detection window signal and start bit detection window signal supplied to the data slicer. Figure 27.14 shows the timing of the signals.
Page 787
Bits 7 and 6 Start Bit Detection Window Signal Falling Timing Setting (SRWDE1 and SRWDE0): Specifies the falling timing (end timing) of the start bit detection window signal. Bit 1 Bit 0 SRWDE1 SRWDE0 Description The detection ends about 29.5 µs after the slicer start point (Initial value) The detection ends about 29.0 µs after the slicer start point The detection ends about 30.0 µs after the slicer start point...
Bits 1 and 0 Clock Run-in Detection Window Signal Rising Timing Setting (CRWDS1 and CRWDS0): Specifies the rising timing (start timing) of the clock run-in detection window signal. Bit 1 Bit 0 CRWDS1 CRWDS0 Description The detection starts about 10.5 µs after the slicer start point (Initial value) The detection starts about 10.0 µs after the slicer start point The detection starts about 11.0 µs after the slicer start point...
Bit 5 Hsync Frequency Selection (HFS): Selects the Hsync frequency. Here, fsc indicates the color subcarrier signal frequency in each TV format. Note that this setting is ignored when the HCKSEL bit (bit 3) of the SEPCR is set to 1 to select the AFC clock as the internal Csync generator clock source and when the FSCIN bit (bit 12) of the DFORM in the OSD is set to 1 to select the 2fsc clock.
Page 790
External circuit Inside LSI CCMPSL Csync separation comparator CVin2 – CVin2 Hsync Digital H Reference separation Sync tip SEPH voltage switch counter clamp CCMPV0, 1 Internal Register control Csync External I/O switch DLPFON External Csync/Hsync Digital V SEPV separation switch Polarity counter switch...
Page 791
(b) Using the Csync Schmitt Circuit The Hsync component is processed in the same way as described in (a), but the Vsync component is processed differently; the Csync/Hsync terminal is left open and the separated Vsync component is input through the Csync Schmitt circuit to the digital V separation counter.
Page 792
(2) Inputting the Csync Signal as the Source When the Csync signal is selected as the source, the Vsync component can be processed in two methods: using the Vsync Schmitt circuit or using the Csync Schmitt circuit. (a) Using the Vsync Schmitt Circuit The Csync signal having the polarity selected by the SYNCT bit (bit 4) of the SEPIMR is input to the Csync/Hsync terminal.
Page 793
(b) Using the Csync Schmitt Circuit The Hsync component is processed in the same way as described in (a), but the Vsync component is processed differently; the Vsync component is input through the Csync Schmitt circuit to the digital V separation counter. Figure 27.18 shows this method. External circuit Inside LSI CCMPSL...
Page 794
(3) Inputting the Hsync and Vsync Signals Separately as Sources The Hsync signal having the polarity selected by the SYNCT bit (bit 4) of the SEPIMR is input to the Csync/Hsync terminal, and is input through the Csync Schmitt circuit to the digital H separation counter;...
27.3.2 Vsync Separation The Hsync separator separates the Vsync signal from the Csync signal by using the digital V separation counter, which is an 8-bit up-/down-counter, and the VVTHR register, which holds the threshold value. The digital V separation counter increments the count when the Csync signal is high, and decrements the count when the Csync is low.
27.3.3 Hsync Separation The Hsync separator separates the Hsync signal from the Csync signal by using the digital H separation counter, which is a 5-bit up-/down-counter, and the HVTHR register, which holds the threshold value. The digital H separation counter increments the count when the Csync signal is high, and decrements the count when the Csync is low.
27.3.4 Field Detection The sync separator detects whether the current field is an even field or an odd field from the 1/2H phase difference between the Hsync and Vsync by using the AFCV signal generated by the V complement and mask counter and the field detection window signal generated by the AFC. The timing of the field detection window signal can be adjusted by the FWIDR setting so that it is suitable for comparison with the AFCV signal.
27.3.6 Automatic Frequency Controller (AFC) The AFC averages the Hsync signal fluctuation of the video signal. Figure 27.20 shows the AFC configuration. The AFC generates a reference clock having 576 or 448 times the frequency (576 × fh or 448 × fh) of the Hsync signal. From this clock, several clocks are generated, such as the horizontal sync signal (AFCH signal), clock run-in detection window signal, start bit detection window signal, V complement and mask counter clock when the V complement function is selected, and the field detection window signal.
Page 799
(1) AFC Oscillator The AFCosc terminal, which is the oscillation signal terminal of the voltage controlled oscillator (VCO), oscillates at 576 times the frequency (576 × fh) of the Hsync signal when the Hsync signal is input at a certain phase and frequency. The difference in phase or frequency is detected between the reference Hsync signal and the Hsync signal (AFCH signal) obtained by dividing the 576 ×...
Page 800
Table 27.4 Reference Hsync Signal for AFC V Comple- Reference ment and Hsync Mask Data Slicer Field Signal Operation Operation Detection Counter HCKSEL HSEL VCKSL External Operates/ Super- Operates Twice the Hsync Stops imposed frequency of signal mode the AFCH Internally Stops Text...
Page 801
AFCosc 12µH 12pF 470Ω AFCpc 0.01µF Reset, active, or sleep 1/2OVcc AFCLPF Phase error signal 2.4kΩ 4.7µF 0.01µF Note: Reference values are shown. Figure 27.22 Circuit Example for a 448 × × × × fh Reference Clock Rev. 1.0, 02/00, page 796 of 1141...
27.3.7 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit : MSTP15 MSTP14 MSTP13 MSTP12 MSTP11 MSTP10 MSTP9 MSTP8 MSTP7 MSTP6 MSTP5 MSTP4 MSTP3 MSTP2 MSTP1 MSTP0 Initial value : R/W : The MSTPCR is a 16-bit read/write register for controlling the module stop mode. Writing 0 to the MSTP9 bit starts the sync separator;...
Section 28 Data Slicer 28.1 Overview The data slicer extracts signals for closed caption signal in the U.S. This function can be used to extract caption data superimposed on the vertical blanking interval of TV video signals. A high-performance internal sync separator enables reliable caption data extraction. The data slicer will not operate when 448 times the horizontal sync frequency is selected for the AFC reference clock frequency.
28.1.2 Block Diagram Figure 28.1 shows the block diagram of the data slicer. Sync separator Sync signal Line H complement generation counter and mask Dot clock Reference clock Field determination circuit Line counting Field Slice line specification circuit Clock run-in CVin2 Clock run-in –...
28.1.3 Pin Configuration Table 28.1 shows the pin configuration for the data slicer. Table 28.1 Data Slicer Pin Configuration Block Name Abbrev. Function Sync Sync signal Csync/Hsync Input/output Composite sync signal input/output separator input/output or horizontal sync signal input VLPF/Vsync Input Pin for connecting external LPF for vertical sync signal or input pin for...
Page 808
Bit 15 Even- (Odd-) Field Slice Completion Interrupt Enable Flag (EVNIE, ODDIE): Enables or disables the generation of even- (odd-) field slice completion interrupts. Bit 15 EVNIE ODDIE Description Disables even- (odd-) field slice completion interrupt (Initial value) Enables even- (odd-) field slice completion interrupt Bit 14...
Page 809
Clock run-in Start S1 S2 S3 C.video Data slicer base point Clock run-in detection window signal Approx. 23.5 µs Set by STB Start bit detectable Start bit detection period window signal Te = Approx. 29.5 µs TS = 23.5 µs + µs ×...
Page 810
Bits 4 to 0 Data Sampling Delay Time Setting Bits (DLYE4 to DLYE0) (DLYO4 to DLYO0): Set the even (odd) field data sampling clock delay time. Figure 28.3 explains the data sampling clock. The data sampling clock is a clock with period 32×fh, used for slicing 16-bit closed caption data. The data sampling clock is generated after the rising edge of the start bit is detected and the time set by the DLY bit is passed.
28.2.2 Slice Line Setting Registers 1 to 4 (SLINE1 to SLINE4) Bit: SENBLn SFLDn — SLINEn4 SLINEn3 SLINEn2 SLINEn1 SLINEn0 Initial value: R/W: — The slice line setting registers 1 to 4 (SLINE1 to SLINE4) specify slice fields and lines. Up to four slice lines can be specified;...
Bit 5 Reserved: Cannot be modified and is always read as 1. Bits 4 to 0 Slice Line Setting Bits (SLINE4 to SLINE0): Specify the data slice line. Slice lines up to H'1F (31) can be specified. Figure 28.4 explains the line count.
Page 813
Slice line setting register n Slice detection register n Data slice result information Line m for line m Figure 28.5 Relationship between Slice Line Set t i ng R egi s t er and Sl i ce D et ect i on R egi s t er SDTCT is an 8-bit read-only register.
Page 814
Start C.video Data slicer base point Start bit detection starting position Start bit detection end position Data sampling clock Delay Figure 28.6 Data Sampling Clock When Start Bit is not Detected Bit 5 Data End Detection Flag (ENDFn n=1 to 4): Shows whether or not slice data is input at the 18th sampling clock pulse.
28.2.4 Slice Data Registers 1 to 4 (SDATA1 to SDATA4) Bit: Initial value: R/W: *: Unefined The slice data registers 1 to 4 (SDATA1 to SDATA4) are registers in which the slice results are stored. The data is stored in LSB-first fashion, in order from the LSB side near the start bit. Figure 28.7 shows how to store the slice data.
When reset, when the module is stopped, in sleep mode, in standby mode, in watch mode, in subactive mode, or in subsleep mode, the SDATA register values are indeterminate. 28.2.5 Module Stop Control Register (MSTPCR) MSTPCRH MSTPCRL Bit: MSTP MSTP MSTP MSTP MSTP...
28.2.6 Monitor Output Setting Register (DOUT) Bit: — RGBC YCOC DOBC DSEL CRSEL — — Initial value: R/W: — — — The internal signals used by the data slicer can be monitored through the R, G, B, YCO, and YBO pins.
28.3 Operation 28.3.1 Slice Line Specification Up to four slice lines can be specified using the slice line setting registers 1 to 4. For information on field discrimination, refer to section 27.2.6, Field Detection Window Register (FWIDR). After completion of data slicing for all lines specified by registers, a slice completion interrupt is output;...
Page 819
The data slicer initialization and operation for one specification example are shown in figure 28.9. Contents of slice line setting registers Slice Line Setting Register Register No. Enable Field Line Even Line c Line b Even d > c Line d b >...
Page 820
Operation for data slicer resetting for a second specification is shown in figure 28.10. Contents of slice line setting registers Contents of slice line setting registers Slice Line Setting Register Slice Line Setting Register Register No. Register No. Enable Field Line Enable Field...
28.3.2 Slice Sequence Figure 28.11 shows the slice sequence. • Line detection The specified slice line and field match the line count and detected field Set the clock run-in count • Clock run-in detection Count the number of clock run-in pulses in clock run-in period Set clock run-in detection flag (Enable the clock run-in detection)
Section 29 On-Screen Display (OSD) 29.1 Overview OSD (on-screen display) is a function for superimposing arbitrary characters or display patterns on a TV image signal. The display screen consists of up to 32 characters × 12 rows; a single character consists of 12 dots ×...
Page 823
• Background colors: Eight hues* Background brightness, chroma saturation: Four brightness levels, two chroma levels • Character colors: Text display: Eight hues (character units)* Superimposed display: White Character brightness, chroma saturation: Four brightness levels, two chroma levels • Cursor: Character background colored during text display (character units) •...
29.1.2 Block Diagram A block diagram of the OSD appears in figure 29.1. Sync separator clock 4/2fsc TV format Horizontal Vertical display display position position control control Character data ROM Display data RAM Shift register Border control Button control 4/2fsc in Color burst Display control 4/2fsc...
29.1.3 Pin Configuration The OSD pin configuration is shown in table 29.1. Even when not using the data slicer, the composite video signal should be input to Cvin2 in order to perform sync separation from the composite video signal. Table 29.1 OSD Pin Configuration Block Name Abbrev.
Block Name Abbrev. Function Data Composite Cvin2 Input Composite video signal input (2 Vpp, slicer video signal with a sync tip clamp circuit) 29.1.4 Register Configuration Table 29.2 shows the OSD registers. Table 29.2 Register Configuration Initial Name Abbrev. Size Value Address* Character data ROM...
29.1.5 TV Formats and Display Modes Table 29.3 indicates support for different TV formats in each display mode. Operation is not guaranteed if a frequency resulting from division by 4 or 2 from the 4fsc/2fsc input pin is not one of those listed in table 29.3.
29.2.2 Character Configuration Displayed characters and patterns consist of 12 dots × 18 lines per character. There are notes on creation of OSD fonts. For details, refer to section 29.8, Notes on OSD Font Creation. An example of a character configuration appears in figure 29.2. An example of an enlarged character appears in figure 29.3.
24 dots 12 dots 36 lines 18 lines (1) Standard character size (2) Enlarged character size Figure 29.3 Enlarged Character Example 29.2.3 On-Screen Display Configuration The on-screen display area consists of 12 horizontal rows each containing up to 32 characters. The correspondence between display data RAM and the screen display is indicated in figure 29.4.
32nd character character character character character Row 1 D800 D802 D804 D806 D83E D840 D842 D844 D846 D87E Row 2 Row 11 DA80 DA82 DA84 DA86 DABE Row 12 DAC0 DAC2 DAC4 DAC6 DAFE Note: D800 to DAFF indicate the lower 16 bits of addresses in the on-screen display RAM. Figure 29.4 Correspondence between Display Data RAM and On-Screen Display 29.3 Settings in Character Units...
Table 29.4 Correspondence between Character Color Code Settings and Color Output Signals Display Data RAM Settings* R, G, or B port White Yellow Magenta Cyan Green Blue Black output π/2 π C.Video output White Same 3π/4 3π/2 7π/4 Black (NTSC) phase C.Video output White...
12 dots 12 dots 18 lines 18 lines Halftone Background Character Cursor Background Character (1) Halftone display (2) Cursor display (Supported in superimposed mode) (Supported in text display mode) Figure 29.5 Halftone and Cursor Display Examples 29.3.4 Blinking Blinking is a function in which displayed characters are displayed intermittently. By specifying blinking in display data RAM, text can be made to blink in character units.
29.3.5 Button Display Button display is a function in which a frame is drawn around a character string; buttons can be set in character units in display data RAM. There are two types of button: one type of button appears to be raised or floating, and the other type appears to be lowered or sunken.
BPTn BON1 0/1* BON0 0/1* BPTn BON1 BON0 Note: * Do not set (start) or (end). Figure 29.6 Button Display Examples 29.3.6 Character Data ROM (OSDROM) The character data ROM (OSDROM) contains 384 character types, each consisting of 12 dots by 18 lines.
Page 835
Memory map 000000 Line 1, H' F 040040 bits 11 to 8 Line 1, 040041 bits 7 to 0 040000 Bit data for character Line 2, 040042 code H'000 H' F bits 11 to 8 CPU program (blank character display)* 04003F Line 2, 040043...
12 dots Line number Data F000 11109 8 7 6 5 4 3 2 1 F000 F3FC F3FC F300 F300 Line F300 18 dots F300 F3F0 F3F0 32 words F300 F300 F300 F300 F300 F300 Unused area F000 F000 FFFF FFFF 16 bits Figure 29.8 OSDROM Data Configuration (for the letter “F”)
Page 837
The OSD display changes when the data written to master RAM is transferred to the slave RAM. Data is transferred from the master RAM to the slave RAM by setting the LDREQ bit in the OSD format register to 1. At this time, when the DTMV bit is 0, transfer is performed at the moment the LDREQ bit is set to 1;...
Page 838
Bit 14 Halftone/Cursor Display Specification Bit (HT/CR): Turns halftone/cursor display on and off in character units. The superimposed/text display mode switching bit of the screen control register is used for switching between halftone and cursor display. In digital outputs (R, G, and B), when the RGBC bit of the digital output specification register is set to 1 in either superimposed or text display mode to select output of display data for all of characters/borders/cursor/background/button display, the cursor color data specified by the cursor color specification bit of the row register is output.
Page 839
Bits 13 and 12 Button Specification Bits (BON1 and BON0): Set buttons in character units in conjunction with the BPTNn bit of the row register. To create a button with three or more characters, no-button display characters or button display (one character) must be specified between a button display (start) character and a button display (end) character.
Page 840
Bits 11 to 9 Character Color Specification Bits (CR, CG, and CB): Specify character colors in character units. In superimposed mode, the only character color is white, and register settings are invalid. For digital outputs (R, G, and B), character color data specified by the character color specification bits for both superimposed and text display modes is output.
29.4 Settings in Row Units The following items can be set in row units by using the row registers. 29.4.1 Button Patterns Characters can be set freely by writing, to display data RAM, the character data ROM address (character code) at which the character to be displayed is stored. For information on character data ROM and display data RAM, refer to section 29.3.6, Character Data ROM (OSDROM), and section 29.3.7, Display Data RAM (OSDRAM).
Page 842
Table 29.5 Correspondence between Cursor Color Code Settings and Color Output Signals Register Settings* R, G, or B port White Yellow Magenta Cyan Green Blue Black output π/2 π C.Video output White Same 3π/4 3π/2 7π/4 Black (NTSC) phase C.Video output White ±0 ±3π/4...
100IRE Cursor region 0IRE –40IRE (a) No halftone 100IRE 100IRE Cursor region Cursor region 0IRE 0IRE 50% halftone 30% halftone –40IRE –40IRE (b) 50% halftone (c) 30% halftone Figure 29.9 Halftone Level Examples (C.Video) 29.4.5 Row Registers (CLINEn, n = rows 1 to 12) Bit: BPTNn CLUn1...
Page 844
All of the row registers 1 to 12 have the same specifiable format. When the OSD display update timing control bit (DTMV) is 1, the OSD display is updated to the row register settings in synchronous with the Vsync signal (OSDV). Bit 7...
Page 845
Bits 5 and 4 Character Brightness Specification Bits (CLUn1 and CLUn0, n = 1 to 12): Set the character brightness. The character brightness differs with the character color. In superimposed mode, white is the only character color. This setting has no effect on digital outputs (YCO, YBO, R, G, and B).
Page 846
Bits 3 to 1 Cursor Color Specification Bits (KRn, KGn, and KBn, n = 1 to 12): Set the cursor color in row units. C.Video output in superimposed mode uses halftone display, so that cursor color specifications are invalid. •...
Page 847
Bit 0 Cursor Brightness/Halftone Level Specification Bit (KLUn, n = 1 to 12): Sets the cursor brightness/halftone level in row units. Cursor brightness differs for different cursor colors. This setting has no effect on digital outputs (YCO, YBO, R, G, and B). •...
29.5 Settings in Screen Units The following items can be set in screen units by using vertical display position register, horizontal display position register, and screen control register. 29.5.1 Display Positions (1) Vertical Display Start Position The vertical display start position can be set in single scanning line units using the vertical position specification bits of the vertical display position register.
Note the following when choosing display position settings. • Settings should be chosen such that the display does not overlap with the color burst. • When the display protrudes outside the screen, characters in the protruding region should be blank characters (character code H'000). The base point for the horizontal display start position is shown in figure 29.11.
29.5.5 Borders Borders on the periphery of characters can be set using the border specification bit of the screen control register. For an example of border display, see figure 29.2, Character Configuration Examples. The border color can be set in screen units using the border color specification bit of the screen control register.
29.5.8 Display Position Registers (HPOS and VPOS) The HPOS and VPOS include the horizontal display position register and the vertical display position register. (1) Horizontal Display Position Register (HPOS) Bit: Initial value: R/W: The horizontal display position register is used to set the horizontal display start position for characters.
Page 852
Bits 15 to 12 Reserved: Cannot be modified and are always read as 1. Bits 11 to 9 Vertical Row Interval Specification Bits (VSPC2 to VSPC0): Set the row interval in the vertical direction. They can be set in single scanning line units. Bit 11 Bit 10 Bit 9...
29.5.9 Screen Control Register (DCNTL) Bit: CDSPON DISPM LACEM BLKS OSDON — EDGE EDGC Initial value: — Bit: BLU1 BLU0 CAMP KAMP BAMP Initial value: The DCNTL is a 16-bit read/write register used to switch between superimposed and text display modes, set the background and color for text display mode in screen units, and turn OSD display on and off.
Page 854
Bit 13 Interlaced/Noninterlaced Display Select Bit (LACEM): Selects interlaced or noninterlaced text display mode. When noninterlaced text display is selected, the internally generated Hsync and Vsync frequency can be modified. For details, refer to section 27.2.11, Internal Sync Frequency Register (INFRQR). Bit 13 LACEM Description...
Page 855
Bit 10 Reserved: Cannot be modified and is always read as 0. When 1 is written to this bit, correct operation is not guaranteed. Bit 9 Border Specification Bit (EDGE): Sets the border for characters for the entire screen. Bit 9 EDGE Description...
Page 856
Bits 7 to 5 Background Color Specification Bits (BR, BG, and BB): Used to select the background color in text display mode. Background color specifications for C.Video output are invalid in superimposed mode. • Background Colors in Text Display Mode Background Color C.Video Output Bit 7...
Page 857
Bits 4 and 3 Background Brightness Select Bits (BLU1 and BLU0): Select the background brightness in text display mode. These settings have no effect on digital outputs (YCO, YBO, R, G, and B). Bit 4 Bit 3 BUL1 BUL0 Background Brightness...
29.6 Other Settings 29.6.1 TV Format The OSD supports M/NTSC, 4.43-NTSC, M/PAL, N/PAL, B, G, H/PAL, I/PAL, D, K/PAL, and SECAM formats. See table 29.3, TV Formats and Display Modes. 29.6.2 Display Data RAM Control The OSD display data RAM consists of master RAM and slave RAM. The master RAM can be read and written by the CPU;...
29.6.6 OSD Format Register (DFORM) Bit: TVM2 TVM1 TMV0 FSCIN FSCEXT — OSDVE OSDVF Initial value: R/W: R/(W)* Bit: — — — — — DTMV LDREQ VACS Initial value: R/W: — — — — — R/(W)* Note: * Only 0 can be written to clear the flag. The DFORM is used to set the TV format and control display data RAM.
Page 860
Bits 15 to 13 TV Format Select Bits (TVM2 to 0): Select the TV format. The specified clock signal should always be input. Bit 15 Bit 14 Bit 13 Bit 12 Description TVM2 TVM1 TVM0 FSCIN TV Format 4fsc (MHz) 2fsc (MHz) M/NTSC...
Page 861
Bit 11 4/2fsc External Input Select Bit (FSCEXT): Selects 4fsc or 2fsc input. Bit 11 FSCEXT Description 4/2fsc oscillator uses a crystal oscillator (Initial value) 4/2fsc uses a dedicated amplifier circuit for external clock signal input Bit 10 Reserved: Always read as 0. When 1 is written to this bit, correct operation is not guaranteed.
Page 862
Bit 2 OSD Display Update Timing Control Bit (DTMV): Selects the timing for transfer of data from master RAM to slave RAM and for OSD display update by register overwriting. Bit 2 DTMV Description After the LDREQ bit is written to 1, data is transferred from master RAM to slave RAM regardless of the Vsync signal (OSDV).
Bit 0 Master-Slave RAM Transfer State Bit (VACS): Is set to 1 if the CPU accesses OSDRAM during transfer of data from master RAM to slave RAM; the access is invalid. This bit is not cleared automatically, and so should be cleared by writing 0. Bit 0 VACS Description...
29.7.2 YCO and YBO Outputs YCO output consists of character and border data in dot units. Either of two YCO output methods can be selected by the YCO digital output specification bit: output of characters only, or combined output of character and border data. The digital output blink control bit can be used to select blinking for YCO output.
Display block Horizontal display position 1 2 3 4 5 6 7 ................Row 1 Character display position Blank character Figure 29.15 YBO Output Example 29.7.3 Digital Output Specification Register (DOUT) Bit: — RGBC YCOC DOBC DSEL CRSEL — —...
Page 868
Bit 5 YCO Digital Output Specification Bit (YCOC): Specifies the YCO digital output format. This bit must be reset to 0 when bordering is not performed, and must be set to 1 when bordering is performed. Bit 5 YCOC Description Character output is specified...
Bit 2 Monitor Signal Switching Bit (CRSEL): Selects whether a clock run-in detection window signal or a start bit detection window signal is output. This bit setting is valid when DSEL is 1, so that pins are used as data slicer internal monitor signal outputs. Bit 2 CRSEL Description...
Page 870
Bit 0 Module Stop (MSTP0): Specifies the module stop mode for the OSD module. Bit 0 MSTP0 Description Clears the module stop mode for the OSD module Specifies the module stop mode for the OSD module (Initial value) Rev.
29.8 Notes on OSD Font Creation 29.8.1 Note 1 on Font Creation (Font Width) In OSD display, vertical and diagonal lines in fonts that are one dot wide may appear to be narrow due to a shift of 0.5H. Display fonts should be created with liberal thicknesses. 29.8.2 Note 2 on Font Creation (Borders) Borders extend beyond the character display frame in the X-direction, but no borders extend...
Page 872
Blank display 12 dots 18 dots Characters Borders Figure 29.17 Border Neighboring a Blank Character (Example) 12 dots 12 dots (a) 1st character (b) 32nd character Characters Borders Figure 29.18 Examples of Characters at the Starting and Ending Positions in a Row Rev.
29.8.3 Note 3 on Font Creation (Blinking) Blinking involves intermittent display within a specified display frame only. When blinking is necessary, font data should not be set to the first or twelfth dots in the X-direction. Figure 29.19 shows an example of blinking for characters with borders extending beyond the display frame.
29.8.4 Note 4 on Font Creation (Buttons) Buttons replace the outermost perimeter of the character display area with a button pattern. It should be remembered that the button pattern display takes priority over display of the font and border, if any. Figure 29.20 shows an example of button pattern display that takes priority over font and border.
29.9 OSD Oscillator, AFC, and Dot Clock In order to use the OSD, sync signals and a 4/2fsc clock signal are required. 29.9.1 Sync Signals The sync signal for text display mode is a signal created from a 4/2fsc clock or an AFC reference clock.
Page 877
External clock select 4/2fsc in Power-down External clock mode controller Duty: 47 to 53% (OPEN) Note: C = 1000 pF typ When the external clock amplitude is 1 Vp-p or larger, connect a resistor in series with capacitor C. Figure 29.22 Example of Input of a 4/2fsc External Clock 2.
29.10 OSD Operation in CPU Operation Modes Table 29.8 shows the OSD CVout pin status for different CPU operating modes. During a transition to power-down mode, registers are initialized, and so register settings must be restored on return to active mode. Table 29.8 OSD Operation for Different CPU Operating Modes Operating Mode Module Stop Bit...
29.11 Character Data ROM (OSDROM) Access by CPU The character data ROM can be accessed by the CPU as part of user ROM. Before accessing the character data ROM by the CPU, clear the OSDON bit in the screen control register to 0 to stop OSD display, then set the OSROME bit in the serial timer register to 1.
Section 30 Electrical Characteristics 30.1 Absolute Maximum Ratings Table 30.1 lists the absolute maximum ratings. Table 30.1 Absolute Maximum Ratings Item Symbol Value Unit −0.3 to +7.0 Power supply voltage −0.3 to Vcc+0.3 Input voltage (ports other than port 0) −0.3 to AVcc+0.3 Input voltage (port 0) −0.3 to +7.0...
30.2 Electrical Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 30.2.1 DC Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 Table 30.2 DC Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V* , Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Test...
Page 882
Values Test Item Symbol Applicable Pins Conditions Unit Notes Input low Vcc=2.5 V to –0.3 0.1 Vcc voltage 5.5 V −0.3 5(6, FWE, IC, 0.2 Vcc IRQ0 to IRQ5 −0.3 Vcc=2.5 V to 0.1 Vcc 5.5 V −0.3 ...
Page 883
Values Test Item Symbol Applicable Pins Conditions Unit Notes −I Output SO1, SCK1, PWM1, =1.0mA Vcc–1.0 high PWM2, PWM3, −I =0.5mA Vcc– Refer- voltage PWM4, PWM14, ence BUZZ, TMO, TMOW, value FTOA, FTOB, PPG0 to −I ...
Page 884
Values Test Item Symbol Applicable Pins Conditions Unit Notes I µA Input MD0, FWE Vin=0.5 to /output Vcc–0.5V leakage 5(6, ,543 to ,548, ,& Vin=0.5 to current Vcc–0.5V SCK1, SI1, SDA0, Vin=0.5 to SCL0, SDA1, SCL1, Vcc–0.5V FTIA, FTIB, FTIC, FTID,...
Page 885
Values Applicable Test Item Symbol Pins Conditions Unit Notes Active Vcc=5V, mode =10 MHz, current High-speed dissipa- mode tion (CPU Vcc=5V, Reference value operating) =10 MHz, Medium-speed mode (1/64) Active Vcc=5V, — mode =10 MHz current dissipa- tion...
Page 886
Values Test Item Symbol Applicable Pins Conditions Unit Notes µA Vcc=2.5V, Watch WATCH 32kHz mode With crystal current oscillator dissipa- µA Vcc=5.0V, Reference tion 32kHz value* With crystal oscillator µA X1=V , 32kHz Standby STBY Without crystal mode...
Page 887
Table 30.4 Bus Drive Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C) Applicable pin: SCL0, SCL1, SDA0, SDA1 Values Test Item Symbol Applicable Pins Unit Notes...
30.2.2 Allowable Output Currents of HD6432199, HD6432198, HD6432197, and HD6432196 The specifications for the digital pins are shown below. Table 30.5 Allowable Output Currents of HD6432199, HD6432198, HD6432197, and HD6432196 (Conditions: Vcc = 2.5 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C) Item Symbol Value...
30.2.3 AC Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 Table 30.6 AC Characteristics of HD6432199, HD6432198, HD6432197, and HD6432196 − − − − Preliminary − − − − (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Applicable...
Page 890
Values Applicable Test Item Symbol Pins Conditions Unit Figure 5(6 pin low level Vcc = 2.5 V to Figure width 5.5 V 30.4 ,543 to ,548, Input pin high level Vcc = 2.5 V to Figure ,&, $'75*, width 5.5 V...
Page 891
4.0V OSC1 φ (Internal) DEXT Note: The t includes the pin Low level width 20 t DEXT Figure 30.3 External Clock Stabilization Delay Timing Figure 30.4 Reset Input Timing TMBI, FTIA, FTIB, FTIC, FTID, RPTRIG Figure 30.5 Input Timing Rev. 1.0, 02/00, page 888 of 1141...
Page 894
Table 30.8 I C Bus Interface Timing of HD6432199, HD6432198, HD6432197, and HD6432196 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Test Item Symbol Conditions Min Unit Figure ...
Page 895
SCLH STOS STAH STAS SCLL SDAS SDAH Note: S, P and Sr denote the following: S : Start conditions P : Stop conditions Sr: Re-transmit start conditions Figure 30.9 I C Bus Interface I/O Timing Rev. 1.0, 02/00, page 892 of 1141...
30.3 Electrical Characteristics of HD64F2199 30.3.1 DC Characteristics of HD64F2199 Table 30.12 DC Characteristics of HD64F2199 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V* , Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Test Item Symbol...
Page 904
Values Test Item Symbol Applicable Pins Conditions Unit Notes Input low Vcc=2.7 V to –0.3 0.1 Vcc voltage −0.3 5(6, FWE, IC, 0.2 Vcc IRQ0 to IRQ5 −0.3 Vcc=2.7 V to 0.1 Vcc −0.3 SCK1, SI1, FTIA, FTIB, 0.2 Vcc FTIC, FTID, TRIG, TMBI, $'75*...
Page 905
Values Test Item Symbol Applicable Pins Conditions Unit Notes −I Output SO1, SCK1, PWM1, =1.0mA Vcc–1.0 high PWM2, PWM3, −I =0.5mA Vcc– Refer- voltage PWM4, PWM14, ence BUZZ, TMO, TMOW, value FTOA, FTOB, PPG0 to −I ...
Page 906
Values Test Item Symbol Applicable Pins Conditions Unit Notes I µA Input MD0, FWE Vin=0.5 to /output Vcc–0.5V leakage 5(6, ,543 to ,548, ,& Vin=0.5 to current Vcc–0.5V SCK1, SI1, SDA0, Vin=0.5 to SCL0, SDA1, SCL1, Vcc–0.5V FTIA, FTIB, FTIC, FTID,...
Page 907
Values Applicable Test Item Symbol Pins Conditions Unit Notes Active Vcc=5V, mode =10 MHz, current High-speed dissipa- mode tion (CPU Vcc=5V, Reference value operating) =10 MHz, Medium-speed mode (1/64) Active Vcc=5V, — mode =10 MHz current dissipa- tion...
Page 908
Values Test Item Symbol Applicable Pins Conditions Unit Notes µA Vcc=2.7V, Watch WATCH 32kHz mode With crystal current oscillator dissipa- µA Vcc=5.0V, Reference tion 32kHz value* With crystal oscillator µA X1=V , 32kHz Standby STBY Without crystal mode...
Page 909
Table 30.14 Bus Drive Characteristics of HD64F2199 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C.) Applicable pin: SCL0, SCL1, SDA0, SDA1 Values Test Item Symbol Applicable Pins Conditions Unit Notes −...
Page 910
30.3.2 Allowable Output Currents of HD64F2199 The specifications for the digital pins are shown below. Table 30.15 Allowable Output Currents of HD64F2199 (Conditions: Vcc = 2.7 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C) Item Symbol Value Unit...
Page 911
30.3.3 AC Characteristics of HD64F2199 Table 30.16 AC Characteristics of HD64F2199 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Applicable Test Item Symbol Unit Notes Pins Conditions ...
Page 912
Values Applicable Test Item Symbol Pins Conditions Unit Figure 5(6 pin low level Vcc = 2.7 V to Figure width 5.5 V 30.13 ,543 to ,548, Input pin high level Vcc = 2.7 V to Figure ,&, $'75*, width 5.5 V...
Page 913
4.0V OSC1 φ (Internal) DEXT Note: * The t includes the RES pin Low level width 20 t DEXT Figure 30.12 External Clock Stabilization Delay Timing Figure 30.13 Reset Input Timing TMBI, FTIA, FTIB, FTIC, FTID, RPTRIG Figure 30.14 Input Timing Rev.
Page 914
30.3.4 Serial Interface Timing of HD64F2199 Table 30.17 Serial Interface Timing of HD64F2199 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Applicable Test Item Symbol Unit Figure Pins...
Page 916
Table 30.18 I C Bus Interface Timing of HD64F2199 (Conditions: Vcc = AVcc = 4.0 V to 5.5 V, Vss = 0.0 V, Ta = –20 to +75°C unless otherwise specified.) Values Test Item Symbol Conditions Min Unit Figure ...
Page 917
SCLH STOS STAH STAS SCLL SDAS SDAH Note: * S, P and Sr denote the following: S : Start conditions P : Stop conditions Sr: Re-transmit start conditions Figure 30.18 I C Bus Interface I/O Timing Rev. 1.0, 02/00, page 914 of 1141...
Appendix A Instruction Set Instructions Operation Notation General register (destination) * General register (source) * General register * General register (32-bit register) Multiplication-Addition register (32-bit register) * (EAd) Destination operand (EAs) Source operand Extend register Condition code register N (negative flag) in CCR Z (zero) flag in CCR V (overflow) flag in CCR C (carry) flag in CCR...
Page 926
Condition Code Notation Symbol Description Modified according to the instruction result Not fixed (value not guaranteed) Always cleared to 0 Always set to 1 − Not affected by the instruction execution result Rev. 1.0, 02/00, page 924 of 1141...
Page 927
Table A.1 Data Transfer Instruction Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code Mnemonic Size States H N Z V C Advanced Mode MOV.B #xx:8,Rd #xx:8→Rd8 — — — — — — MOV.B Rs,Rd Rs8→Rd8 — —...
Page 928
Table A.2 Arithmetic Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code Mnemonic Size States H N Z V C Advanced Mode ADD.B #xx:8,Rd — Rd8+#xx:8→Rd8 — ADD.B Rs,Rd Rd8+Rs8→Rd8 — ADD.W #xx:16,Rd Rd16+#xx:16→Rd16 — ADD.W Rs,Rd Rd16+Rs16→Rd16 ADD.L #xx:32,ERd —...
Page 929
Table A.3 Logic Operations Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code States Mnemonic Size H N Z V C Advanced Mode AND.B #xx:8,Rd Rd8∧#xx:8→Rd8 — — — AND.B Rs,Rd Rd8∧Rs8→Rd8 — — — AND.W #xx:16,Rd Rd16∧#xx:16→Rd16 —...
Page 930
Table A.4 Shift Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code Mnemonic States Size H N Z V C Advanced Mode SHAL SHAL.B Rd — — SHAL.B #2,Rd — — SHAL.W Rd — — — —...
Page 931
Table A.5 Bit Manipulation Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code States Mnemonic Size H N Z V C Advanced Mode — — — — — BSET BSET #xx:3,Rd — (#xx:3 of Rd8)←1 — —...
Page 932
Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code States Mnemonic Size H N Z V C Advanced Mode — — — — — BIAND BIAND #xx:3,Rd C∧ [~(#xx:3 of Rd8)]→C — — — — — BIAND #xx:3,@ERd C∧...
Page 933
Table A.6 Branch Instructions Addressing Mode and Instruction Length (Bytes) No of Operation Execution Operation Code States Mnemonic Size Branch H N Z V C Advanced Mode Condition — — — — — — — BRA d:8(BT d:8) if condition is true then Always —...
Page 934
Table A.7 System Control Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Code Operation States Mnemonic Size H N Z V C Advanced Mode — — — — — TRAPA TRAPA #x:2 — PC→@-SP,CCR→@-SP, 8 [9] EXR→@-SP,<Vector>→PC —...
Page 935
Table A.8 Block Transfer Instructions Addressing Mode and Instruction Length (Bytes) No of Condition Execution Operation Code Mnemonic Size States H N Z V C Advanced Mode EEPMOV EEPMOV.B — if R4L≠0 — — — — — — 4+2n * Repeat @ER5→@ER6 ER5+1→ER5 ER6+1→ER6...
Page 945
The following table shows the correspondence between the register field and the general register. Address Register, 32-bit Register 16-bit Register 8-bit Register Register General Register General Register General Field Register Field Register Field Register 0000 0000 0001 0001 0111 0111 1000 1000 1001...
Number of Execution States This section explains execution state and how to calculate the number of execution states for each instruction of the H8S/2000 CPU. Table A.12 indicates number of cycles of instruction fetch and data read/write during instruction execution, and table A.11 indicates number of states required for each instruction size. The number of execution states can be obtained from the equation below.
Page 951
Table A.11 Number of States Required for Each Execution Status (Cycle) Target of Access On-Chip Supporting Module Execution Status (Cycle) On-Chip Memory 8-bit bus 16-bit bus Instruction fetch S — — Branch address read S Stack operation S Byte data access S Word data access S Internal operation S Rev.
Page 952
Table A.12 Instruction Execution Status (Number of Cycles) Branch Instruction Address Stack Byte Data Word Data Internal Fetch Read Operation Access Access Operation Instruction Mnemonic ADD.B #xx:8,Rd ADD.B Rs, Rd ADD.W #xx:16,Rd ADD.W Rs,Rd ADD L #xx:32,ERd ADD.L ERs,ERd ADDS ADDS #1/2/4,ERd ADDX ADDX #xx:8,Rd...
Bus Status during Instruction Execution Table A.13 indicates execution status of each instruction available in this LSI. For the number of states required for each execution status, see table A.11, Number of States Required for Each Execution Status (Cycle). Interpreting the Table Order of execution Instruction Internal operation...
Page 961
Table A.13 Instruction Execution Status Instruction ADD.B #xx:8,Rd R:W NEXT ADD.B Rs,Rd R:W NEXT ADD.W #xx:16,Rd R:W 2nd R:W NEXT ADD.W Rs,Rd R:W NEXT ADD.L #xx:32,ERd R:W 2nd R:W 3rd R:W NEXT ADD.L ERs,ERd R:W NEXT ADDS #1/2/4,ERd R:W NEXT ADDX #xx:8,Rd R:W NEXT ADDX Rs,Rd...
Page 962
Instruction BLT d:8 R:W NEXT R:W EA BGT d:8 R:W NEXT R:W EA BLE d:8 R:W NEXT R:W EA BRA d:16 (BT d:16) R:W 2nd Internal R:W EA operation 1 state BRN d:16 (BF d:16) R:W 2nd Internal R:W EA operation 1 state BHI d:16...
Page 963
Instruction BLE d:16 R:W 2nd Internal R:W EA operation 1 state BCLR #xx:3,Rd R:W NEXT BCLR #xx:3,@ERd R:W 2nd R:B:M EA R:W:M W:B EA NEXT BCLR #xx:3,@aa:8 R:W 2nd R:B:M EA R:W:M W:B EA NEXT BCLR R:W 2nd R:W 3rd R:B:M EA R:W:M W:B EA #xx:3,@aa:16...
Page 964
Instruction BOIR #xx:3,@aa:16 R:W 2nd R:W 3rd R:B EA R:W:M NEXT BOIR #xx:3,@aa:32 R:W 2nd R:W 3rd R:W 4th R:B EA R:W:M NEXT BIST #xx:3,Rd R:W NEXT BIST #xx:3,@ERd R:W 2nd R:B:M EA R:W:M W:B EA NEXT BIST #xx:3,@aa:8 R:W 2nd R:B:M EA R:W:M W:B EA NEXT...
Page 965
Instruction BNOT Rn @aa:16 R:W 2nd R:W 3rd R:B:W EA R:W:M W:B EA NEXT BNOT Rn @aa:32 R:W 2nd R:W 3rd R:W 4th R:B:M EA R:W:M W:B EA NEXT BOR #xx:3,Rd R:W NEXT BOR #xx:3,ERd R:W 2nd R:B EA R:W:M NEXT BOR #xx:3,@aa:8 R:W 2nd...
Page 966
Instruction BTST #xx:3,@ERd R:W 2nd R:B EA R:W:M NEXT BTST #xx:3,@aa:8 R:W 2nd R:B EA R:W:M NEXT BTST #xx:3,@aa:16 R:W 2nd R:W 3rd R:B EA R:W:M NEXT BTST #xx:3,@aa:32 R:W 2nd R:W 3rd R:W 4th R:B EA R:W:M NEXT BTST Rn,Rd R:W NEXT BTST Rn,@ERd R:W 2nd...
Page 967
Instruction DIVXU.B Rs,Rd R:W NEXT Internal operation 11 state DIVXU.W Rs,ERd R:W NEXT Internal operation 19 state EEPMOV.B R:W 2nd R:B EAs R:B EAd R:B EAs W:B EAd R:W NEXT EEPMOV.W R:W 2nd R:B EAs R:B EAd R:B EAs W:B EAd R:W NEXT ←...
Page 968
Instruction LDC @ERs+,EXR R:W 2nd R:W NEXT Internal R:W EA operation 1 state LDC @aa:16,CCR R:W 2nd R:W 3rd R:W NEXT R:W EA LDC @aa:16,EXR R:W 2nd R:W 3rd R:W NEXT R:W EA LDC @aa:32,CCR R:W 2nd R:W 3rd R:W 4th R:W NEXT R:W EA LDC @aa:32,EXR R:W 2nd...
Page 969
Instruction MOV.W Rs,Rd R:W NEXT MOV.W @ERs,Rd R:W NEXT R:W EA MOV.W R:W 2nd R:W NEXT R:W EA @(d:16,ERs),Rd MOV.W R:W 2nd R:W 3rd R:W 4th R:W NEXT R:W EA @(d:32,ERs),Rd MOV.W @ERs+,Rd R:W NEXT Internal R:W EA operation 1 state MOV.W @aa:16,Rd R:W 2nd R:W NEXT R:W EA MOV.W @aa:32,Rd R:W 2nd...
Page 970
Instruction MOV.L ERs,@aa:16 R:W 2nd R:W:M 3rd R:W NEXT W:W:M EA W:W EA+2 MOV.L ERs,@aa:32 R:W 2nd R:W:M 3rd R:W 4th R:W NEXT W:W:M EA W:W EA+2 MOVFPE Cannot be used in this LSI. @aa:16,Rd MOVTPE Rs,@aa:16 MULXS.B Rs,Rd R:W 2nd R:W NEXT Internal operation 11 state MULXS.W Rs,Rd R:W 2nd...
Page 971
Instruction ROTR.B Rd R:W NEXT ROTR.B #2,Rd R:W NEXT ROTR.W Rd R:W NEXT ROTR.W #2,Rd R:W NEXT ROTR.L ERd R:W NEXT ROTR.L #2,ERd R:W NEXT ROTXL.B Rd R:W NEXT ROTXL.B #2.Rd R:W NEXT ROTXL.W Rd R:W NEXT ROTXL.W #2,Rd R:W NEXT ROTXL.L ERd R:W NEXT ROTXL.L #2,ERd...
Page 972
Instruction SHLL.L #2,ERd R:W NEXT SHLR.B Rd R:W NEXT SHLR.B #2,Rd R:W NEXT SHLR.W Rd R:W NEXT SHLR.W #2,Rd R:W NEXT SHLR.L ERd R:W NEXT SHLR.L #2,ERd R:W NEXT SLEEP R:W NEXT Internal operation: STC.B CCR,Rd R:W NEXT STC.B EXR,Rd R:W NEXT STC.W CCR,@ERd R:W 2nd R:W NEXT W:W EA...
Page 973
Instruction STMAC MACH,ERd Cannot be used in this LSI. STMAC MACL,ERd SUB.B Rs,Rd R:W NEXT SUB.W #xx:16,Rd R:W 2nd R:W NEXT SUB.W Rs,Rd R:W NEXT SUB.L #xx:32,ERd R:W 2nd R:W 3nd R:W NEXT SUB.L ERs,ERd R:W NEXT SUB #1/2/4,ERd R:W NEXT SUBX #xx:8,Rd R:W NEXT SUBX Rs,Rd...
Change of Condition Codes This section explains change of condition codes after instruction execution of the CPU. Legend of the following tables is as follows. m = 31: Longword size m = 15: Word size m = 7: Byte size Bit i of source operand Bit i of destination operand Bit i of result...
Page 975
Table A.14 Change of Condition Code Instruc- tion Definition H=Sm-4⋅Dm-4+Dm-4⋅5P07+Sm-4⋅5P07 N=Rm ⋅53 Z=5P⋅5P04⋅ V=Sm⋅Dm⋅5P+6P⋅'P⋅Rm C=Sm⋅Dm+Dm⋅5P+Sm⋅5P − − − − − ADDS ADDX H=Sm-4⋅Dm-4+Dm-4⋅5P07+Sm-4⋅5P07 N=Rm ⋅53 Z=Z'⋅5P⋅ V=Sm⋅Dm⋅5P+6P⋅'P⋅Rm C=Sm⋅Dm+Dm⋅5P+Sm⋅5P − − N=Rm ⋅53 Z=#5P⋅5P04⋅ ANDC Value in the bit corresponding to execution result is stored.
Page 978
Instruc- tion Definition − SHAL N=Rm ⋅53 Z=5P⋅5P04⋅ V=Dm⋅Dm-1+'P⋅'P04 (In case of 1 bit) V=Dm⋅Dm-1⋅Dm-2⋅'P⋅'P04⋅'P05 (In case of 2bits) C=Dm , C=Dm-1 (In case of 1 bit) (In case of 2 bits) − SHAR N=Rm ⋅53 Z=5P⋅5P04⋅ C=D0 , C=D1 (In case of 1 bit) (In case of 2 bits) −...
Function List H'D000 to H'D001: Drum Phase Gain Constant DGKp: Drum Digital Filter DGKp15 DGKp14 DGKp13 DGKp12 DGKp11 DGKp10 DGKp9 DGKp8 DGKp7 DGKp6 DGKp5 DGKp4 DGKp3 DGKp2 DGKp1 DGKp0 Initial value H'D002 to H'D003: Drum Speed Gain Constant DGKs: Drum Digital Filter DGKs15 DGKs14 DGKs13 DGKs12 DGKs11 DGKs10 DGKs9 DGKs8 DGKs7 DGKs6 DGKs5 DGKs4 DGKs3 DGKs2 DGKs1 DGKs0 Initial value H'D004 to H'D005: Drum Phase Coefficient A DAp: Drum Digital Filter...
Page 989
H'D00A to H'D00B: Drum Speed Coefficient B DBs: Drum Digital Filter DBs15 DBs14 DBs13 DBs12 DBs11 DBs10 DBs9 DBs8 DBs7 DBs6 DBs5 DBs4 DBs3 DBs2 DBs1 DBs0 Initial value H'D00C to H'D00D: Drum Phase Offset DOfp: Drum Digital Filter DOfp15 DOfp14 DOfp13 DOfp12 DOfp11 DOfp10 DOfp9 DOfp8 DOfp7 DOfp6 DOfp5 DOfp4 DOfp3 DOfp2 DOfp1 DOfp0 Initial value H'D00E to H'D00F: Capstan Speed Offset DOfs: Drum Digital Filter DOfs15 DOfs14 DOfs13 DOfs12 DOfs11 DOfs10 DOfs9 DOfs8...
Page 990
H'D016 to H'D017: Capstan Phase Coefficient B CBp: Capstan Digital Filter CBp15 CBp14 CBp13 CBp12 CBp11 CBp10 CBp9 CBp8 CBp7 CBp6 CBp5 CBp4 CBp3 CBp2 CBp1 CBp0 Initial value H'D018 to H'D019: Capstan Speed Coefficient A CAs: Capstan Digital Filter CAs15 CAs14 CAs13 CAs12 CAs11 CAs10 CAs9 CAs8 CAs7 CAs6 CAs5 CAs4 CAs3 CAs2 CAs1 CAs0 Initial value H'D01A to H'D01B: Capstan Speed Coefficient B CBs: Capstan Digital Filter...
Page 991
H'D022 to H'D023: Drum System Phase Delay Initialization Register DZp: Digital filter DZp15 DZp14 DZp13 DZp12 DZp11 DZp10 DZp9 DZp8 DZp7 DZp6 DZp5 DZp4 DZp3 DZp2 DZp1 DZp0 Initial value — — — — H'D024 to H'D025: Capstan System Speed Delay Initialization Register CZs: Digital filter CZs15 CZs14 CZs13 CZs12 CZs11 CZs10 CZs9 CZs8 CZs7 CZs6 CZs5 CZs4 CZs3 CZs2 CZs1 CZs0 Initial value —...
Page 992
H'D028: Drum System Digital Filter Control Register DFIC: Digital Filter Bit : — DROV DPHA DZPON DZSON DSG2 DSG1 DSG0 Initial value : R/(W)* R/(W) R/W : — Drum system gain control bit DSG2 DSG1 DSG0 Description (Initial value) x 16 (x 32)* (x 64)* Invalid (do not set)
Page 993
H'D029: Capstan System Digital Filter Control Register CFIC: Digital Filter Bit : — CROV CPHA CZPON CZSON CSG2 CSG1 CSG0 Initial value : — R/(W)* R/(W) R/W : Capstan system gain control bit CSG2 CSG1 CSG0 Description (Initial value) x 16 (x 32)* (x 64)* Invalid (do not set)
Page 994
H'D02A: Digital Filter Control Register DFUCR: Digital Filter Bit : — — PTON CP/DP CFEPS DFEPS CFESS DFESS Initial value : — — R/W : Drum speed system error data transfer bit 0 Transfer data by NCDFG signal latch. (Initial value) 1 Transfer data at the time of error data write.