
MN102H75K/F75K/85K/F85K
LSI User’s Manual



PanaXSeries is a trademark of Matsushita Electric Industrial Co., Ltd. The other corporation names, logotype and product names written in this book are trademarks or registered trademarks of their corresponding corporations.
and semiconductors described in this book
(1) An export permit needs to be obtained from the competent authorities of the Japanese Government if any of the products or technologies described in this book and controlled under the "Foreign Exchange and Foreign Trade Law" is to be exported or taken out of Japan.
(2) The contents of this book are subject to change without notice in matters of improved function. When finalizing your design, therefore, ask for the most up-to-date version in advance in order to check for any changes.
(3) We are not liable for any damage arising out of the use of the contents of this book, or for any infringement of patents or any other rights owned by a third party.
(4) No part of this book may be reprinted or reproduced by any means without written permission from our company.
(5) This book deals with standard specification. Ask for the latest individual Product Standards or Specifications in advance for more detailed information required for your design, purchasing and applications.
If you have any inquiries or questions about this book or our semiconductors, please contact one of our sales offices listed at the back of this book.


List of Tables
1-1 General Specifications 26 1-2 Block Diagram Explanation 29 1-3 Pin Functions 32 1-4 Wait Count Settings 36 2-1 Comparison of MN102H75K and MN102L35G Interrupt Features 37 2-2 Handler Preprocessing 39 2-3 Handler Postprocessing 39 2-4 Interrupt Control Registers 46 3-1 Peripheral Function On/Off Switches 75 3-2 CPU Mode Bit Settings 76 4-1 8-Bit Timer Functions and Features 78 4-2 8-Bit Timer Control Registers 87 4-3 16-Bit Timer Functions and Features 89 4-4 Count Direction for 4x Two-Phase Encoder Timing Example 113 4-5 Count Direction for 1x Two-Phase Encoder Timing Example 116 4-6 16-Bit Timer Control Registers 125 5-1 Serial Interface Functions and Features 127 5-2 Example Baud Rate Settings for the UART Mode 129 5-3 Serial Interface Control Registers 140 6-1 ADC Functions and Features 143 6-2 ADC Control Registers 150 7-1 OSD Functions and Features 153 7-2 Power-Saving Control Bits for the OSD 155 7-3 OSDPOFF and OSDREGE Settings 155 7-4 Associated Tiles for Cursor Tile Code Registers 160 7-5 Example Graphics VRAM Settings 161 7-6 Example Text VRAM Settings 163 7-7 VRAM Bit Allocation in Internal RAM 165 7-8 Color Palette Registers 178 7-9 RGB, YM, and YS Output Control Settings 181 7-10 OSD Dot Clock Source Settings 193 7-11 OSD Dot Clock Division Settings 193 7-12 Bit Settings for Controlling the Shuttered Area 194 7-13 Bit Settings for Controlling Shutter Movement 196 7-14 Bit Settings for Controlling Shuttering Effects 198 7-15 EOMON Output Criteria 202 7-16 Cursor Vertical Size Settings 205 7-17 Graphics Vertical Size Settings 206 7-18 Text Vertical Size Settings 206 8-1 Logic Level Conditions for Data Formats 220 8-2 Long and Short Data Identification 220 8-3 Leader Detection Conditions 221 8-4 Differences between SLOW and NORMAL Modes 222

8-5 IR Remote Signal Receiver Registers 223 8-6 HEAMA and 5-/6-Bit Data Pulse Widths 223 9-1 Pins Used for CCD0 and CCD1 227 9-2 Caption decoder register setting 229 9-3 Clamping Reference and Compare Levels 229 9-4 Current Level Control 230 9-5 Control Registers for Clamping Circuit 230 9-6 Control Registers for Sync Separator Circuit 232 9-7 Control Registers for Data Slicer 234 9-8 Control Registers for Controller and Sampling Circuit 234 9-9 Closed-Caption Decoder Register 236 10-1 Register Settings for Internal PWM Pullup 249 11-1 I/O Port Pins 251 12-1 ROM Correction Address Match and Data Registers 290 13-1 I2C Bus Terminology 293 13-2 Operating Modes for Devices on an I2C Bus 294 13-3 Control Registers for Clamping Circuit 296 13-4 Registers Settings for SDA0/SCL0 or SDA1/SCL1 Ports 298 13-5 SDA and SCL Waveform Characteristics 299 13-6 STA and STO Settings 304 14-1 H Counter Pins 308 A-1 Register Map: x’007E00’ to x’007FFF’ 312 A-2 Register Map: x’00FC00’ to x’00FDFF’ 313 A-3 Register Map: x’00FE00’ to x’00FFFF’ 314 B-1 Programmable Areas in Each Programming Mode 316 B-2 PROM Writer Hardware 318 B-3 Pin Descriptions for Target Board–Serial Writer Connection 321 B-4 Flash ROM Address Space in Serial Programming Mode 323 B-5 RAM Address Space in Serial Programming Mode 324 B-6 Microcontroller Clock Frequencies during Serial Programming 324 B-7 Programming Times for PROM and Serial Writers 328

List of Figures
1-1 Conventional vs. MN102H Series Code Assignments 19 1-2 Three-Stage Pipeline 19 1-3 MN102H Series Interrupt Servicing 20 1-4 Internal Registers, Memory, and Special Function Registers 23 1-5 Address Space 24 1-6 Interrupt Controller Configuration 25 1-7 Interrupt Servicing Sequence 25 1-8 Functional Block Diagram 28 1-9 MN102H85K Pin Configuration in Single-Chip Mode 30 1-10 MN102H75K Pin Configuration in Single-Chip Mode 31 1-11 Power Supply Wiring 34 1-12 OSC1and OSC2 Connection Examples 34 1-13 Reset Pin Connection Example 1 34 1-14 OSDXI and OSDXO Connection Examples 34 1-15 Memory Space in External Extension Mode 35 2-1 Interrupt Controller Block Diagram 37 2-2 Interrupt Vector Group and Class Assignments 38 2-3 Interrupt Servicing Time 39 2-4 Block Diagram of External Pin Interrupt 40 2-5 Timing for External Pin Interrupt Setup (Example) 41 2-6 Block Diagram of Watchdog Timer Interrupt 42 2-7 Timing for Watchdog Timer Interrupt Setup (Example) 43 3-1 CPU State Changes 72 3-2 CPU Clock Switch (NORMAL/SLOW Modes) 73 4-1 Timer Configuration Examples 77 4-2 Block Diagram of 8-Bit Timers 77 4-3 Timer 0 Block Diagram 79 4-4 Timer 1 Block Diagram 79 4-5 Timer 2 Block Diagram 80 4-6 Timer 3 Block Diagram 80 4-7 Event Timer Input Timing (8-Bit Timers) 81 4-8 Clock Output and Interval Timer Timing (8-Bit Timers) 81 4-9 Block Diagram of Event Counter Using Timer 0 82 4-10 Event Counter Timing (Timer 0) 83 4-11 Configuration Example of Interval Timer Using Timers 1 and 2 84 4-12 Block Diagram of Interval Timer Using Timers 1 and 2 84 4-13 Interval Timer Timing (Timers 1 and 2) 86 4-14 Block Diagram of 16-Bit Timers 88 4-15 Timer 4 Block Diagram 90 4-16 Timer 5 Block Diagram 90 4-17 Single-Phase PWM Output Timing (16-Bit Timers) 90 4-18 Single-Phase PWM Output Timing with Data Change (16-Bit Timers) 91 4-19 Two-Phase PWM Output Timing (16-Bit Timers) 91

4-20 One-Shot Pulse Output Timing (16-Bit Timers) 91 4-21 External Count Direction Control Timing (16-Bit Timers) 92 4-22 Event Timer Input Timing (16-Bit Timers) 92 4-23 Single-Phase Capture Input Timing (16-Bit Timers) 92 4-24 Two-Phase Capture Input Timing (16-Bit Timers) 93 4-25 Two-Phase 4x Encoder Timing (16-Bit Timers) 93 4-26 Two-Phase 1x Encoder Timing (16-Bit Timers) 93 4-27 Block Diagram of Event Counter Using Timer 4 94 4-28 Event Counter Timing (Timer 4) 95 4-29 Block Diagram of Single-Phase PWM Output Using Timer 4 96 4-30 Single-Phase PWM Output Timing (Timer 4) 99 4-31 Single-Phase PWM Output Timing with Dynamic Duty Changes (Timer 4) 100 4-32 Block Diagram of Two-Phase PWM Output Using Timer 4 101 4-33 Two-Phase PWM Output Timing (Timer 4) 104 4-34 Two-Phase PWM Output Timing with Dynamic Duty Changes (Timer 4) 105 4-35 Block Diagram of Single-Phase Capture Input Using Timer 4 106 4-36 Single-Phase Capture Input Timing (Timer 4) 107 4-37 Block Diagram of Two-Phase Capture Input Using Timer 4 108 4-38 Two-Phase Capture Input Timing (Timer 4) 110 4-39 Block Diagram of 4x Two-Phase Capture Input Using Timer 5 111 4-40 Configuration Example 1 of 4x Two-Phase Capture Input Using Timer 5 111 4-41 Configuration Example 2 of 4x Two-Phase Capture Input Using Timer 5 111 4-42 4x Two-Phase Encoder Input Timing (Timer 5) 113 4-43 Block Diagram of 1x Two-Phase Capture Input Using Timer 5 114 4-44 Configuration Example 1 of 1x Two-Phase Capture Input Using Timer 5 114 4-45 Configuration Example 2 of 1x Two-Phase Capture Input Using Timer 5 114 4-46 1x Two-Phase Encoder Input Timing (Timer 5) 116 4-47 Block Diagram of One-Shot Pulse Output Using Timer 5 117 4-48 One-Shot Pulse Output Timing (Timer 5) 119 4-49 Block Diagram of External Count Direction Control Using Timer 5 120 4-50 Configuration Example of External Count Direction Control Using Timer 5 120 4-51 External Count Direction Control Timing (Timer 5) 122 4-52 Block Diagram of External Reset Control Using Timer 5 123 4-53 External Reset Control Timing (Timer 5) 124 5-1 Serial Interface Configuration Example 127 5-2 Synchronous Serial Mode Connections 128 5-3 UART Mode Connections 128 5-4 I2C Mode Connection 128 5-5 Synchronous Serial Transmission Timing 129 5-6 Synchronous Serial Reception Timing 130 5-7 UART Transmission Timing 130 5-8 UART Reception Timing 130 5-9 Block Diagram of UART Transmission Using Serial Interface 0 131 5-10 UART Transmission Timing (Serial Interface 0) 133 5-11 Block Diagram of Serial Interface Clock 135

5-12 Serial Interface Clock Timing 136 5-13 Master Transmitter Timing in I2C Mode (with ACK) 138 5-14 Master Receiver Timing in I2C Mode (with ACK) 139 6-1 ADC Architecture 143 6-2 ADC Block Diagram 144 6-3 ADC Timing 144 6-4 Single Channel/Single Conversion Timing 145 6-5 Multiple Channel/Single Conversion Timing 145 6-6 Single Channel/Continuous Conversion Timing 146 6-7 Multiple Channel/Continuous Conversion Timing 146 6-8 Single-Channel A/D Conversion 147 6-9 Timing of Software-Controlled Single-Channel A/D Conversion 148 6-10 Multiple-Channel A/D Conversion 148 6-11 Timing of Hardware-Controlled Intermittent Three-Channel A/D Conversion 150 6-12 Cautions on Analog-to-Digital Converter 152 7-1 OSD Block Diagram 154 7-2 Cursor Tiles in Standard and Extended Modes 159 7-3 Graphic Tiles in Standard and Extended Modes 160 7-4 Graphics Display Example 162 7-5 Text Display Example 164 7-6 VRAM Organization (When GEXTE = 0) 169 7-7 Graphics VRAM Organization for Two Modes 170 7-8 Timing for OSD data 171 7-9 ROM Organization 172 7-10 Graphics ROM Setup Example for a Single Line 173 7-11 Graphics ROM in the Four Color Modes (16W x 16H Tiles) 174 7-12 Graphics ROM in the Four Color Modes (16W x 18H Tiles) 175 7-13 Graphics ROM Organization in 16-Color Mode (16W x 16H Tiles) 176 7-14 Graphics ROM Organization in 8-Color Mode (16W x 16H Tiles) 176 7-15 Graphics ROM Organization in 4-Color Mode (16W x 16H Tiles) 176 7-16 Graphics ROM Organization in 2-Color Mode (16W x 16H Tiles) 176 7-17 Graphics ROM Organization in 16-Color Mode (16W x 18H Tiles) 177 7-18 Graphics ROM Organization in 8-Color Mode (16W x 18H Tiles) 177 7-19 Graphics ROM Organization in 4-Color Mode (16W x 18H Tiles) 177 7-20 Graphics ROM Organization in 2-Color Mode (16W x 18H Tiles) 177 7-21 OSD Signal Waveform 182 7-22 OSD Signal Output Switches 183 7-23 Character Outlining Example 184 7-24 Character Shadowing Example 184 7-25 Box Shadowing Example 185 7-26 Italicizing and Underlining Example 186 7-27 Graphic Tile Size Combinations 187 7-28 Character Size Combinations 188 7-29 HPmax of Horizontal Display Position 189 7-30 DMA and Interrupt Timing for the OSD 192

7-31 Shuttered Area Setup Examples 195 7-32 Shutter Movement Setup Examples 197 7-33 Text-Layer Shuttering Setup Examples 199 7-34 Shutter Blanking Setup Examples 200 7-35 Line Shuttering Setup Example 200 7-36 Field Detection Circuit Block Diagram 201 7-37 Field Detection Timing 201 8-1 IR Remote Signal Receiver Block Diagram 217 8-2 IR Remote Signal Noise Filtering 218 8-3 Reception of 8-Bit Data with No Leader 219 8-4 Reception of 8-Bit Data with Leader 219 8-5 Conditions for Detecting Data Formats 220 8-6 Pin Edge Detection 221 9-1 Closed-Caption Decoder Block Diagram 227 9-2 Recommended ADC Configuration 228 9-3 External Connection with Both CCD0 and CCD1 Unused 228 9-4 External Connection with Only CCD1 Unused 228 9-5 Clamping Circuit 229 9-6 Sync Separator Circuit Block Diagram 231 9-7 HSYNC Securement and Interpolation 232 9-8 VSYNC Masking 233 9-9 Data Slice Level Calculation 233 9-10 Sampling Clock Timing Determination 235 9-11 Caption Data Capture Timing 235 9-12 SLSF and SLHD Multiplexing 238 9-13 Backporch Position Setting 244 9-14 Sync Separator Level 244 9-15 BSP and PSP Multiplexing 245 10-1 PWM Output Waveform 249 10-2 PWM Block Diagram 250 11-1 P00/RMIN/IRQ0 (Port 0) 252 11-2 P03/ADIN0 to P07/ADIN4 (Port 0) 253 11-3 P10/ADIN5/IRQ1, P11/ADIN6/IRQ2, and P12/ADIN7/IRQ3 (Port 1) 254 11-4 P13/ADIN8/WDOUT and P14/ADIN9/STOP (Port 1) 255 11-5 P15/ADIN10/PWM0 and P16/ADIN11/PWM1 (Port 1) 256 11-6 /PWM2 (Port 1), P20/PWM3, P21/PWM4, P22/PWM5, and P23/PWM6 (Port 2) 257 11-7 P24/TM4IC/SBT1 (Port 2) 258 11-8 P27/TM0IO (Port 2) 259 11-9 P35/DAROUT/R, P36/DAGOUT/G, P37/DABOUT/B (Port 3), and P40/DAYMOUT/YM (Port 4) 260 11-10 P25/TM4IOB/SBI1/SBD1 and P26/TM4IOA/SBO1 (Port 2) 261 11-11 P55 and P56 (Port 5) 262 11-12 P57/SBT0 (Port 5) 263 11-13 P02/SCL1 (Port 0) and P61/SCL0 (Port 6) 264 11-14 P01/SDA1 (Port 1) and P60/SDA0 (Port 6) 265 11-15 P31/CVBS0 and P32/CVBS1 (Port 3) 266

11-16 P30/CLH and P33/CLL (Port 3) 267 11-17 P34/VREF (Port 3) 268 11-18 P41/TM1IO, P42/TM5IOA, and P43/TM5IOB/HI0 (Port 4) 269 11-19 P44/TM5IC/HI1 (Port 4) 269 11-20 P45/OSDXO and P46/OSDXI (Port 4) 270 11-21 P47/HSYNC (Port 4) 271 11-22 P50/SYSCLK (Port 5) 272 11-23 P51/YS (Port 5) 273 11-24 P52/IRQ4/VI0 (Port 5) 274 11-25 P53/RST (Port 5) 275 11-26 P54/IRQ5/VSYNC (Port 5) 276 12-1 ROM Area Schematic Diagram 288 12-2 ROM Correction Flow 288 12-3 ROM Correction Block Diagram 289 13-1 Example of I2C Bus Application 293 13-2 Connection of Two Microcontrollers to the I2C Bus 294 13-3 I2C Bus Interface Operation 295 13-4 I2C Bus Controller Block Diagram 296 13-5 Pin Control Circuit for the I2C Bus Controller 298 13-6 SDA and SCL Waveforms 299 13-7 Waveform for Master Transmitter Transitioning to Master Receiver 301 13-8 Waveform for Slave Receiver Transitioning to Slave Transmitter 303 14-1 H Counter Block Diagram 307 14-2 H Counter Operation Example 307 14-3 H Counter Input Signal Timing 308 B-1 Memory Map for Onboard Serial Programming Mode 316 B-2 PROM Writer Hardware Setup 317 B-3 Pin Configuration for Socket Adaptor 317 B-4 Serial Writer Programming Configuration 319 B-5 Serial Writer Hardware Setup 320 B-6 Target Board–Serial Writer Connection 321 B-7 Serial Writer Interface Block Diagram 322 B-8 Timing for the Serial Writer Interface 325 B-9 Load Program Start Flow 326 B-10 Flow of Branch to Reset Start Routine 327 B-11 Flow of Branch to Interrupt Start Routine 327 B-12 EEPROM Programming Flow 328

Using This Manual
About This Manual
This manual is intended for assembly-language programming engineers. It describes the internal configuration and hardware functions of the MN102H75K and MN102H85K microcontrollers. Except when discusssiing differing specifi- cations,this manual refers to the two microcontrollers as a single device : MN102H75K/85K.
Using This Manual The chapters in this manual deal with the internal blocks of the MN102H75K/ 85K. Chapters 1 to 5 provide an overview of the MN102H75K/85K’s general specifications, interrupts, power modes, timers, and serial connections. Chapters 6 to 10 describe the on-screen display and other specialized functions available with the MN102H75K/85K. Chapter 11 provides the I/O port specifications, chapter 12 describes the ROM correction feature, chapter 13 describes the I2C interface, and chapter 14 describes the H scan line counter. Appendix A provides a register map, and Appendix B describes the flash EEPROM version.
Text Conventions Where applicable, this manual provides special notes and warnings. Helpful or supplementary comments appear in the sidebar. In addition, the following symbols indicate key information and warnings:
Key information These notes summarize key points relating to an operation.
— — — Bit Name
Reset: 0
R/W: R/W R/W
The hexadecimal value (x’000000’) indicates the register address. The top row of the register diagram holds the bit numbers. Bit 15 is the most significant bit (MSB). The second row holds the bit or field names. A dash (—) indicates a reserved bit. The third row shows the reset values, and the fourth row shows the accessibility. (R = read only, W = write only, and R/W = readable/writable.)

Related Documents I MN102H Series LSI User Manual (Describes the core hardware.)
I MN102H Series Instruction Manual (Describes the instruction set.)
I MN102H Series C Compiler User Manual: Usage Guide (Describes the installation, commands, and options for the C compiler.)
I MN102H Series C Compiler User Manual: Language Description (Describes the syntax for the C compiler.)
I MN102H Series C Compiler User Manual: Library Reference (Describes the standard libraries for the C compiler.)
I MN102H Series C Source Code Debugger User Manual (Describes the use of the C source code debugger.)
I MN102H Series Installation Manual (Describes the installation of the C compiler, cross-assembler, and C source code debugger and the procedures for using the in-circuit emulator.)

1 General Description
1.1 MN102H Series Overview The 16-bit MN102H series is the high-speed linear addressing version of the MN10200 series. The new architecture in this series is designed for C-language programming and is based on a detailed analysis of the requirements for embedded applications. From miniaturization to power savings, it provides for a wide range of needs in user systems, surpassing all previous architectures in speed and functionality.
This series uses a load/store architecture for computing within the registers rather than the accumulator system for computing within the memory space, which Panasonic has used in most of its previous major series. The basic instructions are one byte/one machine cycle, drastically shrinking code size and improving compiler efficiency. The circuit is designed for submicron technology, providing optimized hardware and low system power consumption.
The devices in this series contain up to 16 megabytes of linear address space and enable highly efficient program development. In addition, the optimized hardware structure allows for low system-wide power consumption even in large systems.
1.2 MN102H Series Features Designed for embedded applications, the MN102H series contains a flexible and optimized hardware architecture as well as a simple and efficient instruction set. It provides both economy and speed. This section provides the features of the MN102H series CPU.
I High-speed signal processing An internal multiplier multiplies two 16-bit registers for a 32-bit product in a single cycle. In addition, the hardware contains a saturation calculator to ensure that no signal processing is missed and to increase signal processing speed.
I Linear addressing for large systems The MN102H series provides up to 16 megabytes of linear address space. With linear addressing, the CPU does not detect any borders between memory banks, which provides an effective development environment. The hardware architecture is also optimized for large-scale designs. The memory is not divided into instruction and data areas, so operations can share instructions.

I Single-byte basic instruction length The MN102H series has replaced general registers with eight internal CPU registers divided functionally into four address registers (A0 - A3) and four data registers (D0 - D3). The program can address a register pair in four or less bits, and basic instructions such as register-to-register operations and load/store operations occupy only one byte.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Figure 1-1 Conventional vs. MN102H Series Code Assignments
I High-speed pipeline throughput The MN102H series executes instructions in a high-speed three-stage pipeline: fetch, decode, execute. With this architecture, the MN102H series can execute single-byte instructions in only one machine cycle (50 ns at 40 MHz).
Time Instruction 1 Fetch Decode
I Simple instruction set The MN102H series uses a streamlined set of 41 instructions, designed spe- cifically for the programming model for embedded applications. To shrink code size, instructions have a variable length of one to seven bytes, and the most frequently used basic instructions are single-byte.

MN102H Series Features
I Fast interrupt response MN102H series devices can stop executing instructions, even those with long execution cycles, to service interrupts immediately. After an interrupt occurs, the program branches to the interrupt service routine within six cycles or less. The architecture also includes a programmable interrupt handler, which allows you to adjust interrupt servicing speed within the software when necessary, improving real-time control performance.
I Flexible interrupt control structure The interrupt controller supports a maximum of 64 interrupt vectors. (Vectors 0 to 3 are nonmaskable interrupts.) Groups of up to four vectors are assigned to classes, and each class can be set to one of seven priority levels. This gives the software designer great flexibility and fine control. The core is also backwards compatible with software from previous Panasonic peripheral modules.
I High-speed, high-functionality external interface The MN102H series provides DMA, handshaking, bus arbitration, and other functions that ensure a fast, efficient interface with other devices.
I Optimal C-Language development environment The MN102H series combines hardware optimized for C language pro- gramming with a highly efficient C compiler, resulting in assembly codes the same size as that produced directly in assembly language. This gives designers the advantage of short development time in a C language envi- ronment without the trade-off in code size expansion. The PanaXSeries development tools support MN102H series devices.

I Outstanding power savings The MN102H series contains separate buses for instructions, data, and peripheral functions, which distributes and reduces load capacitance, dra- matically reducing overall power consumption. The series also supports three HALT and STOP modes for even greater power savings.
The MN102H series is the flagship product for Panasonic’s new high-per- formance architecture. Panasonic will expand the series as it strives to improve the CPU core’s performance and speed, and as it develops devices incorporating ASSPs, ASICs, internal EPROM, and other products to meet the needs of a wide array of embedded designs.
1.3 MN102H Series Description This section describes the basic architecture and functions of MN102H series devices.
I Processor status word (PSW) The PSW contains the operation status flags and interrupt mask levels flags. Note that the PSW for the MN102H series contains flags for both 16- and 24-bit operation results.
Flags for All 24 Bits Flags for Low-Order 16 Bits Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
— ST S1 S0 IE IM 2 IM 1 IM 0 VX CX NX ZX VF CF NF ZF
Reset: — 0
This bit controls whether or not the CPU calculates a saturation limit for an operation. When it is set to 1, the CPU executes a saturate operation, and when it is 0, the CPU executes a normal operation. The PXST instruction can reverse the meaning of this bit for the next (and only the next) instruc- tion.
These bits are the control field for OS software. It is reserved for the OS.
If set, this flag enables maskable interrupts; if reset, it disables them.
This field indicates the mask level (from 0 to 7) of interrupts that the CPU will accept from its seven interrupt input pins. The CPU will not accept any interrupt from a pin at a higher level than that indicated here.
If the operation causes the sign bit to change in a 24-bit signed number, this flag is set; otherwise it is reset.
If the operation resulted in a carry into (from addition) or a borrow out of (from subtraction or a comparison) the most significant bit, this flag is set; otherwise it is reset.

NX: Extension negative flag
If the most significant bit of the result of an operation has the value 1, this flag is set; if that bit is 0, this flag is reset.
If all bits of the result of an operation have the value 0, this flag is set; oth- erwise it is reset.
If the operation causes the sign bit to change in a 16-bit signed number, this flag is set; otherwise it is reset.
If the operation resulted in a carry into (from addition) or a borrow out of (from subtraction or a comparison) bit 15, this flag is set; otherwise it is reset.
If bit 15 of the result of an operation has the value 1, this flag is set; if that bit is 0, this flag is reset.
If the least significant 16 bits of the result of an operation have the value 0, this flag is set; otherwise it is reset.

I Internal registers, memory, and special function registers
Program Counter
The program counter specifies the 24-bit address of the program instruction being executed.
Address Registers
A0
The four address registers specify the location of the data in the memory. A3 is assigned as the stack pointer.
A2
A3
Data Registers
The four data registers handle all arithmetic and logic operations. When byte-length (8-bit) or word-length (16-bit) data is to be transferred to memory or to another register, an instruction adds a zero or sign extension.
D1
D2
D3
Multiplication/Division Register
The dedicated multiplication/division register stores the high- order 16 bits of the 32-bit product of multiplication operations. In division operations, before execution it stores the high-order 16 bits of the 32-bit dividend, and after execution it stores the 16-bit remainder of the quotient.
Processor Status Word
PSW
Memory, SFRs, and I/O Ports
ROM
Memory (ROM and RAM), special function registers for controlling peripheral functions, and I/O ports can all be assigned to the same address space.
CPUM, EFCR, IAGR
Internal control registers1
Interrupt control registers1
Serial interface registers1
A/D converter registers1
TMn, BCn, BRn, ...
Memory control registers1
I/O port registers1
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 23
Timer/counter registers1

I Address space The memory in the MN102H series is configured as linear address space. The instruction and data areas are not separated, so the basic segments are internal ROM, internal RAM, and special function registers.
Figure 1-5 shows the address space for the MN102H75K/85K.The internal ROM contains the instructions and the font data for the on-screen display (OSD), in any location. The internal RAM contains the MCU data and the VRAM for the OSD, in any location.
Registers
Internal RAM
8 KB
OSD
Text VRAM Graphics VRAM
Registers
Internal ROM
256 KB
OSD
Text fonts Graphic tiles

I Interrupt controller An interrupt controller external to the core controls all nonmaskable and maskable interrupts except reset. There are a maximum of sixteen interrupt classes (class 0 to 15). Each class can have up to four interrupt factors and any of seven priority levels.
Nonmaskable Interrupt Control Registers (NMICR) (
)
4 Groups 0-3 Nonmaskable Interrupt Controllers
External NMI pin input Watchdog timer Undefined instruction Interrupt occurred, but no vector exists
0 1 2 3 4 5 6
(UNICR)
(EIICR)
4 Group 4 Maskable Interrupt Controllers
Maskable Interrupt Control Registers (xx ICR)
Maskable interrupts Max. 240 vectors
External pin interrupts Peripheral interupts Group 63 Maskable Interrupt Controllers
Maskable Interrupt Control Registers (xx ICR)
The CPU checks the processor status word to determine whether or not to accept an interrupt request. If it accepts the request, automatic hardware servicing begins and the contents of the program counter and other necessary registers are pushed to the stack. The program then looks up and branches to the entry address of the interrupt service routine for the interrupt that occurred.
Interrupt preprocessing Push registers, branch to entry address, etc.
Hardware processing Push PC, PSW
Interrupt service routine Header resets interrupt vector
JMP, etc.
Max. 6 machine cycles 7 machine cycles
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 25

General Specifications
1.4 General Specifications
Table 1-1 General Specifications
Parameter Specification
Structure Internal multiplier (16-bit × 16-bit = 32-bit) and saturate calculator
Eight registers:
o Four 24-bit data registers
o Four 24-bit address registers
Other:
o 24-bit program counter
o 16-bit processor status word
o 16-bit multiply/divide register
Instruction set o 41 instructions
o 6 addressing modes
o 1-byte basic instruction length
Performance 12-MHz internal operating frequency (with a 4-MHz external oscilla- tor)
Instruction execution clock cycles:
o Minimum 1 clock cycle (83.3 ns) for register-to-register operations
o Minimum 1 clock cycle (83.3 ns) for load/store operations
o Minimum 2 clock cycles (167 ns) for branch operations
Address space o Linear address space
o Shared instruction/data space
Interrupts o 6 external
o 7 priority level settings
Low-power modes o STOP
4 MHz (48 MHz with internal PLL)

Table 1-1 General Specifications
Parameter Specification
Timer/counters Four 8-bit timers:
o Cascading function (forming 16- or 32-bit timers)
o Selectable clock source (internal or external)
o Serial interface clock generation
o Start timing generation for analog-to-digital converter
Two 16-bit timers:
o Selectable clock source (internal or external)
o PWM and one-shot pulse output
o Two-phase encoder input (4x or 1x formats)
ROM correction 16 bytes (8-bit × 16)
SYSCLK output SYSCLK or SYSCLK/214 (732.42 Hz)
Serial interfaces o Two UART/synchronous serial/I2C (master only) interfaces
o One I2C interface (multimaster; 2-channel with 1 internal circuit)
o 8-bit with 12 channels
IR remote signal receiver
o Automatic HEAMA / 5-/6-bit detection
PWM 8-bit with 7 channels (3.3-volt tolerance)
o Internal sync separator
On-screen display Three-layer format
ing, outlining, shadowing (foreground and background), shutter effect, italics (CC mode), underlining (CC mode)
I/O ports 66(MN102H75K/F75K) / 50(MN102H85K/F85K)
Package 84-pin-QFP(MN102H75K/F75K) / 64-pin-SDIL(MN102H85K/F85K)

Block Diagram
1.5 Block Diagram
Address registers Data registers
D0
T1 T2
A1
D1
A2
D2
A3
D3
MDR
A B
PSW
ALU
Operand address Program address
B u s c o n t r o l l e r
Internal RAM Internal ROM
BG BR External extension bus
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 28

Table 1-2 Block Diagram Explanation
Block Description
Clock generator An oscillation circuit connected to an external crystal supplies the clock to all blocks within the CPU.
Program counter The program counter generates addresses for queued instruc- tions. Normally it increments based on the sequencer indications, but for branch instructions it is set as the branch head address, and for interrupt servicing, it is set as the result of the ALU opera- tion.
Instruction queue This block contains up to four bytes of prefetched instructions.
Instruction decoder The instruction decoder decodes the contents of the instruction queue, generates, in the proper sequence, the control signals nec- essary for executing the instruction, and controls every block in the chip to execute the instruction.
Quick decoder This block decodes instructions that are 2 bytes or larger in at a much faster rate than previously possible.
This block controls the operation of every block within the CPU using the results from the instruction decoder and interrupt requests.
ALU Arithmetic and logic unit. This block calculates the operand addresses for arithmetic operations, logic operations, shift opera- tions, relative indirect register addressing, indexed addressing, and indirect register addressing.
Multiplier This block multiplies 16 bits × 16 bits = 32 bits.
Internal ROM and RAM
These memory blocks contain the program, data, and stack areas.
The address registers store the addresses in memory to be accessed in data transfers. In relative indirect, indexed, and indi- rect addressing modes, they store the base address.
Operation registers (Dn, MDR)
The data registers store data to be transferred to memory and results of operations. In indexed and indirect addressing modes, they store the offset address.
The multiplication/division register stores data for multiplication and division operations.
PSW The processor status word contains flags that indicate the status of the CPU interrupt controller and provide information about oper- ation results.
Interrupt controller This block detects interrupt requests from peripheral function blocks and requests the CPU to service the interrupt.
Bus controller This block controls the connection between the CPU’s internal and external buses. It also contains a bus arbitration function.
MN102H series devices contain a wide range of internal periph- eral devices, such as timers, serial interfaces, ADCs, and DACs.
Instruction execution controller · Address registers (An) · Internal peripheral functions

Pin Descriptions
1.6 Pin Descriptions
1.6.1 MN102H85K Pin Description
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
VSS OSC2 OSC1 VDD P61, SCL0 * P60, SDA0 * P57, SBT0 P56, SBI0, SBD0 P55, SBO0 P54, IRQ5, VSYNC P53, RST P52, IRQ4, VI0 TEST P51, YS P50, SYSCLK P47, HSYNC P46, OSDXI P45, OSDXO P44, TM5IC, HI1 * P43, TM5IOB, HI0 * P42, TM5IOA * P41, TM1IO * VCOI PDO P40, DAYMOUT, YM P37, DABOUT, B P36, DAGOUT, G P35, DAROUT, R VREF, P34 IREF COMP AVDD
* P01, SDA1 * P02, SCL1 P03, ADIN0 P04, ADIN1 P05, ADIN2 P06, ADIN3 P07, ADIN4 P10, ADIN5, IRQ1 P11, ADIN6, IRQ2 P12, ADIN7, IRQ3 P13, ADIN8, WDOUT
P14, ADIN9, STOP P15, ADIN10, PWM0 P16, ADIN11, PWM1
P17, PWM2 P20, PWM3 P21, PWM4 P22, PWM5 P23, PWM6 P24, TM4IC, SBT1 P25, TM4IOB, SBI1, SBD1
P27, TM0IO
VDD (VPP)
P30, CLH
VREFHS P31, CVBS0
VSS P32, CVBS1
VREFLS P33, CLL
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 30

1.6.2 MN102H75K Pin Description

MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 31

Pin Descriptions
Table 1-3 Pin Functions
Block Pin Name I/O Pin Count Description
VDD I 1 Voltage supply
VSS I 2 Ground reference
AVDD I 1 Analog voltage supply
VDD/VPP I 1 Voltage supply: VDD in mask ROM version and VPP in EEPROM version
SYSCLK O 1 System clock output
OSC1 I 1 Oscillator input connection (with internal PLL)
OSC2 O 1 Oscillator output connection (with internal PLL)
OSDXI I 1 OSD oscillator input connection (alt. function: P46)
OSDXO O 1 OSD oscillator output connection (alt. function: P45)
Reset RST I/O 1 Reset (alt. function: P53)
Interrupts (external) IRQ0–IRQ5 I 6 External interrupt request to microcontroller (alt. functions: P00, P10, P11, P12, P52, P54)
HSYNC I 1 Horizontal sync signal input
VSYNC I 1 Vertical sync signal input
YS O 1 Video signal cut
TMnIOA (n=4,5) I/O 2 Input capture/output compare A
TMnIOB (n=4,5) I/O 2 Input capture/output compare B
TMnIC (n=4,5) I 2 Timer/counter clear signal
8-bit (4) TMnIO (n=0,1) I/O 2 Timer clock input/timer output
SBI0/SBI1 I 2 Serial data input
SBD0/SBD1 I/O 2 Serial data input
SBO0/SBO1 I/O 2 Serial data output
SBT0/SBT1 I/O 2 Serial clock signal
SDA0/SDA1 I/O 2 I2C data
I2C interfaces (2)
SCL0/SCL1 I/O 2 I2C clock
IR remote signal receiver RMIN I 1 Remote signal input
PWM (8-bit, 7-channel) PWM0–PWM6 O 7 Pulse width modulator output

Table 1-3 Pin Functions (Continued)
Block Pin Name I/O Pin Count Description
P00–P07 I/O 8 General-purpose port 0 I/O
P10–P17 I/O 8 General-purpose port 1 I/O
P20–P27 I/O 8 General-purpose port 2 I/O
P30–P37 I/O 8 General-purpose port 3 I/O
P40–P47 I/O 8 General-purpose port 4 I/O
P50–P57 I/O 8 General-purpose port 5 I/O
P60–P61 I/O 2 General-purpose port 6 I/O
I/O ports only in MN102H75K/F75K
P70–P77 I/O 8 General-purpose port 7 I/O
P80–P87 I/O 8 General-purpose port 8 I/O
CVBS0/CBVS1 I 2 Composite video signal input
CLH I 1 Clamp level high input
CLL I 1 Clamp level low input
VREFHS I 1 CCD reference voltage input
VREFLS I 1 CCD reference voltage input
A/D converter (12-channel) ADIN0–ADIN11 I 12 Analog signal input
DAROUT (1) O 1 DAC output (red)
DAGOUT (1) O 1 DAC output (green)
DABOUT (1) O 1 DAC output (blue)
DAYMOUT (1) O 1 DAC output (YM)
IREF I 1 Resistance connection for DAC bias current setting
VREF I 1 DAC reference voltage connection
COMP I 1 DAC phase compensator connection
VCOI I 1 Internal VCO input (external LPF input)
PDO O 1 Internal phase compare output (external LPF output)
STOP O 1 STOP mode status signal
WDOUT O 1 Watchdog timer overflow signal
Test TEST I 1 Test pin (Connect to ground.)

Pin Descriptions
I Considerations for power supply, clock, and reset pins
V DD
AV DD
MN102H75K MN102H85K
V SS
AV SS
V SS
OSC1
OSC2
0.1 µF
10 kΩ - 50 kΩ
- 10 µF - 100 µF
Figure 1-13 Reset Pin Connection Example 1
OSDXI OSDXO
OSDXI OSDXO
I Connection the PLL circuit The MN102H75K/85K contains an internal PLL circuit. To use this circuit, you must connect it to an external (lag-lead) filter.

1.7 Bus Interface
1.7.1 Description The bus interface operates in external extension mode. Figure 1-15 provides the memory space for the MCU in this mode.
Internal RAM (8192 bytes (*3))
External memory space 0 (CS0 signal):
IR remote signal receive I2C OSD CCD0 CCD1 H counter PWM
(256 Kbytes (*1))
External memory space 1 (CS1 signal) External memory space 2 (CS2 signal)
Cannot be accessed.
External memory space 3 (CS3 signal)
Expandable up to 16 MB
Figure 1-15 Memory Space in External Extension Mode
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 35
![Page 37 of the Lucent Technologies Telephone (MN102H75K) user manual — IOW[1:0]: Wait setting for internal I/O space](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-37.webp?w=400)
Bus Interface
1.7.2 Bus Interface Control Registers The external memory wait register (EXWMD) and memory mode register 1 (MEMMD1) control the bus interface.
EW 33 EW 32 EW 31 EW 30 EW 23 EW 22 EW 21 EW 20 EW 13 EW 12 EW 11 EW 10 EW 03 EW 02 EW 01 EW 00
Reset: 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0
R/W : R/W
These fields contain the wait settings for external memory spaces 3, 2, 1, and 0, respectively. One wait corresponds to one instruction cycle. When the external oscillator is 4 MHz, one wait is 83 ns.
The OSD, VBI0, VBI1, I2C, IR remote signal receiver, and H counter blocks apply to external memory space 0.
EW[n3:n0] Setting Wait Count Cycles 0000 0.0 1.0 0001 Reserved 0010 1.0 2.0 0011 Reserved 0100 2.0 3.0 0101 Reserved 0110 3.0 4.0 0111 Reserved 1000 4.0 5.0 1001 Reserved 1010 5.0 6.0 1011 Reserved 1100 6.0 7.0 1101 Reserved 1110 7.0 8.0 1111 Reserved
EB31 EB32 EB21 EB20 EB11 EB10 EB01 EB00 BRS1 BRS0 BRC3 BRC2 BRC1 BRC0 IOW 1 IOW 0
Reset: 0 1 1
R/W : R/W
Write 0s to bits 15 to 2.
00: 1 wait 01: Reserved 10: 2 waits 11: 3 waits
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 36

2 Interrupts
2.1 Description The most important factor in real-time control is an MCU’s speed in servicing interrupts. The MN102H75K/85K has an extremely fast interrupt response time due to its ability to abort instructions, such as multiply or divide, that require multiple clock cycles. The MN102H75K/85K re-executes an aborted instruction after returning from the interrupt service routine.
This section describes the interrupt system in the MN102H75K/85K. The MN102H75K/85K contains 36 interrupt group controllers. Each controls a single interrupt group. Because each group contains only one interrupt vector, the MN102H75K/85K can handle interrupts much quicker than previously possible. Each interrupt group belongs to one of twelve classes, which defines its interrupt priority level.
With the exception of reset interrupts, all interrupts from timers, other peripheral circuits, and external pins must be registered in an interrupt group controller. Once they are registered, interrupt requests are sent to the CPU in accordance with the interrupt mask level (0 to 6) set in the interrupt group controller. Groups 1 to 3 are dedicated to system interrupts. Table 2-1 compares the interrupt parameters of the MN102H75K/85K to those of the MN102L35G, the com- parable MCU in the previous generation of the 16-bit series.
Parameter MN102L35G MN102H75K/85K
Interrupt groups (IAGR group numbers
4 vectors per group (Separated by interrupt
1 vector per group
(Group number gener- ated for each interrupt)
Interrupt response time Good Excellent
Interrupt level settings 4 vectors per level 4 vectors per level
Software compatibility — Easily modified
The MN102H75K/85K has six external interrupt pins. Set the interrupt condition (positive edge, negative edge, either edge, or active low) in the EXTMD register.
. . . Internal interrupts
IRQ3 IRQ4
IRQ5
Figure 2-1 Interrupt Controller Block Diagram
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 37

Description
Group 0 Group 1 Watchdog timer Group 2 Undefined instruction Group 3 Error interrupt
Group 4 External interrupt 0 Group 5 External interrupt 1 Group 6 Group 7
Group 8 External interrupt 2 Group 9 External interrupt 3 Group 10 Group 11
Group 12 External interrupt 4 Group 13 External interrupt 5 Group 14 Group 15
Group 16 Timer 4 compare/capture B Group 17 Timer 4 compare/capture A Group 18 Timer 4 underflow interrupt Group 19 VBI interrupt (1)
4 00FC62 (R/W) 00FC64 (R/W) 00FC66 (R/W)
Group 20 Timer 5 compare/capture B Group 21 Timer 5 compare/capture A Group 22 Timer 5 underflow interrupt Group 23 VBI interrupt (2)
5 00FC6A (R/W) 00FC6C (R/W) 00FC6E (R/W)
Group 24 Timer 2 underflow interrupt Group 25 Timer 1 underflow interrupt Group 26 Timer 0 underflow interrupt Group 27 Remote signal receive int.
6 00FC72 (R/W) 00FC74 (R/W) 00FC76 (R/W)
Group 28 Address 3 match interrupt Group 29 Address 2 match interrupt Group 30 Address 1 match interrupt Group 31 Address 0 match interrupt
7 00FC7A (R/W) 00FC7C (R/W) 00FC7E (R/W)
Group 32 A/D conversion end int. Group 33 Serial 0 transmission end Group 34 Serial 0 reception end Group 35
8 00FC82 (R/W) 00FC84 (R/W)
Group 36 VBIVSYNC interrupt (1) Group 37 VBIVSYNC interrupt (2) Group 38 Timer 3 underflow interrupt Group 39
9 00FC8A (R/W) 00FC8C (R/W)
Group 40 OSD interrupt (graphics) Group 41 OSD interrupt (text) Group 42 Group 43
Group 44 Serial 1 transmission end Group 45 Serial 1 reception end Group 46 I2C interrupt Group 47
11 00FC9A (R/W) 00FC9C (R/W)
Figure 2-2 Interrupt Vector Group and Class Assignments
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 38

Max. 6 cycles
The interrupt request is deleted in the header (Included in the cycle count shown to the left.)
Table 2-2 Handler Preprocessing
Sequence Assembler Bytes Cycles
Push registers add -8,A3
Interrupt ACK mov (FC0E),D0 3 1
Generate header address for interrupt service routine
Branch jsr (A0) 2 5
Sequence Assembler Bytes Cycles
Pop registers mov (A3),A0

2.2 Interrupt Setup Examples
2.2.1 Setting Up an External Pin Interrupt In this example, an interrupt occurs on a falling-edge signal from the IRQ0 (P00) external interrupt pin, and the interrupt priority level is 5.
On reset, the external edge setting in the EXTMD register is low (b’00’ = active- low interrupt), and the IQ0IR bit of the IQ0ICL register is 0.
CORE
ROM, RAM
P1
Interrupts
Bus Controller
IRQ0
P0
P3
P2
Timers 0-5
Serial I/Fs
ADC
Figure 2-4 Block Diagram of External Pin Interrupt
I Enabling external interrupt 0 1. Set the interrupt conditions for the IRQ0 (P00) pin. For this example, set the IQ0TG[1:0] bits of EXTMD to b’10’ (negative-edge-triggered interrupt).
1 IQ5TG
0 IQ4TG
1 IQ4TG
0 IQ3TG
1 IQ3TG
0 IQ2TG
1 IQ2TG
0 IQ1TG
1 IQ1TG
0 IQ0TG
1 IQ0TG
Setting: — 0 1 0

Now if a falling edge occurs on IRQ0 (P00), an interrupt will occur. If the CPU accepts the interrupt, the program branches to address x’080008’.
I Servicing the interrupt The main program normally gen- erates and branches to the inter- rupt start address.
During the interrupt service rou- tine, prevent the CPU from accepting any other maskable interrupts by setting the IM[2:0] and IE bits of the PSW to 0.
To accept the same interrupt during the interrupt service rou- tine, clear IR flag at the begin- ning of it.
EXTMD
Low level Falling edge
IQ0IR
EXTMD(W) IQ0ICL(B)
IQ0ICL(B) IQ0ICH(B)
IQ0ICL(B)
Figure 2-5 Timing for External Pin Interrupt Setup (Example)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 41

2.2.2 Setting Up a Watchdog Timer Interrupt
In this example, a watchdog timer reset occurs. The watchdog timer starts running after a reset, when the NWDEN flag in the CPU mode register (CPUM) is enabled (set to 0). When the watchdog timer overflows, a nonmaskable interrupt occurs. This means that the watchdog timer must be cleared in the main program.
The watchdog timer interrupt is provided for detecting and handling racing. Normal operation is not guaranteed if the program returns after a watchdog interrupt. For actions requiring returns, use a timer interrupt.
CORE
ROM, RAM
P1
Interrupts
Bus Controller
P5
P3
P2
Timers 0-5
Serial I/Fs
ADC
Figure 2-6 Block Diagram of Watchdog Timer Interrupt
Enabling watchdog timer interrupts 1. Enable interrupts by writing a 1 to the interrupt enable flag (IE) in the PSW and setting the interrupt masking level (IM[2:0]) to 7 (b’111’).
If WDM[1:0] = 00, a watchdog interrupt occurs when the watch- dog timer counts 216 cycles (5.4613 ms at 4-MHz fOSC/12- MHz fSYSCLK). The WDM set- tings have the following mean- ings:
WDM
1 WDM
0 — OSC
Setting: 0
I Clearing the watchdog timer The main program normally clears the watchdog timer prior to a watchdog interrupt.

The main program normally gen- erates and branches to the inter- rupt start address.
If the CPU accepts an interrupt, the program branches to address x’080008’.
The oscillator delay timer shares the counter for the watchdog timer. The oscillator delay timer is activated when the circuit exits the STOP mode, so the program must clear the WDID flag to 0 prior to entering the STOP mode. It must also reclear WDID after returning to NORMAL mode. For further details, see section 2-6, “Standby Function,” in the MN10200 Series Linear Addressing Version LSI User Manual.
NWDEN (CPUM)
WDID (WDICR)
CPUM (W) CPUM (W) CPUM (W) (1) (2) (3) (2)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 43

2.3 Interrupt Control Registers A control register is assigned to each interrupt vector group. Except for the class 0 registers (WDICR, PIICR, and EIICR), the control registers allow you to enable and set the priority level for interrupt groups.
Below is the general format of the registers in class 0 and classes 1 to 11.
WD (watchdog overflow interrupts) PI (undefined instruction interrupts) EI (interrupt error interrupts)
XICR (System Interrupt)
ID: Interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
Classes 1–11 (X):
IQ (external interrupts) TM (timer interrupts) SC (serial interrupts) I2C (I2C interrupts) OSD (OSD interrupts) AN (A/D conversion end interrupts) RMC (remote signal receive interrupts) VBI (VBI interrupts) ADM (address match interrupts)
LV[2:0]: Interrupt priority level
Sets the priority from 0 to 6 (000 = 0, 001 = 1, etc.). When LV = 7, inter- rupts are not serviced.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 44

XnICL (System Interrupt)
IR: Interrupt request flag
0: No interrupt requested 1: Interrupt requested
ID: Interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
The following is an example program setting an interrupt group’s priority level (LV field) and enabling the interrupt group (IE) in the interrupt control register (XnICH). Note that interrupts must be disabled during this routine.
Example 2-1 Setting the Interrupt Priority Level... ; and 0xf7ff,psw ;Clear the IE bit of the PSW. nop ; Inserted to ensure that IE clears nop ; completely, so XnICH is accessible. mov d0,(XnICH) ;Write to LV/IE mov (XnICH),d0 ;Synchronize with the store buffer. or 0x0800,psw ;Set the IE bit of the PSW ;
The program does not need to clear the IE bit of the PSW to disable interrupts during interrupt servicing, since the interrupt service routine has already cleared it.
You can replace the NOP instructions in the example above with any instruction except for those that modify the PSW IE bit or the LV or IE bits of an XnICH register. Inserting any of these instructions would cause interrupt error to occur.
The example includes two NOP instructions to ensure that the minimum number of cycles required for a write to IE have passed. However, you can also insert more than two NOPs.
Table 2-4 provides a list of the interrupt control registers, and a description of the fields in each register follows.

Table 2-4 Interrupt Control Registers
IAGR x’00FC0E’ R Accepted interrupt group number register
WDICR x’00FC42’ R/W Watchdog interrupt control register
PIICR x’00FC44’ R/W Undefined instruction interrupt control register
EIICR x’00FC46’ R Interrupt error interrupt control register
EXTMD x’00FCF8’ R/W External interrupt mode register
R/W R/W
External interrupt 0 interrupt control register (low) External interrupt 0 interrupt control register (high)
R/W R/W
External interrupt 1 interrupt control register (low) External interrupt 1 interrupt control register (high)
R/W R/W
External interrupt 2 interrupt control register (low) External interrupt 2 interrupt control register (high)
R/W R/W
External interrupt 3 interrupt control register (low) External interrupt 3 interrupt control register (high)
R/W R/W
External interrupt 4 interrupt control register (low) External interrupt 4 interrupt control register (high)
R/W R/W
External interrupt 5 interrupt control register (low) External interrupt 5 interrupt control register (high)
x’00FC60’ x’00FC61’ x’00FC62’ x’00FC63’ x’00FC64’ x’00FC65’
Timer 4 compare/capture B interrupt control register (low) Timer 4 compare/capture B interrupt control register (high) Timer 4 compare/capture A interrupt control register (low) Timer 4 compare/capture A interrupt control register (high) Timer 4 underflow interrupt control register (low) Timer 4 underflow interrupt control register (high)
R/W R/W
VBI (1) interrupt control register (low) VBI (1) interrupt control register (high)
x’00FC68’ x’00FC69’ x’00FC6A’ x’00FC6B’ x’00FC6C’ x’00FC6D’
Timer 5 compare/capture B interrupt control register (low) Timer 5 compare/capture B interrupt control register (high) Timer 5 compare/capture A interrupt control register (low) Timer 5 compare/capture A interrupt control register (high) Timer 5 underflow interrupt control register (low) Timer 5 underflow interrupt control register (high)
R/W R/W
VBI (2) interrupt control register (low) VBI (2) interrupt control register (high)
R/W R/W
Timer 2 underflow interrupt control register (low) Timer 2 underflow interrupt control register (high)
R/W R/W
Timer 1 underflow interrupt control register (low) Timer 1 underflow interrupt control register (high)
R/W R/W
Timer 0 underflow interrupt control register (low) Timer 0 underflow interrupt control register (high)
R/W R/W
Remote signal receive interrupt control register (low) Remote signal receive interrupt control register (high)

Table 2-4 Interrupt Control Registers
ADM3ICL ADM3ICH ADM2ICL ADM2ICH ADM1ICL ADM1ICH ADM0ICL ADM0ICH
x’00FC78’ x’00FC79’ x’00FC7A’ x’00FC7B’ x’00FC7C’ x’00FC7D’ x’00FC7E’ x’00FC7F’
Address 3 match interrupt control register (low) Address 3 match interrupt control register (high) Address 2 match interrupt control register (low) Address 2 match interrupt control register (high) Address 1 match interrupt control register (low) Address 1 match interrupt control register (high) Address 0 match interrupt control register (low) Address 0 match interrupt control register (high)
R/W R/W
A/D conversion end interrupt control register (low) A/D conversion end interrupt control register (high)
x’00FC82’ x’00FC83’ x’00FC84’ x’00FC85’
Serial 0 transmission end interrupt control register (low) Serial 0 transmission end interrupt control register (high) Serial 0 reception end interrupt control register (low) Serial 0 reception end interrupt control register (high)
R/W R/W
VBIVSYNC (1) interrupt control register (low) VBIVSYNC (1) interrupt control register (high)
R/W R/W
VBIVSYNC (2) interrupt control register (low) VBIVSYNC (2) interrupt control register (high)
R/W R/W
Timer 3 underflow interrupt control register (low) Timer 3 underflow interrupt control register (high)
x’00FC90’ x’00FC91’ x’00FC92’ x’00FC93’
OSD (graphics) interrupt control register (low) OSD (graphics) interrupt control register (high) OSD (text) interrupt control register (low) OSD (text) interrupt control register (high)
x’00FC98’ x’00FC99’ x’00FC9A’ x’00FC9B’
Serial 1 transmission end interrupt control register (low) Serial 1 transmission end interrupt control register (high) Serial 1 reception end interrupt control register (low) Serial 1 reception end interrupt control register (high)
R/W R/W
I2C interrupt control register (low) I2C interrupt control register (high)

IAGR: Accepted Interrupt Group Number Register x’00FC0E ’
— GN5 GN4 GN3 GN2 GN1 GN0 — —
Reset: 0
R/W: R
IAGR returns the group number of an accepted interrupt, indicated in the 6-bit GN field. When the interrupt handler has to calculates the header address for the interrupt service routine, it merely needs to add the contents of IAGR to the header address for the table in which are registered the vec- tor addresses for servicing all interrupts. IAGR is a 16-bit access register.
Contains the group number multiplied by four.
1 IQ5TG
0 IQ4TG
1 IQ4TG
0 IQ3TG
1 IQ3TG
0 IQ2TG
1 IQ2TG
0 IQ1TG
1 IQ1TG
0 IQ0TG
1 IQ0TG
Reset: 0
R/W: R/W R/W
EXTMD sets the trigger conditions for external interrupts. IQnTG[1:0] sets the interrupt mode on the associated IRQ pin. Each IRQ pin can have any polarity or edge setting. EXTMD is a 16-bit access register.
The watchdog timer interrupt is provided for detecting and handling racing. Normal operation is not guaranteed if the program returns after a watchdog interrupt. For actions requiring returns, use a timer interrupt.
WDICR is an 8-bit access register.
0: Interrupt undetected 1: Interrupt detected
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 48

PIICR: Undefined Instruction Interrupt Control Register x’00FC44’
PIICR is an 8-bit access register.
0: Interrupt undetected 1: Interrupt detected
EIICR: Interrupt error Interrupt Control Register x’00FC46’
—
EIICR does not exist in the hardware, but if the CPU finds no matching interrupt vector for an interrupt that occurs, it writes a C to IAGR to indi- cate that it detected an abnormality. EIICR is an 8-bit access register.
IQ0ICL requests and verifies interrupt requests for external interrupt 0. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ0ID: External interrupt 0 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 49

IQ0ICH: External Interrupt 0 Interrupt Control Register (High) x’00FC49’
IQ0ICH sets the priority level for and enables external interrupt 0. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
IQ1ICL: External Interrupt 1 Interrupt Control Register (Low) x’00FC4A’
IQ1ICL requests and verifies interrupt requests for external interrupt 1. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ1ID: External interrupt 1 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
IQ1ICH: External Interrupt 1 Interrupt Control Register (High) x’00FC4B’
IQ1ICH enables external interrupt 1. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for external interrupt 1 is written to the IQ0LV[2:0] field of the IQ0ICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 50

IQ2ICL: External Interrupt 2 Interrupt Control Register (Low) x’00FC50’
IQ2ICL requests and verifies interrupt requests for external interrupt 2. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ2ID: External interrupt 2 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
IQ2ICH: External Interrupt 2 Interrupt Control Register (High) x’00FC51’
IQ2ICH sets the priority level for and enables external interrupt 2. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
IQ3ICL: External Interrupt 3 Interrupt Control Register (Low) x’00FC52’
IQ3ICL requests and verifies interrupt requests for external interrupt 3. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ3ID: External interrupt 3 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 51

IQ3ICH: External Interrupt 3 Interrupt Control Register (High) x’00FC53’
IQ3ICH enables external interrupt 3. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for external interrupt 3 is written to the IQ2LV[2:0] field of the IQ2ICH register.
0: Disable 1: Enable
IQ4ICL: External Interrupt 4 Interrupt Control Register (Low) x’00FC58’
IQ4ICL requests and verifies interrupt requests for external interrupt 4. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ4ID: External interrupt 4 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
IQ4ICH: External Interrupt 4 Interrupt Control Register (High) x’00FC59’
IQ4ICH sets the priority level for and enables external interrupt 4. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 52

IQ5ICL: External Interrupt 5 Interrupt Control Register (Low) x’00FC5A’
IQ5ICL requests and verifies interrupt requests for external interrupt 5. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
IQ5ID: External interrupt 5 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
IQ5ICH: External Interrupt 5 Interrupt Control Register (High) x’00FC5B’
IQ5ICH enables external interrupt 5. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for external interrupt 5 is written to the IQ4LV[2:0] field of the IQ4ICH register.
0: Disable 1: Enable
TM4CBICL: Timer 4 Compare/Capture B Interrupt Control Register (Low) x’00FC60’
IR — — — TM4CB
ID
TM4CBICL detects and requests timer 4 compare/capture B interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM4CBID: Timer 4 compare/capture B interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 53

TM4CBICH: Timer 4 Compare/Capture B Interrupt Control Register (High) x’00FC61’
TM4CB
TM4CB
LV0 — — — TM4CB
IE
TM4CBICH sets the priority level for and enables timer 4 compare/capture B interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
TM4CAICL: Timer 4 Compare/Capture A Interrupt Control Register (Low) x’00FC62’
IR — — — TM4CA
ID
TM4CAICL detects and requests timer 4 compare/capture interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM4CAID: Timer 4 compare/capture A interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM4CAICH: Timer 4 Compare/Capture A Interrupt Control Register (High) x’00FC63’
IE
TM4CAICH enables timer 4 compare/capture interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for timer 4 compare/capture interrupts is written to the TM4CBLV[2:0] field of the TM4CBICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 54

TM4UDICL: Timer 4 Underflow Interrupt Control Register (Low) x’00FC64’
IR — — — TM4UD
ID
TM4UDICL detects and requests timer 4 underflow interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM4UDID: Timer 4 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM4UDICH: Timer 4 Underflow Interrupt Control Register (High) x’00FC65’
IE
TM4UDICH enables timer 4 underflow interrupts. It is an 8-bit access regis- ter. Use the MOVB instruction to access it.
The priority level for timer 4 underflow interrupts is written to the TM4CBLV[2:0] field of the TM4CBICH register.
0: Disable 1: Enable
VBIICL: VBI (1) Interrupt Control Register (Low) x’00FC66’
IR — — — VBI
ID
VBIICL detects and requests VBI (1) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
VBIID: VBI (1) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 55

VBIICH: VBI (1) Interrupt Control Register (High) x’00FC67’
IE
VBIICH enables VBI (1) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for VBI (1) interrupts is written to the TM4CBLV[2:0] field of the TM4CBICH register.
0: Disable 1: Enable
TM5CBICL: Timer 5 Compare/Capture B Interrupt Control Register (Low) x’00FC68’
IR — — — TM5CB
ID
TM5CBICL detects and requests timer 5 compare/capture B interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM5CBID: Timer 5 compare/capture B interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM5CBICH: Timer 5 Compare/Capture B Interrupt Control Register (High) x’00FC69’
TM5CB
TM5CB
LV0 — — — TM5CB
IE
TM5CBICH sets the priority level for and enables timer 5 compare/capture B interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 56

TM5CAICL: Timer 5 Compare/Capture A Interrupt Control Register (Low) x’00FC6A’
IR — — — TM5CA
ID
TM5CAICL detects and requests timer 5 compare/capture interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM5CAID: Timer 5 compare/capture A interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM5CAICH: Timer 5 Compare/Capture A Interrupt Control Register (High) x’00FC6B’
IE
TM5CAICH enables timer 5 compare/capture interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for timer 5 compare/capture interrupts is written to the TM5CBLV[2:0] field of the TM5CBICH register.
0: Disable 1: Enable
TM5UDICL: Timer 5 Underflow Interrupt Control Register (Low) x’00FC6C’
IR — — — TM5UD
ID
TM5UDICL detects and requests timer 5 underflow interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM5UDID: Timer 5 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 57

TM5UDICH: Timer 5 Underflow Interrupt Control Register (High) x’00FC6D’
IE
TM5UDICH enables timer 5 underflow interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
The priority level for timer 5 underflow interrupts is written to the TM5CBLV[2:0] field of the TM5CBICH register.
0: Disable 1: Enable
VBIWICL: VBI (2) Interrupt Control Register (Low) x’00FC6E’
IR — — — VBIW
ID
VBIWICL detects and requests VBI (2) interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
VBIWID: VBI (2) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
VBIWICH: VBI (2) Interrupt Control Register (High) x’00FC6F’
IE
VBIWICH register enables VBI (2) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for VBI (2) interrupts is written to the TM5CBLV[2:0] field of the TM5CBICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 58

TM2UDICL: Timer 2 Underflow Interrupt Control Register (Low) x’00FC70’
IR — — — TM2UD
ID
TM2UDICL register detects and requests timer 2 underflow interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM2UDID: Timer 2 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM2UDICH: Timer 2 Underflow Interrupt Control Register (High) x’00FC71’
TM2UD
TM2UD
LV0 — — — TM2UD
IE
TM2UDICH sets the priority level for and enables timer 2 underflow inter- rupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
TM1UDICL: Timer 1 Underflow Interrupt Control Register (Low) x’00FC72’
IR — — — TM1UD
ID
TM1UDICL detects and requests timer 1 underflow interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM1UDID: Timer 1 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 59

TM1UDICH: Timer 1 Underflow Interrupt Control Register (High) x’00FC73’
IE
TM1UDICH enables timer 1 underflow interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
The priority level for timer 1 underflow interrupts is written to the TM2UDLV[2:0] field of the TM2UDICH register.
0: Disable 1: Enable
TM0UDICL: Timer 0 Underflow Interrupt Control Register (Low) x’00FC74’
IR — — — TM0UD
ID
TM0UDICL register detects and requests timer 0 underflow interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM0UDID: Timer 0 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
TM0UDICH: Timer 0 Underflow Interrupt Control Register (High) x’00FC75’
IE
TM0UDICH enables timer 0 underflow interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
The priority level for timer 0 underflow is written to the TM2UDLV[2:0] field of the TM2UDICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 60

RMCICL: Remote Signal Receive Interrupt Control Register (Low) x’00FC76’
IR — — — RMC
ID
RMCICL detects and requests remote signal receive interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
RMCID: Remote signal receive interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
RMCICH: Remote Signal Receive Interrupt Control Register (High) x’00FC77’
IE
RMCICH enables remote signal receive interrupts. It is an 8-bit access regis- ter. Use the MOVB instruction to access it.
The priority level for remote signal receive interrupts is written to the TM2UDLV[2:0] field of the TM2UDICH register.
0: Disable 1: Enable
ADM3ICL: Address 3 Match Interrupt Control Register (Low) x’00FC78’
IR — — — ADM3
ID
ADM3ICL detects and requests address match 3 interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
ADM3ID: Address match 3 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 61

ADM3ICH: Address 3 Match Interrupt Control Register (High) x’00FC79’
ADM3
ADM3
LV0 — — — ADM3
IE
ADM3ICH sets the priority level for and enables address match 3 inter- rupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
ADM2ICL: Address 2 Match Interrupt Control Register (Low) x’00FC7A’
IR — — — ADM2
ID
ADM2ICL detects and requests address match 2 interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
ADM2ID: Address match 2 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
ADM2ICH: Address 2 Match Interrupt Control Register (High) x’00FC7B’
IE
ADM2ICH enables address match 2 interrupts. It is an 8-bit access regis- ter. Use the MOVB instruction to access it.
The priority level for address match 2 interrupts is written to the ADM3LV[2:0] field of the ADM3ICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 62

ADM1ICL: Address 1 Match Interrupt Control Register (Low) x’00FC7C’
IR — — — ADM1
ID
ADM1ICL detects and requests address match 1 interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
ADM1ID: Address match 1 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
ADM1ICH: Address 1 Match Interrupt Control Register (High) x’00FC7D’
IE
ADM1ICH enables address match 1 interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for address match 1 interrupts is written to the ADM3LV[2:0] field of the ADM3ICH register.
0: Disable 1: Enable
ADM0ICL: Address 0 Match Interrupt Control Register (Low) x’00FC7E’
IR — — — ADM0
ID
ADM0ICL detects and requests address match 0 interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
ADM0ID: Address match 0 interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 63

ADM0ICH: Address 0 Match Interrupt Control Register (High) x’00FC7F’
IE
ADM0ICH enables address match 0 interrupts. It is an 8-bit access regis- ter. Use the MOVB instruction to access it.
The priority level for address match 0 interrupts is written to the ADM3LV[2:0] field of the ADM3ICH register.
0: Disable 1: Enable
ANICL: A/D Conversion End Interrupt Control Register (Low) x’00FC80’
ANICL detects and requests A/D conversion end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
ANID: A/D conversion end interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
ANICH: A/D Conversion End Interrupt Control Register (High) x’00FC81’
ANICH sets the priority level for and enables A/D conversion end inter- rupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 64

SCT0ICL: Serial 0 Transmission End Interrupt Control Register (Low) x’00FC82’
IR — — — SCT0
ID
SCT0ICL detects and requests serial 0 transmission end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
SCT0ID: Serial 0 transmission end interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
SCT0ICH: Serial 0 Transmission End Interrupt Control Register (High) x’00FC83’
IE
SCT0ICH enables serial 0 transmission end interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
The priority level for serial 0 transmission end interrupts is written to the ANLV[2:0] field of the ANICH register.
0: Disable 1: Enable
SCR0ICL: Serial 0 Reception End Interrupt Control Register (Low) x’00FC84’
IR — — — SCR0
ID
SCR0ICL detects and requests serial 0 reception end interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
SCT0ID: Serial 0 reception end interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 65

SCR0ICH: Serial 0 Reception End Interrupt Control Register (High) x’00FC85’
IE
SCR0ICH enables serial 0 reception end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for serial 0 reception end interrupts is written to the ANLV[2:0] field of the ANICH register.
0: Disable 1: Enable
VBIVICL: VBIVSYNC (1) Interrupt Control Register (Low) x’00FC88’
VBIVICL detects and requests VBIVSYNC (1) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
VBIVID: VBIVSYNC (1) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
VBIVICH: VBIVSYNC (1) Interrupt Control Register (High) x’00FC89’
VBIV
VBIV
LV0 — — — VBIV
IE
VBIVICH sets the priority level for and enables VBIVSYNC (1) inter- rupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 66

VBIVWICL: VBIVSYNC (2) Interrupt Control Register (Low) x’00FC8A’
IR — — — VBIVW
ID
VBIVWICL detects and requests VBIVSYNC (2) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
VBIVWID: VBIVSYNC (2) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
VBIVWICH: VBIVSYNC (2) Interrupt Control Register (High) x’00FC8B’
IE
VBIVWICH enables VBIVSYNC (2) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for VBIVSYNC (2) interrupts is written to the VBIVLV[2:0] field of the VBIVICH register.
0: Disable 1: Enable
TM3UDICL: Timer 3 Underflow Interrupt Control Register (Low) x’00FC8C’
IR — — — TM3UD
ID
TM3UDICL detects and requests timer 3 underflow interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
TM3UDID: Timer 3 underflow interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 67

TM3UDICH: Timer 3 Underflow Interrupt Control Register (High) x’00FC8D’
IE
TM3UDICH enables timer 3 underflow interrupts. It is an 8-bit access reg- ister. Use the MOVB instruction to access it.
The priority level for timer 3 underflow interrupts is written to the VBIVLV[2:0] field of the VBIVICH register.
0: Disable 1: Enable
OSDGICL: OSD (Graphics) Interrupt Control Register (Low) x’00FC90’
IR — — — OSDG
ID
OSDGICL detects and requests OSD (graphics) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
OSDGID: OSD (graphics) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
OSDGICH: OSD (Graphics) Interrupt Control Register (High) x’00FC91’
OSDG
OSDG
LV0 — — — OSDG
IE
OSDGICH sets the priority level for and enables OSD (graphics) inter- rupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 68

OSDCICL: OSD (Text) Interrupt Control Register (Low) x’00FC92’
IR — — — OSDC
ID
OSDCICL detects and requests OSD (text) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
OSDCID: OSD (text) interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
OSDCICH: OSD (Text) Interrupt Control Register (High) x’00FC93’
IE
OSDCICH enables timer OSD (text) interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for OSD (text) interrupts is written to the OSDGLV[2:0] field of the OSDGICH register.
0: Disable 1: Enable
SCT1ICL: Serial 1 Transmission End Interrupt Control Register (Low) x’00FC98’
IR — — — SCT1
ID
SCT1ICL detects and requests serial 1 transmission end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
SCT1ID: Serial 1 transmission end interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 69

SCT1ICH: Serial 1 Transmission End Interrupt Control Register (High) x’00FC99’
SCT1
SCT1
LV0 — — — SCT1
IE
SCT1ICH sets the priority level for and enables serial 1 transmission end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
Sets the priority from 0 to 6.
0: Disable 1: Enable
SCR1ICL: Serial 1 Reception End Interrupt Control Register (Low) x’00FC9A’
IR — — — SCR1
ID
SCR1ICL detects and requests serial 1 reception end interrupts. It is an 8- bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
SCT1ID: Serial 1 reception end interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
SCR1ICH: Serial 1 Reception End Interrupt Control Register (High) x’00FC9B’
IE
SCR1ICH enables serial 1 reception end interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for serial 1 reception end interrupts is written to the SCT1LV[2:0] field of the SCT1ICH register.
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 70

I2CICL: I 2 C Interrupt Control Register (Low) x’00FC9C’
IR — — — I2C
ID
I2CICL detects and requests I2C interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
0: No interrupt requested 1: Interrupt requested
I2CID: I 2 C interrupt detect flag
0: Interrupt undetected 1: Interrupt detected
I2CICH: I 2 C Interrupt Control Register (High) x’00FC9D’
IE
I2CICH enables I2C interrupts. It is an 8-bit access register. Use the MOVB instruction to access it.
The priority level for I2C interrupts is written to the SCT1LV[2:0] field of the SCT1ICH register.
0: Disable 1: Enable
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 71

CPU Modes
3 Low-Power Modes
The MN102H75K/85K provides two ways to reduce power consumption, con- trolling CPU operating and standby modes to cut overall consumption and shutting down unused functions by stopping the system clock supplied to them.
3.1.1 Description The MN102H75K/85K has two CPU operating modes, NORMAL and SLOW, and two CPU standby modes, HALT and STOP. Effective use of these modes can significantly reduce power consumption. Figure 3-1 shows the CPU states in the different modes.
Program (Write to CPUM register)
Program (Write to CPUM register)
Program (Write to CPUM register)
Program (Write to CPUM register)
Program (Write to CPUM register)
Program (Write to CPUM register)
The CPU mode control register (CPUM) controls transitions between NORMAL and SLOW modes and from NORMAL and SLOW modes to the standby modes. A normal reset or an interrupt wakes the MCU from a standby mode.
You cannot enter STOP mode from NORMAL mode.

3.1.2 Exiting from SLOW Mode to NORMAL Mode
The MN102H75K/85K contains a PLL circuit that, in NORMAL mode, mul- tiplies the clock input through the OSC1 and OSC2 pins by 12, divides the signal by 2, then sends the resulting clock to the CPU. (See figure 3-2.) The MCU starts in SLOW mode on power up and on recovery from a reset. In SLOW mode (system clock = 2 MHz), the clock from the OSC pins feeds directly to the CPU, without going through the PLL circuit. This means that the program must switch the CPU from SLOW to NORMAL mode (system clock = 12 MHz).
The MN102H75K/85K recovers from power up and reset in SLOW mode. For normal opera- tion, the program must switch the MCU from SLOW to NOR- MAL mode.
Clock select (CPUM register)
To all function blocks
Below is an example routine for exiting SLOW mode. You should run this routine immediately after power up.
Example 3-1 Exiting SLOW Mode MOV x’FC00’,A1 MOV (A1),D0 ;Read CPUM register AND x’FFFD’,D0 ;Invoke IDLE mode MOV (D0),A1 MOV (A1),D0 ;Read CPUM register AND x’FFF0’,D0 ;Invoke NORMAL mode MOV (D0),A1
Because the system clock in SLOW mode is 2 MHz, the OSD does not function. The specifications also differ for the PWM function and functions such as the IR remote signal receiver and the H counter that use the PWM waveforms.
The OSD cannot display in SLOW mode.
For information on invoking SLOW mode from NORMAL mode, see MN102H Series LSI User Manual.

CPU Modes
3.1.3 Notes on Invoking and Exiting STOP and HALT Modes
I When invoking STOP and HALT modes... To reduce power consumption before invoking the STOP or HALT mode, stop current flow from output pins and stabilize the input level of input pins. For output pins, either match the output level to the external level or set the pin to input. For input pins, ensure that the external level is fixed. To further reduce power consumption, shut down unnecessary functions through the control reg- isters. (See section 3.2, “Turning Individual Functions On and Off,” on page 75.) Before entering the STOP mode, set all of the bits shown in table 3-1 to disable all of these functions. Disable all functions in the NORMAL mode except the PLL circuit, which you can only shut down once you have entered the SLOW mode.
To allow the MCU to exit the STOP or HALT mode on reset or interrupt, you must set the interrupt registers before you invoke the standby mode. To specify a particular interrupt vector as the signal for waking up, enable that vector in the interrupt registers. (For more information on controlling interrupts, see “section 2, “Interrupts,” on page 37.)
Using OSDX clock (both an LC blocking oscillator and external source), OSDXI and OSDXO must be set to port (P46, P45) and output ’H’ before invoking STOP mode.
I When exiting STOP and HALT modes... The MCU exits STOP and HALT modes on reset or interrupt. For information on exiting on interrupt, see Figure 3-1, “CPU State Changes,” on page 72. When the MCU exits on reset, it always exits to SLOW mode.

3.2 Turning Individual Functions On and Off
The MN102H75K/85K allows you to turn each peripheral function on or off through writing to the registers. You can significantly reduce power consumption by turning off unused functions. Table 3-1 shows the register bits controlling on and off for each function block. The ADC used for the OSD and CCD functions is turned off on reset. Write a 1 to the function to enable it, when necessary.
You cannot set the PLL function control bit during NORMAL mode. You must set it from the SLOW mode.
You cannot read from or write to the registers associated with a function that is disabled. Turning on the function enables register reads and writes.
See the sections on each of these peripheral functions for more information.
To turn off the OSD block to save power: 1. Write a 0 to OSD (OSD1, bit10). 2. Wait for the next VSYNC input. 3. Write a 0 to OSDPOFF(PCNT0, bit 7), turning the clock off. If you turn the clock off before the VSYNC input, power usage may not drop or the microcontroller may halt.
Block Name Description Bit Name Address Operation Reset Value
OSD block control OSDPOFF PCNT0, x’00FF90’, bit 7
0:OSD block off
1:OSD block enabled 0
OSD function control OSD OSD1, x’007F06’, bit 10
0:OSD function off
1:OSD function on 0
0:OSD register R/W off
OSD register R/W control OSDREG E
PCNT2, x’00FF92’, bit 0
1:OSD register R/W enabled 0
ADC control for CCD1 ADC1ON PCNT0, x’00FF90’, bit 5
0:ADC for CCD1 off
1:ADC for CCD1 enabled 0
ADC control for CCD0 ADC0ON PCNT0, x’00FF90’, bit 4
0:ADC for CCD0 off
1:ADC for CCD0 enabled 0
CCD1 function control VBI1OFF PCNT0, x’00FF90’, bit 1
0:CCD1 block off
1:CCD1 block enabled 0
CCD0 function control VBI0OFF PCNT0, x’00FF90’, bit 0
0:CCD0 block off
1:CCD0 block enabled 0
PLL PLL function control PLLPOFF PCNT0, x’00FF90’, bit 6
0:PLL block enabled
1:PLL block off 0
0:H counter block enabled
H counter H counter function control HCNTOFF PCNT0, x’00FF90’, bit 3
1:H counter block off 0
0:IR remote signal receiver block off
IR remote signal receiver
IR remote signal receiver function control RMCOFF PCNT0, x’00FF90’, bit 2
1:IR remote signal receiver block enabled
0:I2C block enabled
I2C I2C function control I2COFF PCNT2, x’00FF92’, bit 2
1:I2C block off 0
PWM PWM function control PWMOFF PCNT2, x’00FF92’, bit 1
0:PLL block enabled
1:PLL block off 0

CPU Control Register
3.3 CPU Control Register
CPUM: CPU Mode Control Register x’00FC00’
NW DEN — OSC
Reset: 1 0
R/W: R/W R/W R/W R/W R/W
This register controls the invoking of all of the CPU modes.
0: Enable watchdog timer 1: Disable and clear watchdog timer
Setting the watchdog timer to 1, then setting it to 0 clears and restarts the watchdog timer.
System clock monitor
0: Fast 1: Slow
STOP: STOP mode request
CPU operating state control. See table 3-2.
CPU operating state control. See table 3-2.
See table 3-2.
Clock to CPU
System
STOP HALT OSC1 OSC0 CPU Mode
Clock PLL CPU
0 NORMAL 24 MHz 12 MHz On On
0 0 1 1 SLOW 4 MHz 2 MHz Off On
0 1 0 0 HALT0 (Invoked
from NORMAL) 24 MHz 12 MHz On Off
0 1 1 1 HALT1 (Invoked
from SLOW) 4 MHz 2 MHz Off Off
1 0 x x STOP Off

4 Timers
4.1 8-Bit Timer Description The MN102H75K/85K contains four 8-bit timers that can serve as interval timers, event timer/counters, clock generators (divide-by-2 output of the underflow), reference clocks for the serial interfaces, or start timers for A/D con- versions. The clock source can be the internal clock (oscillator frequency divided by 2) or the external clock (1/4 or less the oscillator frequency input). A timer interrupt is generated by a timer underflow.
All passages below assume a clock BOSC of 24 MHz.
The 8-bit timers are cascadable into true 16-bit timers. For instance, if you cascade timers 0 and 1, timer 0 sends cascaded output to timer 1. The result is true 16-bit division, rather than two successive 8-bit divisions.
8-bit x 4
Configuration example
16-bit 8-bit 8-bit 8-bit 8-bit 16-bit
Sync. transfer
(To 16-bit timer, serial I/F)
(To 16-bit timer, serial I/F)
TM2UDIR
UDF
TMIA TMIB TMIC TMID
B OSC /256
TM2
TM3UDIR
TMIO
B OSC /512
UDF
TMIA TMIB TMIC TMID
B OSC /64
TM0O
TM0I TM0
UDF
TMIA TMIB TMIC TMID
TMIO
TM3
TMIO
TMIA TMIB TMIC TMID
UDF
TM1
TM1I TM1O
TMIO
Note: B OSC = 24 MHz
Figure 4-2 Block Diagram of 8-Bit Timers
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 77

4.2 8-Bit Timer Features
Table 4-1 8-Bit Timer Functions and Features
Function/Feature Timer 0 Timer 1 Timer 2 Timer 3
Interrupt request flag(s) TM0UDICL register
Interrupt source(s) Timer 0 underflow Timer 1 underflow Timer 2 underflow Timer 3 underflow
Event counter function — —
Clock source for 16-bit timer — —
Timer output function
Serial interface transfer clock source
A/D conversion trigger function — — —
Clock sources 0 BOSC/4
1 BOSC/64 BOSC/64 BOSC/256 BOSC/256
2 BOSC/512 Cascade connection Cascade connection Cascade connection
3 TM0I signal TM1I signal BOSC/512 BOSC/512

4.3 8-Bit Timer Block Diagrams
Timer 0 base register
(FE20)
(FE00)
TM0EN
TM0LD
TM0S1
TM0S0
Timer 0 binary counter
Timer 0 underflow interrupt Underflow
TM0MD
B OSC /4
B OSC /64
B OSC /412
Figure 4-3 Timer 0 Block Diagram
(FE11)
Timer 1 base register
(FE21)
(FE01)
TM1EN
TM1LD
TM1S1
TM1S0
Timer 1 binary counter
Timer 1 underflow interrupt
B OSC /4
B OSC /64
Cascade from timer 0
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 79

Timer 2 base register
(FE22)
(FE02)
TM2EN
TM2LD
TM2S1
TM2S0
Timer 2 binary counter
Timer 2 underflow interrupt
B OSC /4
B OSC /256
Cascade from timer 1
Figure 4-5 Timer 2 Block Diagram
(FE13)
Timer 3 base register
(FE23)
(FE03)
TM3EN
TM3LD
TM3S1
TM3S0
Timer 2 binary counter
Timer 3 underflow interrupt
B OSC /4
B OSC /256
Cascade from timer 2
Figure 4-6 Timer 3 Block Diagram
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 80

4.4 8-Bit Timer Timing
BC value
Load value
Time
TMnIO
input
Figure 4-7 Event Timer Input Timing (8-Bit Timers)
BC value
Load value
Time
Interrupt
TMnIO input 1
TMnIO output 2
Figure 4-8 Clock Output and Interval Timer Timing (8-Bit Timers)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 81

4.5 8-Bit Timer Setup Examples
4.5.1 Setting Up an Event Counter Using Timer 0 In this example, timer 0 generates an underflow interrupt on the fourth rising edge of the TM0IO signal.
The event counter continues to operate during STOP mode. In all modes but STOP, the TMnIO signal input is synchronized to BOSC. In STOP mode, the timer counts TMnIO signal directly. When an interrupt occurs, the CPU returns to NORMAL mode after the oscillator stabilization wait. The event counter con- tinues to count the TMnIO signal during stabilization wait, and at the same time that the CPU returns to NORMAL mode, the event counter begins counting the signal resulting from the BOSC sampling of the TMnIO signal input.
ROM, RAM
TM0I P2
P4
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
Timers 4-5
ADC
Figure 4-9 Block Diagram of Event Counter Using Timer 0
TM0
LD — — — — TM0
TM0
EN
S1
S0
TM2UDICH, TM0UDICL, and TM0UDICH are 8-bit access registers. Use the MOVB instruction to access them.
TM2UD
TM2UD
LV0 — — — TM2UD
IE

TM0UDICL (example) x’00FC74’
IR — — — TM0UD
ID
IE
TM0 BR6
TM0 BR5
TM0
TM0 BR3
TM0 BR2
TM0 BR1
TM0 BR0
BR4
Do not change the clock source once you select it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM0
LD — — — — TM0
TM0
EN
S1
S0
In the bank and linear address- ing versions of the MN102 series, it was necessary to set TM0EN and TM0LD to 0 between steps 5 and 6, to ensure stable operation. This is unnecessary in the high-speed linear addressing version.
TM0BC
00 03 02 01 00 03
TM0MD(B) TM0UDICH(B) TM0MD(B)
TM0BR(B)
Figure 4-10 Event Counter Timing (Timer 0)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 83

4.5.2 Setting Up an Interval Timer Using Timers 1 and 2 In this example, timers 1 and 2 are cascaded to divide BOSC/4 by 60,000 and generate an underflow interrupt.
B OSC (24 MHz)
1/4
Timer 1
Timer 2
Timer 2 underflow interrupt
(Divide by 4)
(Divide by 60,000) (x'EA60')
Figure 4-11 Configuration Example of Interval Timer Using Timers 1 and 2
CORE
ROM, RAM
P2
P4
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
Timers 4-5
ADC
Figure 4-12 Block Diagram of Interval Timer Using Timers 1 and 2
TM1
LD — — — — TM1
TM1
EN
S1
S0
TM2
LD — — — — TM2
TM2
EN
S1
S0
2. Cancel all existing interrupt requests and enable timer 2 underflow inter- rupts. To do this, set the TM2UDLV[2:0] bits of TM2UDICH (priority level 4 in this example), set the TM2UDIE bit to 1, set the TM2UDIR bit of TM2UDICL to 0, set the TM1UDIE bit of TM1UDICH to 0, and set the TM1UDIR bit of TM1UDICL to 0. (Note that you set the priority level for both timer 1 and 2 interrupts in the timer 2 interrupt control register.) From this point on, an interrupt request is generated whenever timer 2 underflows. Timer 1 underflows are unused.

TM2UDICH (example) x’00FC71’
TM2UD
TM2UD
LV0 — — — TM2UD
IE
IR — — — TM2UD
ID
IE
IR — — — TM1UD
ID
TM1 BR6
TM1 BR5
TM1
TM1 BR3
TM1 BR2
TM1 BR1
TM1 BR0
BR4
TM2 BR6
TM2 BR5
TM2
TM2 BR3
TM2 BR2
TM2 BR1
TM2 BR0
BR4
Do not change the clock source once you select it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM1
LD — — — — TM1
TM1
EN
S1
S0

TM2MD (example) x’00FE22’
TM2
LD — — — — TM2
TM2
EN
S1
S0
In the bank and linear address- ing versions of the MN102 series, it was necessary to set TM0EN and TM0LD to 0 between steps 4 and 5, to ensure stable operation. This is unnecessary in the high-speed linear addressing version.
Access TM2MD and TM1MD with a 16-bit write, using the MOV instruction, or set the two registers consecutively, begin- ning with TM2MD.
TM2,1BR
00 EA5F
TM2,1BC
00 EA5F EA5E EA5D 0002 0001 0000 EA5F
Sequence (1) (2) (3) (4) (5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 86
Timer 2 underflow · interrupt · Interrupt enable

4.6 8-Bit Timer Control Registers Table 4-2 shows the registers used to control the 8-bit timers. A binary counter (TMnBC), a time base counter (TMnBR), and a timer mode register (TMnMD) is associated with each 8-bit timer.
Register Address R/W Description
Timer 0 TM0BC x’00FE00’ R Timer 0 binary counter
TM0BR x’00FE10’ R/W Timer 0 base register
TM0MD x’00FE20’ R/W Timer 0 mode register
Timer 1 TM1BC x’00FE01’ R Timer 1 binary counter
TM1BR x’00FE11’ R/W Timer 1 base register
TM1MD x’00FE21’ R/W Timer 1 mode register
Timer 2 TM2BC x’00FE02’ R Timer 2 binary counter
TM2BR x’00FE12’ R/W Timer 2 base register
TM2MD x’00FE22’ R/W Timer 2 mode register
Timer 3 TM3BC x’00FE03’ R Timer 3 binary counter
TM3BR x’00FE13’ R/W Timer 3 base register
TM3MD x’00FE23’ R/W Timer 3 mode register
LD — TMn
S1
S0
0: Disable / 1: Enable
TMnLD: TMnBR value load to TMnBC
0: Do not load value / 1: Load value
TMnS[1:0]: Timer n clock source select
See table 4-1 on page 78 for clock sources. 00 = clock source 0, 01 = clock source 1, 10 = clock source 2, and 11 = clock source 3.

4.7 16-Bit Timer Description The MN102H75K/85K contains two 16-bit up/down timers, timers 5 and 6. Associated with each timer are two compare/capture registers that can capture and compare the up/down counter values, generate PWM signals, and generate interrupts. The PWM function has a double buffering mode that causes cycle and transition changes to occur at the beginning of the next clock cycle. This prevents PWM signal losses and minimizes waveform distortion during timing changes.
Timers 5 and 6 can serve as interval timers, event counters (in clock oscillation mode), one- or two-phase PWMs, dual capture inputs, dual two-phase encoders, one-shot pulse generators, and external count direction controllers. The clock source can be the internal clock, the external clock, or the TM0UDIR or TM1UDIR signals from the 8-bit timers.
Underflow interrupts can only occur during down counting.
TM0UDIR TM1UDIR
Up/down counter
CLR
B OSC /4
2-phase encoding Match
TMnIB
16-bit compare/capture A
TMnOA
Capture
TMnIA
R S Q
16-bit compare/capture A
T Q
TMnOB
Match
Capture
Note: B OSC = 24 MHz
Figure 4-14 Block Diagram of 16-Bit Timers
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 88

4.8 16-Bit Timer Features
Table 4-3 16-Bit Timer Functions and Features
Function/Feature Timer 4 Timer 5
Interrupt request flag(s) TM4UDIR bit of TM4UDICL
TM5UDIR bit of TM5UDICL
TM4CAICL bit of TM4CAIR
TM5CAICL bit of TM5CAIR
TM4CBICL bit of TM4CBIR
TM5CBICL bit of TM5CBIR
Interrupt sources Timer 4 underflow
Timer 4 compare A match
Timer 5 compare A match
Timer 4 capture A
Timer 5 capture A
Timer 4 compare B match
Timer 5 compare B match
Timer 4 capture B
Timer 5 capture B
Clock sources Timer 0 underflow
4x two-phase encoder (TM4IA and TM4IB signals)
4x two-phase encoder (TM5IA and TM5IB signals)
1x two-phase encoder (TM4IA and TM4IB signals)
1x two-phase encoder (TM5IA and TM5IB signals)
Count direction Up/down counter Up/down counter
Event counter function
PWM function
One-shot pulse output
Single-phase capture input
Two-phase capture input
Two-phase encoding (4x)
Two-phase encoding (1x)
External count direction control
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 89

4.9 16-Bit Timer Block Diagrams


4.10 16-Bit Timer Timing

Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 90

BC value
New value written to CCRB
Change reflected in next clock cycle
CB
Time
TMnIOA
TMnOA
Figure 4-18 Single-Phase PWM Output Timing with Data Change (16-Bit Timers)
BC value
CA
CB
Time
TMnOA
TMnOB
Figure 4-19 Two-Phase PWM Output Timing (16-Bit Timers)
BC value
CA
Time
TMnIB
TMnOA
Figure 4-20 One-Shot Pulse Output Timing (16-Bit Timers)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 91

BC value
CA
Time
TMnIB
TMnIA
Figure 4-21 External Count Direction Control Timing (16-Bit Timers)
BC value
Time
TMnIB
Figure 4-22 Event Timer Input Timing (16-Bit Timers)
BC value
FFFF
Time
TMnIB
TMnIA
TMnCA
0033 (Example)
TMnCB
5A87 (Example)
Figure 4-23 Single-Phase Capture Input Timing (16-Bit Timers)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 92

BC value
FFFF
Time
TMnIB
TMnIA
TMnCA 0033 (Example)
5A87 (Example) TMnCB
Figure 4-24 Two-Phase Capture Input Timing (16-Bit Timers)
BC value
Time
TMnIA
TMnIB
Figure 4-25 Two-Phase 4x Encoder Timing (16-Bit Timers)
BC value
Time
TMnIA
TMnIB
Figure 4-26 Two-Phase 1x Encoder Timing (16-Bit Timers)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 93

4.11 16-Bit Timer Setup Examples
4.11.1 Setting Up an Event Counter Using Timer 4 In this example, timer 4 counts the TM4IB input signal (BOSC/4 = 6 MHz or less) and generates an interrupt on the second and fifth cycles.
ROM, RAM
TM4IB P2
P4
P6
Interrupts
P5
Timers 0-3
Serial I/Fs
Timers 4-5
ADC
A. Chip Level
Timer 4
(B OSC /4)
TM4BC
up
TM4CA
T Q
TM4CAX
TM4IB
Controller
R S Q
(TM4OA)
TM4CB
T Q
TM4CBX
B. Block Level
Figure 4-27 Block Diagram of Event Counter Using Timer 4
I To set up timer 4:
Use the MOV instruction for this setup and only use 16-bit write operations.
TM4 NLD — — TM4 UD1
TM4 UD0
TM4 TGE
TM4 ONE
TM4 MD1
TM4 MD0
TM4 ECLR
TM4
TM4 ASEL
TM4
TM4
TM4
EN
LP
S2
S1
S0
This step stops the TM4BC count and clears both TM4BC and the S-R flip-flop to 0.
Setting: 0 1 0 0 1 0

TM4CA (example) x’00FE84’
TM4 CA14
TM4 CA13
TM4 CA12
TM4 CA11
TM4 CA10
TM4 CA9
TM4 CA8
TM4 CA7
TM4 CA6
TM4 CA5
TM4 CA4
TM4 CA3
TM4 CA2
TM4 CA1
TM4 CA0
Setting: 0 1 0 0
TM4 CB14
TM4 CB13
TM4 CB12
TM4 CB11
TM4 CB10
TM4 CB9
TM4 CB8
TM4
TM4 CB6
TM4 CB5
TM4 CB4
TM4
TM4 CB2
TM4 CB1
TM4 CB0
CB7
CB3
Setting: 0 1
I To enable timer 4 capture interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM4CBLV[2:0] bits of the TM4CBICH register (levels 0 to 6), set the TM4CBIE bit to 1, set the TM4CBIR bit of TM4CBICL to 0, set the TM4CAIE bit of TM4CAICH to 1, and set the TM4CAIR bit of TM4CAICL to 0. From this point on, an interrupt request is generated whenever a timer 4 capture A or capture B event occurs.
Timer 4 can operate as an event counter, but timer 4 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC. This means that the frequency of the event counter clock must be 1/4 or less that of the oscillator (6 MHz with a 24-MHz oscillator).
Figure 4-28 shows an example timing chart.
TM4CB
TM4BC
0000 0003 0000 0001
0002 0004 0003 0001 0002 0004
B
B A A
Figure 4-28 Event Counter Timing (Timer 4)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 95
Interrupts

4.11.2 Setting Up a Single-Phase PWM Output Signal Using Timer 4 In this example, timer 4 is used to divide BOSC by 5 and generate a five-cycle, single-phase PWM signal. The duty of this signal is 2:3. To accomplish this, the program must load the divide-by ratio of 5 (actual setting: 4) into compare/ capture register A and a cycle count of 2 (actual setting: 1) into compare/capture register B.
CORE
ROM, RAM
P4
P6
Interrupts
P5
PC
Timers 0-3
Serial I/Fs
TM4OA
ADC P2
Timers 4-5
A. Chip Level
Timer 4
B OSC /4
TM4BC
up
TM4CA
T Q
TM4CAX
Controller
R S Q
TM4OA
TM4CB
T Q
TM4CBX
B. Block Level
Figure 4-29 Block Diagram of Single-Phase PWM Output Using Timer 4
I To set up the output port: Set the P2MD[13:12] bits of the port 2 output mode register (P2MD) to b’01’ (selecting the TM4IOA pin) and set the P2DIR6 bit of the port 2 I/O control register (P2DIR) to 1 (selecting output direction). This step selects the TM4OA pin (P26) as the timer output port.
P2 MD13
P2 MD12
P2 MD11
P2 MD10
P2 MD9
P2 MD8
P2 MD7
P2 MD6
P2 MD5
P2 MD4
P2 MD3
P2 MD2
P2 MD1
P2 MD0
Setting: 0 0 0 1 0

P2DIR (example) x’00FFE2’
P2 DIR6
P2 DIR5
P2 DIR4
P2 DIR3
P2 DIR2
P2 DIR1
P2 DIR0
Use the MOV instruction for this setup and only use 16-bit write operations.
TM4 NLD — — TM4 UD1
TM4 UD0
TM4 TGE
TM4 ONE
TM4 MD1
TM4 MD0
TM4 ECLR
TM4
TM4 ASEL
TM4
TM4
TM4
EN
LP
S2
S1
S0
This step stops the TM4BC count and clears both TM4BC and the S-R flip-flop to 0.
Setting: 0 1 0 1 0 0 1 1
TM4 CA14
TM4 CA13
TM4 CA12
TM4 CA11
TM4 CA10
TM4 CA9
TM4 CA8
TM4 CA7
TM4 CA6
TM4 CA5
TM4 CA4
TM4 CA3
TM4 CA2
TM4 CA1
TM4 CA0
Setting: 0 1 0 0
TM4 CB14
TM4 CB13
TM4 CB12
TM4 CB11
TM4 CB10
TM4 CB9
TM4 CB8
TM4
TM4 CB6
TM4 CB5
TM4 CB4
TM4
TM4 CB2
TM4 CB1
TM4 CB0
CB7
CB3
Setting: 0 1

Timer 4 can output a single-phase PWM signal at any duty. You must select up counting. Timer 4 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
In this procedure, you set the cycle (x’0001’ to x’FFFE’) in the TM4CA register and the duty in the TM4CB register. When the contents of TM4BC match those of the TM4CB register, the S-R flip-flop resets at the beginning of the next cycle. Please note the following:
I When -1 ≤ TM4CB < TM4CA, TM4OA output is low during the 0 to TM4CB + 1 cycles of the TM4CA + 1 cycle period and high during the remainder of the cycles.
I When TM4CA ≤ TM4CB ≤ x’FFFE, TM4OA output is always low.
I When TM4BC = x’FFFF’, TM4OA output is always high.
The circuitry is configured so that there are no waveform errors, even when the output is always high or always low. Counting begins after the TM4EN bit is set in the TM4MD register.

Figure 4-30 below shows the output waveforms for TM4OA. Both A and B interrupts can occur, but B interrupts can only occur if the TM4CB setting is from 0 to less than TM4CA. This is because when TM4CB ≤ TM4CA, TM4BC never matches TM4CB.
TM4BC
0 1 2 3 4 0 0 1 2 3 4 0 1 2 3 4 0 1 2 3
CLRBC4
(1) TMCB = 4 (All 0s)
R4
TM4OA
AB AB AB
(2) TMCB = 2
S4
R4
TM4OA
B A B A B B A
(3) TMCB = FFFF (All 1s)
R4
TM4OA
A A A
Interrupts 0s on first cycle, since S4 has not gone high yet.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 99
Write to TM4MD · Interrupts · Interrupts

Two potential types of errors are inherent with PWM output. First, because of the circuit configuration, direction errors can occur. The output circuit is configured with T flip-flops, so that even if one transition is missed, the 1s and 0s can reverse direction. Timers 4 and 5 contain an S-R flip-flop to prevent this type of error. Second, if the duty cycle changes dynamically, which often happens in PWM output, the PWM waveform may skip a pulse (see the single buffering section of figure 4-31 below). To prevent these misses, timers 4 and 5 provide a double-buffer mode. In this mode, no matter what the timing of a TMnCB change, the duty change does occur until the beginning of the next cycle, and no signals are lost. Performance is assured even when the output switches from all 1s to all 0s (see the double buffering section of figure 4-31 below).
For this reason, you must always use double-buffer mode for PWM waveform output. Use single-buffer mode only in applications that are unaffected by these issues.
TM4CB
TM4BC
0 1 2 3 4 0 0 1 2 3 4 0 1 2 3 4 0 1 2 3
CLRBC4
TM4CB
TM4CBX
S4
R4
TM4OA
B A B A B B A
No PWM or interrupt errors
S4
R4
TM4OA
A B A B B A
Lost interrupt, causing a PWM output error
(Timer 4)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 100

4.11.3 Setting Up a Two-Phase PWM Output Signal Using Timer 4 In this example, timer 4 is used to divide timer 0 underflow by 5 and generate a five-cycle, two-phase PWM signal. The phase difference of this signal is 2 cycles. To accomplish this, the program must load the divide-by ratio of 5 (actual setting: 4) into compare/capture register A and a cycle count of 2 (actual setting: 1) into compare/capture register B.
CORE
ROM, RAM
P4
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM4OA TM4OB
P2
Timers 4-5
ADC
Timer 4
Timer 0 underflow
TM4BC
up
TM4CA
T Q
TM4OA
TM4CAX
Controller
R S Q
TM4CB
T Q
TM4OB
TM4CBX
B. Block Level
Figure 4-32 Block Diagram of Two-Phase PWM Output Using Timer 4
I To set up the output port: Set the P2MD[13:12] bits of the port 2 output mode register (P2MD) to b’01’ (selecting the TM4IOA pin), set the P2MD[11:10] bits to b’01’ (selecting the TM4IOB pin), and set the P2DIR[6:5] bits of the port 2 I/O control register (P2DIR) to b’11’ (selecting output direction). This step selects the TM4OA (P26) and TM4OB (P25) pins as the timer output ports.
P2 MD13
P2 MD12
P2 MD11
P2 MD10
P2 MD9
P2 MD8
P2 MD7
P2 MD6
P2 MD5
P2 MD4
P2 MD3
P2 MD2
P2 MD1
P2 MD0
Setting: 0 0 0 1 0 1 0

P2DIR (example) x’00FFE2’
P2 DIR6
P2 DIR5
P2 DIR4
P2 DIR3
P2 DIR2
P2 DIR1
P2 DIR0
I To set up timer 0: 1. Disable timer 0 counting in the timer 0 mode register (TM0MD). This step is unnecessary immediately after a reset, since TM0MD resets to 0.
TM0
LD — — — — TM0
TM0
EN
S1
S0
TM0 BR6
TM0 BR5
TM0
TM0 BR3
TM0 BR2
TM0 BR1
TM0 BR0
BR4
Do not change the clock source once you select it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM0
LD — — — — TM0
TM0
EN
S1
S0
In the bank and linear address- ing versions of the MN102 series, it was necessary to set TM0EN and TM0LD to 0 between steps 3 and 4, to ensure stable operation. This is unnecessary in the high-speed linear addressing version.

I To set up timer 4:
Use the MOV instruction for this setup and only use 16-bit write operations.
TM4 NLD — — TM4 UD1
TM4 UD0
TM4 TGE
TM4 ONE
TM4 MD1
TM4 MD0
TM4 ECLR
TM4
TM4 ASEL
TM4
TM4
TM4
EN
LP
S2
S1
S0
This step stops the TM4BC count and clears both TM4BC and the S-R flip-flop to 0.
Setting: 0 1 0 1 1 0 0 0
TM4 CA14
TM4 CA13
TM4 CA12
TM4 CA11
TM4 CA10
TM4 CA9
TM4 CA8
TM4 CA7
TM4 CA6
TM4 CA5
TM4 CA4
TM4 CA3
TM4 CA2
TM4 CA1
TM4 CA0
Setting: 0 1 0 0
TM4 CB14
TM4 CB13
TM4 CB12
TM4 CB11
TM4 CB10
TM4 CB9
TM4 CB8
TM4
TM4 CB6
TM4 CB5
TM4 CB4
TM4
TM4 CB2
TM4 CB1
TM4 CB0
CB7
CB3
Setting: 0 1

Timer 4 can output a two-phase PWM signal with any phase difference. You must select up counting. Timer 4 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
In this procedure, you set the cycle (x’0001’ to x’FFFE’) in the TM4CA register and the phase difference in the TM4CB register. When the contents of TM4BC match those of the TM4CB register, T flip-flop B reverses at the beginning of the next cycle. When the contents of TM4BC match those of the TM4CA register, T flip-flop A reverses and TM4BC resets at the beginning of the next cycle.
The circuitry is configured so that there are no waveform errors, even when the output is always high or always low. Counting begins after the TM4EN bit is set in the TM4MD register.
Figure 4-30 below shows the output waveforms for TM4OA and TM40B. Both A and B interrupts occur when the contents of the binary counter matches those of the associated compare/capture register. However, B interrupts can only occur if the TM4CB setting is from 0 to less than TM4CA. This is because when TM4CB ≤ TM4CA, TM4BC never matches TM4CB.
TM4BC
0 1 2 3 4 0 0 1 2 3 4 0 1 2 3 4 0 1 2 3
CLRBC4
TMCB = 2
B4
A4
TM4OA
TM4OB
B A B A B B A
Figure 4-33 Two-Phase PWM Output Timing (Timer 4)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 104
Write to TM4MD · Interrupts

With PWM output, the duty cycle can change dynamically, which can cause the PWM waveform to skip a pulse (see the single buffering section of figure 4-34 below). To prevent these misses, timers 4 and 5 provide a double-buffer mode. In this mode, no matter what the timing of a TMnCB change, the duty change does not occur until the beginning of the next cycle, and no signals are lost. Per- formance is assured even when the output switches from all 1s to all 0s (see the double buffering section of figure 4-34 below).
For this reason, you must always use double-buffer mode for PWM waveform output. Use single-buffer mode only in applications that are unaffected by this issues.
TM4CB
0 1 2 3 4 0 0 1 2 3 4 0 1 2 3 4 0 1 2 3
B OSC /4
CLRBC4
TM4CB
TM4CBX
B4
A4
TM4OA
TM4OB
B A B A B B A
No PWM or interrupt errors
B4
A4
TM4OA
TM4OB
Interrupts A B A B B A
Lost interrupt, causing a PWM output error
(Timer 4)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 105

4.11.4 Setting Up a Single-Phase Capture Input Using Timer 4 In this example, timer 4 is used to divide BOSC/4 by 65,536 and measure how long the TM4IA input signal stays high. An interrupt occurs on capture B and the software calculates the number of cycles by subtracting the contents of TMnCA from the contents of TMnCB.
CORE
ROM, RAM
P4
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM4IA
ADC P2
Timers 4-5
Timer 4
B OSC /4
TM4BC
TM4IA
TM4CA
T Q
Controller
R S Q
TM4CB
T Q
B. Block Level
Figure 4-35 Block Diagram of Single-Phase Capture Input Using Timer 4
I To set up timer 4:
Use the MOV instruction for this setup and only use 16-bit write operations.
TM4 NLD — — TM4 UD1
TM4 UD0
TM4 TGE
TM4 ONE
TM4 MD1
TM4 MD0
TM4 ECLR
TM4
TM4 ASEL
TM4
TM4
TM4
EN
LP
S2
S1
S0
This step stops the TM4BC count and clears both TM4BC and the S-R flip-flop to 0.
Setting: 0 1 0 0 0 1 or 0 0 1 1
up · Interrupt B

change any other operating modes during this step.
When TM4MD[1:0] = b’10’ (dur- ing capture), TM4CA and TM4CB become read-only regis- ters. To write to TM4CA or TM4CB, you must first set TM4MD[1:0] = b’00’.
To enable timer 4 capture B interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM4CBLV[2:0] bits of the TM4CBICH register (levels 0 to 6), set the TM4BIE bit to 1, and set the TM4BIR bit of TM4CBICL to 0. From this point on, an interrupt request is generated whenever a timer 4 capture B event occurs.
I To service the interrupts and calculate the signal width: 1. Run the interrupt service routine. The routine must determine the interrupt group, then clear the interrupt request flag.
Ignore the flags when calculat- ing the signal width, even when TM3CA is the larger value.
Timer 4 can input a single-phase capture signal. You must select up counting. Timer 4 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
TM4CA captures the count on the rising edge of TM4IA, and TM4CB captures the count on the falling edge of TM4IA. A timer 4 capture B interrupt occurs when TM4CB captures the count, and the contents of TM4CA and TM4CB are read during the interrupt service routine.
In the example timing chart shown in figure 4-36, x’000A’ – x’0007’ = x’0003’, or 3 cycles. The calculation is correct even when TM4CA is the larger value. The flags are ignored, so for instance, x’0003’ – x’FFFE’ = x’0005’.

0 1 2 3 4 0 5 6 7 8 9 A B C D E F 10 11 12
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 107

4.11.5 Setting Up a Two-Phase Capture Input Using Timer 4 In this example, timer 4 is used to divide the timer 0 underflow by 65,536 and measure the number of cycles from the rising edge of the TM4IA input signal to the rising edge of the TM4IB input signal. An interrupt occurs on capture B and the software calculates the number of cycles by subtracting the contents of TMnCA from the contents of TMnCB.
ROM, RAM
P3
P4
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM4IA TM4IB
ADC P2
Timers 4-5
Timer 4
Timer 0 underflow
TM4BC
up
TM4CA
TM4IA
T Q
Controller
R S Q
TM4CB TM4IB
T Q
B. Block Level
Figure 4-37 Block Diagram of Two-Phase Capture Input Using Timer 4
I To set up timer 0: 1. Disable timer 0 counting in the timer 0 mode register (TM0MD). This step is unnecessary immediately after a reset, since TM0MD resets to 0.
TM0
LD — — — — TM0
TM0
EN
S1
S0
Interrupt B

TM0BR (example) x’00FE10’
TM0 BR6
TM0 BR5
TM0
TM0 BR3
TM0 BR2
TM0 BR1
TM0 BR0
BR4
Do not change the clock source once you select it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM0
LD — — — — TM0
TM0
EN
S1
S0
In the bank and linear address- ing versions of the MN102 series, it was necessary to set TM0EN and TM0LD to 0 between steps 3 and 4, to ensure stable operation. This is unnecessary in the high-speed linear addressing version.
To set up timer 4: 1. Set the operating mode in the timer 4 mode register (TM4MD). Disable timer 4 counting and interrupts. Select up counting. Set the TM4NLP bit to 0 to select looped counting from 0 to x’FFFF’. Select timer 0 underflow as the clock source.
Use the MOV instruction for this setup and only use 16-bit write operations.
TM4 NLD — — TM4 UD1
TM4 UD0
TM4 TGE
TM4 ONE
TM4 MD1
TM4 MD0
TM4 ECLR
TM4
TM4 ASEL
TM4
TM4
TM4
This step stops the TM4BC count and clears both TM4BC and the S-R flip-flop to 0.
LP
S2
S1
S0
Setting: 0 1 1 0 0 1 or 0
When TM4MD[1:0] = b’11’ (dur- ing capture), TM4CA and TM4CB become read-only regis- ters. To write to TM4CA or TM4CB, you must first set TM4MD[1:0] = b’00’.
To enable timer 4 capture B interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM4CBLV[2:0] bits of the TM4CBICH register (levels 0 to 6), set the TM4BIE bit to 1, and set the TM4BIR bit of TM4CBICL to 0. From this point on, an interrupt request is generated whenever a timer 4 capture B event occurs.

I To service the interrupts and calculate the signal width: 1. Run the interrupt service routine. The routine must determine the interrupt group, then clear the interrupt request flag.
Ignore the flags when calculat- ing the signal width, even when TM3CA is the larger value.
Timer 4 can input a two-phase capture signal. You must select up counting. Timer 4 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
TM4CA captures the count on the rising edge of TM4IA, and TM4CB captures the count on the rising edge of TM4IB. A timer 4 capture B interrupt occurs when TM4CB captures the count, and the contents of TM4CA and TM4CB are read during the interrupt service routine.
In the example timing chart shown in figure 4-38, x’000A’ – x’0007’ = x’0003’, or 3 cycles. The calculation is correct even when TM4CA is the larger value. The flags are ignored, so for instance, x’0003’ – x’FFFE’ = x’0005’.
TM4BC
0 0 1 2 3 4 5 6 7
8 9 A B C D E F 10 11 12
TM4CA
TM4CB
0 A
TM4IA
A-7=3
TM4IB
B
Figure 4-38 Two-Phase Capture Input Timing (Timer 4)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 110
Interrupt

4.11.6 Setting Up a 4x Two-Phase Encoder Input Using Timer 5 In this example, timer 5 inputs a 4x two-phase encoded signal that makes it count up and down. An interrupt occurs when the counter reaches a preset value.
ROM, RAM
P2
P3
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM5IA TM5IB
P4
Timers 4-5
ADC
Timer 5
TM5BC
TM5CA
TM5IA
T Q
Controller
R S Q
TM5CB
TM5IB
T Q
B. Block Level
Figure 4-39 Block Diagram of 4x Two-Phase Capture Input Using Timer 5
x'1000' Interrupt 0 x'1FFF'
Timer 5
As figure 4-41 shows, you can set different values for A and B interrupts. (TM5LP must be 0.)
x'1000' A interrupt 0 x'FFFF' x'FF00' B interrupt
Timer 5
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 111
up/down · Interrupt B · TM5BC contents

I To set up timer 5:
Use the MOV instruction for this setup and only use 16-bit write operations.
This step stops the TM5BC count and clears both TM5BC and the S-R flip-flop to 0.
TM5 NLD — — TM5 UD1
TM5 UD0
TM5 TGE
TM5 ONE
TM5 MD1
TM5 MD0
TM5 ECLR
TM5
TM5 ASEL
TM5
TM5
TM5
EN
LP
S2
S1
S0
Setting: 0 1 1 or 0 1 0 0
TM5 CA14
TM5 CA13
TM5 CA12
TM5 CA11
TM5 CA10
TM5 CA9
TM5 CA8
TM5 CA7
TM5 CA6
TM5 CA5
TM5 CA4
TM5 CA3
TM5 CA2
TM5 CA1
TM5 CA0
Setting: 0 0 0 1
TM5 CB14
TM5 CB13
TM5 CB12
TM5 CB11
TM5 CB10
TM5 CB9
TM5 CB8
TM5
TM5 CB6
TM5 CB5
TM5 CB4
TM5
TM5 CB2
TM5 CB1
TM5 CB0
CB7
CB3
Setting: 0 0 0 1 0
To enable timer 5 capture B interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM5CBLV[2:0] bits of the TM5CBICH register (levels 0 to 6), set the TM5BIE bit to 1, and set the TM5BIR bit of TM5CBICL to 0. From this point on, an interrupt request is generated whenever a timer 5 capture B event occurs.

I To service the interrupts: Run the interrupt service routine. The routine must determine the interrupt group, then clear the interrupt request flag.
Timer 5 can input a two-phase encoder signal. Timer 5 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
Table 4-4 shows the count direction for the timing diagram in figure 4-42. In down counting, when the binary counter reaches 0, it loops to the value in TM5CA. An interrupt B occurs when the contents of TM5BC match those of TM5CB.
Up Counting Down Counting
TM5IA ↑ 1 ↓ 0 ↑ 0 ↓ 1
TM5IB 0 ↑ 1 ↓ 1 ↑ 0 ↓
1FFF
TM5CB
TM5BC
0000 1FFF 1FFE 1FFD 1FFE 1FFF
0000 0001 0FFF 1000
TM5IA
TM5IB
B
Figure 4-42 4x Two-Phase Encoder Input Timing (Timer 5)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 113
Interrupt

4.11.7 Setting Up a 1x Two-Phase Encoder Input Using Timer 5 In this example, timer 5 inputs a 1x two-phase encoded signal that makes it count up and down. An interrupt occurs when the counter reaches a preset value.
ROM, RAM
P2
P3
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM5IA TM5IB
P4
Timers 4-5
ADC
Timer 5
TM5BC
TM5CA
TM5IA
T Q
Controller
R S Q
TM5CB
TM5IB
T Q
B. Block Level
Figure 4-43 Block Diagram of 1x Two-Phase Capture Input Using Timer 5
x'1000' Interrupt 0 x'1FFF'
Timer 5
As figure 4-45 shows, you can set different values for A and B interrupts. (TM5LP must be 0.)
x'1000' A interrupt 0 x'FFFF' x'FF00' B interrupt
Timer 5
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 114
up/down · Interrupt B · TM5BC contents

I To set up timer 5:
Use the MOV instruction for this setup and only use 16-bit write operations.
This step stops the TM5BC count and clears both TM5BC and the S-R flip-flop to 0.
TM5 NLD — — TM5 UD1
TM5 UD0
TM5 TGE
TM5 ONE
TM5 MD1
TM5 MD0
TM5 ECLR
TM5
TM5 ASEL
TM5
TM5
TM5
EN
LP
S2
S1
S0
Setting: 0 1 1 or 0 1 0 1
TM5 CA14
TM5 CA13
TM5 CA12
TM5 CA11
TM5 CA10
TM5 CA9
TM5 CA8
TM5 CA7
TM5 CA6
TM5 CA5
TM5 CA4
TM5 CA3
TM5 CA2
TM5 CA1
TM5 CA0
Setting: 0 0 0 1
TM5 CB14
TM5 CB13
TM5 CB12
TM5 CB11
TM5 CB10
TM5 CB9
TM5 CB8
TM5
TM5 CB6
TM5 CB5
TM5 CB4
TM5
TM5 CB2
TM5 CB1
TM5 CB0
CB7
CB3
Setting: 0 0 0 1 0
I To enable timer 5 capture B interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM5CBLV[2:0] bits of the TM5CBICH register (levels 0 to 6), set the TM5BIE bit to 1, and set the TM5BIR bit of TM5CBICL to 0. From this point on, an interrupt request is generated whenever a timer 5 capture B event occurs.

I To service the interrupts: Run the interrupt service routine. The routine must determine the interrupt group, then clear the interrupt request flag.
Timer 5 can input a two-phase encoder signal. Timer 5 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
Table 4-5 shows the count direction for the timing diagram in figure 4-46. In down counting, when the binary counter reaches 0, it loops to the value in TM5CA. An interrupt B occurs when the contents of TM5BC match those of TM5CB.
Up Counting Down Counting
TM5IB 1 1
TM5CA
1FFF
TM5CB
TM5BC
0000 1FFF 1FFE 1FFD 1FFE 1FFF
0000 0001 0FFF 1000
TM5IA
TM5IB
B A A
Figure 4-46 1x Two-Phase Encoder Input Timing (Timer 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 116
Interrupts

4.11.8 Setting Up a One-Shot Pulse Output Using Timer 5 In this example, timer 5 outputs a one-shot pulse. The pulse width is two clock cycles.
CORE
ROM, RAM
P3
P6
Interrupts
P5
Timers 0-3
Serial I/Fs
TM5OA
P4
Timers 4-5
ADC
TM5IB
A. Chip Level
Timer 5
B OSC /4
TM5BC
up/down
TM5CA
T Q
TM5CAX
R S Q
TM5OA
TM5IB
TM5CB
T Q
TM5CBX
B. Block Level
Figure 4-47 Block Diagram of One-Shot Pulse Output Using Timer 5
I To set up the output port: Set the P4MD2 bit of the port 4 output mode register (P4MD) to 1 (selecting the TM5IOA pin) and set the P4DIR2 bit of the port 4 I/O control register (P4DIR) to 1 (selecting output direction). This step selects the TM5OA pin (P42) as the timer output port.
P4 MD6
P4 MD5
P4 MD4
P4 MD3
P4 MD2
P4 MD1
P4 MD0
P4 DIR6
P4 DIR5
P4 DIR4
P4 DIR3
P4 DIR2
P4 DIR1
P4 DIR0
Controller

I To set up timer 5:
Use the MOV instruction for this setup and only use 16-bit write operations.
TM5 NLD — — TM5 UD1
TM5 UD0
TM5 TGE
TM5 ONE
TM5 MD1
TM5 MD0
TM5 ECLR
TM5
TM5 ASEL
TM5
TM5
TM5
EN
LP
S2
S1
S0
This step stops the TM5BC count and clears both TM5BC and the S-R flip-flop to 0.
Setting: 0 1 1 0 0 0 1 1 or 0 0 1 1
TM5 CA14
TM5 CA13
TM5 CA12
TM5 CA11
TM5 CA10
TM5 CA9
TM5 CA8
TM5 CA7
TM5 CA6
TM5 CA5
TM5 CA4
TM5 CA3
TM5 CA2
TM5 CA1
TM5 CA0
Setting: 0 1 1
TM5 CB14
TM5 CB13
TM5 CB12
TM5 CB11
TM5 CB10
TM5 CB9
TM5 CB8
TM5
TM5 CB6
TM5 CB5
TM5 CB4
TM5
TM5 CB2
TM5 CB1
TM5 CB0
CB7
CB3
Setting: 0 1

Timer 5 can output a one-shot pulse. Timer 5 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
Figure 4-48 shows an example timing diagram for one-shot pulse output. On the falling edge of TM5IB, the TM5EN flag is set, and counting begins at the start of the next cycle. Before the count starts, TM5BC is 0, the initial TM5OA output value is 0, and the R5 (reset) and S5 (set) signals are not asserted. After the count starts, when it changes from 0 to 1, the S5 signal is asserted. This sets the TM5OA signal high, and it outputs the one-shot pulse. When the count reaches 3, TM5BC resets, changing from 3 to 0, and the R5 signal is asserted, causing the TM5OA signal to go low. Because the TM5ONE bit of the TM5MD register is 1, and the TM5EN bit is reset, the count stops. The circuit state is now the same as it was before the TM5IB signal went low. When the TM5IB signal falls again, the hardware once again sets the TM5EN bit, and the one-shot pulse sequence repeats.
TM5CB
TM5BC
0000 0003 0002 0001 0000 0003 0002 0001 0000
TM5EN
TM5IB
S5
R5
TM5OA
Figure 4-48 One-Shot Pulse Output Timing (Timer 5)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 119

4.11.9 Setting Up an External Count Direction Controller Using Timer 5 In this example, timer 5 counts BOSC/4 and the TM5IA pin controls the count direction (up or down). An interrupt occurs when the counter reaches a preset value.
ROM, RAM
P2
P3
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM5IA
P4
Timers 4-5
ADC
Timer 5
B OSC /4
TM5BC
TM5CA
TM5IA
T Q
Controller
R S Q
TM5CB
T Q
B. Block Level
Figure 4-49 Block Diagram of External Count Direction Control Using Timer 5
x'1000' Interrupt 0 x'1FFF'
Using Timer 5
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 120
up/down · Interrupt B · TM5BC contents

I To set up timer 5:
Use the MOV instruction for this setup and only use 16-bit write operations.
This step stops the TM5BC count and clears both TM5BC and the S-R flip-flop to 0.
TM5 NLD — — TM5 UD1
TM5 UD0
TM5 TGE
TM5 ONE
TM5 MD1
TM5 MD0
TM5 ECLR
TM5
TM5 ASEL
TM5
TM5
TM5
EN
LP
S2
S1
S0
Setting: 0 1 0 1 1 or 0 0 1 1
TM5 CA14
TM5 CA13
TM5 CA12
TM5 CA11
TM5 CA10
TM5 CA9
TM5 CA8
TM5 CA7
TM5 CA6
TM5 CA5
TM5 CA4
TM5 CA3
TM5 CA2
TM5 CA1
TM5 CA0
Setting: 0 0 0 1
TM5 CB14
TM5 CB13
TM5 CB12
TM5 CB11
TM5 CB10
TM5 CB9
TM5 CB8
TM5
TM5 CB6
TM5 CB5
TM5 CB4
TM5
TM5 CB2
TM5 CB1
TM5 CB0
CB7
CB3
Setting: 0 0 0 1 0
I To enable timer 5 capture B interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level in the TM5CBLV[2:0] bits of the TM5CBICH register (levels 0 to 6), set the TM5BIE bit to 1, and set the TM5BIR bit of TM5CBICL to 0. From this point on, an interrupt request is generated whenever a timer 5 capture B event occurs.

I To service the interrupts: Run the interrupt service routine. The routine must determine the interrupt group, then clear the interrupt request flag.
Either the TM5IA or TM5IB signal can control the timer 5 count direction. The count direction is determined at the opposite edge from the count edge (at the source clock transition occurring in the middle of the count cycle.).
Timer 5 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
Figure 4-51 shows an example timing chart. In this example, an interrupt occurs when the timer switches from down to up counting.
TM5CA
TM5CB
TM5BC
0000 1FFF 1FFF 1001 1000 0FFF 0002 0001 0000 1FFE 1FFE 1FFD
TM5IA
B
Figure 4-51 External Count Direction Control Timing (Timer 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 122
Interrupt

4.11.10Setting Up External Reset Control Using Timer 5 In this example, timer 5 is reset by an external signal while counting up.
ROM, RAM
P2
P3
P6
Interrupts
Bus Controller
P5
Timers 0-3
Serial I/Fs
TM5IC
P4
Timers 4-5
ADC
Timer 5
B OSC /4
TM5BC
reset
TM5CA
T Q
R S Q
TM5CB TM5IC
T Q
B. Block Level
Figure 4-52 Block Diagram of External Reset Control Using Timer 5
I To set up timer 5:
Use the MOV instruction to set this data and only use 16-bit write operations.
This step stops the TM5BC count and clears both TM5BC and the S-R flip-flop to 0.
TM5 NLD — — TM5 UD1
TM5 UD0
TM5 TGE
TM5 ONE
TM5 MD1
TM5 MD0
TM5 ECLR
TM5
TM5 ASEL
TM5
TM5
TM5
EN
LP
S2
S1
S0
Setting: 0 1 1 0 0 1 1
Controller

TM5CA (example) x’00FE94’
TM5 CA14
TM5 CA13
TM5 CA12
TM5 CA11
TM5 CA10
TM5 CA9
TM5 CA8
TM5 CA7
TM5 CA6
TM5 CA5
TM5 CA4
TM5 CA3
TM5 CA2
TM5 CA1
TM5 CA0
Setting: 0 0 0 1
From this point on, whenever the TM5IC signal is high, timer 5 will be reset asynchronously. This is an easy way to synchronize the microcontroller operation with an external event. You can use it to adjust motor speed or to initialize the timers through the hardware.
Timer 5 does not operate in STOP mode, when BOSC is off. If you use an external clock, it must be synchronized to BOSC.
Figure 4-53 shows an example timing chart.
0000 0001 0003 0002 0001 0000 0002 0004 0003
TM5IC
Figure 4-53 External Reset Control Timing (Timer 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 124

4.12 16-Bit Timer Control Registers Table 4-6 shows the registers used to control the 16-bit timers. A binary counter (TMnBC), a compare/capture register A (TMnCA), a compare/capture register B (TMnCB), and a timer mode register (TMnMD) is associated with each 16-bit timer.
Register Address R/W Description
Timer 4 TM4MD x’00FE80’ R/W Timer 4 mode register
TM4BC x’00FE82’ R Timer 4 binary counter
TM4CA x’00FE84’ R/W Timer 4 compare/capture register A
TM4CAX x’00FE86’ — Timer 4 compare/capture register set AX
TM4CB x’00FE88’ R/W Timer 4 compare/capture register B
TM4CBX x’00FE8A’ — Timer 4 compare/capture register set BX
Timer 5 TM5MD x’00FE90’ R/W Timer 5 mode register
TM5BC x’00FE92’ R Timer 5 binary counter
TM5CA x’00FE94’ R/W Timer 5 compare/capture register A
TM5CAX x’00FE96’ — Timer 5 compare/capture register set AX
TM5CB x’00FE98’ R/W Timer 5 compare/capture register B
TM5CBX x’00FE9A’ — Timer 5 compare/capture register set BX
BC3
Reset: 0
R/W: R
TMnCA and TMnCB are 16-bit access registers. Use the MOV instruction to write to them.
Reset: 0
R/W: R/W
CB3
Reset: 0
R/W: R/W

TM4MD/TM5MD: Timer n Mode Register x’00FE80’/x’00FE90’
TMn NLD — — TMn UD1
LP
S2
S1
S0
Reset: 0
R/W: R/W R/W R R R/W
0: Disable 1: Enable
TMnNLD: TMnBC, T flip-flop, and S-R flip-flop operation select
0: Set all to 0 (initialize) 1: Operate all
TMnUD[1:0]: Timer n up/down counter mode select
Ignored when two-phase encoding is selected.
0: Disable 1: Start count at falling edge of TMnIOB
TMnONE: Counter operating mode select
0: 0000–FFFF 1: 0000–value in TMnCA
TMnASEL: TMnIOA output select
0: S-R flip-flop output (single-phase PWM) 1: T flip-flop output (two-phase PWM)
TMnS[2:0]: Timer n clock source select

5 Serial Interfaces
5.1 Description The MN102H75K/85K contains two general-purpose serial interfaces with syn- chronous serial, UART, and I2C modes. The maximum baud rate in synchronous serial mode is 12 Mbps. In UART mode, the maximum baud rate is 375,000 bps, when BOSC = 24 MHz.
TM0IR TM1IR Signal from 8-bit timers
SBO0
TXC
SBT0
RXC
RXD
SBI0
TXD
SBO1
TXC
SBT1
RXC
RXD
SBI1
Figure 5-1 Serial Interface Configuration Example
5.2 Features
Table 5-1 Serial Interface Functions and Features
Function/Feature Synchronous Serial Mode UART Mode I 2 C Mode
Parity None, 0, 1, even, or odd Can be master trans- mitter or receiver. (No collision detection for start sequence.)
Character length 7-bit or 8-bit
Transfer bit order LSB or MSB first (programmable; 8-
Clock source • 1/2 of timer 0 underflow
Maximum baud rate 12 Mbps
(when BOSC = 24 MHz)
(when BOSC = 24 MHz)
Error detection • Parity error
Buffers Independent transmit/receive buffers (single transmit buffer, double receive buffers)
Interrupts Transmission or reception complete interrupts

5.3 Connecting the Serial Interfaces Figures 5-2, 5-3, and 5-4 illustrate six different methods of connecting the serial interface.
See section 11, “I/O Ports,” for details on setting up the SBT port.
Figure 5-2 shows serial port connections for either simplex or full-duplex syn- chronous serial transfers.
SBO
SBO
SBO
SBI
SBI
SBI
SBI
SBT SBT
SBT SBT
A. Simplex Connection B. Full-Duplex Connection
Figure 5-2 Synchronous Serial Mode Connections
5.3.2 UART Mode Connections Figure 5-3 shows serial port connections for either simplex or full-duplex UART transfers.
SBO
SBO
SBO
SBI
SBI
SBI
SBI
A. Simplex Connection B. Full-Duplex Connection
Figure 5-3 UART Mode Connections
5.3.3 I2C Mode Connection The serial interfaces can connect to I2C slave transmitters or receivers. For this mode, always pull up the SBO and SBT pins to VDD. Either connect a pullup resistor externally or turn on the internal one by setting the PPLU register.
SBT Master transmitter/ receiver
MN102H75K
Slave transmitter/
Slave transmitter/
receiver
receiver
Figure 5-4 I 2 C Mode Connection
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 128

5.4 UART Mode Baud Rates In UART mode, the serial interface transfer clock is set to 16 times the baud rate clock. The expression below is the formula for calculating the baud rate for the UART mode. Table 5-2 shows the baud rate settings when BOSC = 24 MHz.
baud rate (bps)
Table 5-2 Example Baud Rate Settings for the UART Mode
Baud Rate Timer 0/1 Divide-by Ratio
5.5 Serial Interface Timing
5.5.1 Synchronous Serial Mode Timing In these timing charts, the character length is 8 bits and there is parity.
SBO
b0 b1 b2 b3 b4 b5 b6 b7 PTY
SBT
Data write
TXBUSY
Tx interrupt
Figure 5-5 Synchronous Serial Transmission Timing
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 129
19200 9600

Rx
SBI
b0 b1 b2 b3 b4 b5 b6 b7 PTY
SBT
RXBUSY
Rx interrupt
RXA (1 when Rx data in)
Data read
Figure 5-6 Synchronous Serial Reception Timing
5.5.2 UART Mode Timing In these timing charts, the character length is 8 bits, the parity is none, and the stop bit is 2-bit.
SBO
ST b0 b1 b2 b3 b4 b5 b6 b7 SP SP
Data write
TXBUSY
Tx interrupt
Figure 5-7 UART Transmission Timing
Rx
SBI
ST b0 b1 b2 b3 b4 b5 b6 b7 SP SP
RXBUSY
Rx interrupt
RXA (1 when Rx data in)
Data read
Figure 5-8 UART Reception Timing
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 130

5.6 Serial Interface Setup Examples
5.6.1 Setting Up UART Transmission Using Serial Interface 0
This example illustrates serial transmission in the UART mode with the fol- lowing settings:
You must use an 8-bit timer to set the transfer clock. See sec- tion 5.6.3, “Setting Up the Serial Interface Clock,” on page 135, for an example setup.
o Baud rate = 9600 bps (transfer clock set up with timer 0)
o Two stop bits
o Odd parity
When a transmission end interrupt occurs, the next data byte is loaded.
ROM, RAM
P0
P1
P2
Interrupts
Bus Controller
P3
P4
Timers 0-1
Serial I/Fs
P5
SBO0
P6
Timers 2-3
ADC
Figure 5-9 Block Diagram of UART Transmission Using Serial Interface 0
Data transmission starts when the CPU writes data to the SC0TRB register. The transmission start is synchronized to timer 0 underflow. An interrupt occurs when transmission ends, and the next data byte is written to SC0TRB. If the application does not use interrupts, it must poll the SC0TBY flag of the SC0STR register. It can write the transmission data when SC0TBY is 0.
I To set up the output port: Set the P5MD5 bit of the port 5 output mode register (P5MD) to 1. This selects the SBO0 pin as the serial interface output port.
P5 MD6
P5 MD5
P5 MD4
P5 MD3
P5 MD2
P5 MD1
P5 MD0

I To set up serial interface 0: 1. Configure the transmission settings in the serial port 0 control register (SC0CTR). Since the transfer clock is timer 0 divided by 8, select timer 0 underflow x 1/8 as the serial port 0 clock source. Select UART mode, odd parity, 2-bit stop bit, 8-bit data length, and LSB-first output. Also set the SC0REN and SC0TEN flags to 0, disabling transmission and reception.
SC0 REN
SC0 BRE
SC0 I2CS
SC0 PTL — SC0
SC0 I2CM
SC0
SC0 PTY2
SC0 PTY1
SC0 PTY0
SC0
SB — SC0
SC0
OD
LN
S1
S0
Setting: 0 1 0 0 1
I To enable serial 0 transmission end interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level of 5 in the ANLV[2:0] bits of the ANICH register, set the SCT0IE bit of SCT0ICH to 1, and set the SCT0IR bit of SCT0ICL to 0. From this point on, an interrupt request is generated whenever a serial data transmission ends.
IR — — — SCT0
ID
IE

I Transmission sequence: 1. Write the first data byte to SC0TRB. Once this data is in the register, trans- mission begins, synchronized to timer 0.
Figure 5-10 shows an example timing chart.
ST b0 b1 b2 b3 b4 b5 b6 b7 PT SP SP ST b0 b1 b2 b3 b4
Figure 5-10 UART Transmission Timing (Serial Interface 0)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 133

5.6.2 Setting Up Synchronous Serial Reception Using Serial Interface 0 This example illustrates serial reception in the synchronous serial mode with the following settings:
o 8-bit character length
o Odd parity
When a reception end interrupt occurs, the CPU reads the data byte.
I To set up the input port: Set the P5DIR7 bit of the port 5 I/O control register (P5DIR) to 0. This sets the SBT0 pin to input.
I To set up serial interface 0: Configure the reception settings in the serial port 0 control register (SC0CTR). Select timer 0 underflow x 1/8 as the serial port 0 clock source. Select timer 0 underflow x 1/8 as the serial port 0 clock source. Select synchronous serial mode, odd parity, 8-bit data length, and LSB-first output.
SC0 REN
SC0 BRE
SC0 I2CS
SC0 PTL — SC0
SC0 I2CM
SC0
SC0 PTY2
SC0 PTY1
SC0 PTY0
SC0
SB — SC0
SC0
OD
LN
S1
S0
Setting: 1 1 0 0 1 0 0 0 1 0 0 0 1
I To enable serial 0 transmission end interrupts: Cancel all existing interrupt requests. Next, set the interrupt priority level of 5 in the ANLV[2:0] bits of the ANICH register, set the SCR0IE bit of SCR0ICH to 1, and set the SCR0IR bit of SCR0ICL to 0. From this point on, an interrupt request is generated whenever a serial data reception ends.
IR — — — SCR0
ID
IE

5.6.3 Setting Up the Serial Interface Clock This example demonstrates how to set up a 19,200 bps transfer clock for the UART interface by using timer 1 to divide BOSC/4 by 39. The example uses the following settings:
o Clock source = timer 1 underflow x 1/8
o Transfer clock = baud rate x 8
The serial interface determines the baud rate from the 8-bit underflow. Set up the transfer clock by making the timer 1 underflow either two or eight times the desired baud rate. The serial interface divides the timer underflow by two or eight. (Always select divide-by-eight for UART transactions.) For a baud rate of 19,200, since BOSC/4 = 6 MHz,
This means that the timer 1 underflow must be divided by 39.
CORE
ROM, RAM
P1
Interrupts
Bus Controller
P2
P3
P4
Timers 0-1
Serial I/Fs
P5
P6
Timers 2-3
ADC
Timers 4-5
Figure 5-11 Block Diagram of Serial Interface Clock
I To set timer 1: 1. Disable timer 1 counting in the timer 1 mode register (TM1MD). This step is unnecessary immediately after a reset, since TM1MD resets to 0.
TM1
LD — — — — TM1
TM1
EN
S1
S0
TM1 BR6
TM1 BR5
TM1
TM1 BR3
TM1 BR2
TM1 BR1
TM1 BR0
BR4

Do not change the clock source once you select it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM1
LD — — — — TM1
TM1
EN
S1
S0
In the bank and linear address- ing versions of the MN102 series, it was necessary to set TM1EN and TM1LD to 0 between steps 3 and 4, to ensure stable operation. This is unnecessary in the high-speed linear addressing version.
Figure 5-12 shows an example timing chart.
TM1BR
TM1BC
00 26 00 26 00 26 00 26 00 26 00 26 00 26 00 26 00 26 00 26 00 26
TM1 output (To serial I/F)
indicates 25, 24-02, and 01.
The interrupt process is repeated each time the buffer receives another byte of serial data.

5.6.4 Setting Up I2C Transmission Using Serial Interface 0 This example illustrates the microcontroller as a master transmitter in the I2C mode, using the SBO0 and SBT0 pins.
I To set up the output ports: I2C mode requires open-drain pins. To set this up, set the ODASCI0 bit of PCNT0 (x’00FF90’) to 1. In addition, set the P5PUP7 and P5PUP5 bits of P5PUP (x’00FFB5’) to enable pullup control of the SBO0 and STB0.
Set the P5MD7 and P5MD5 bits of the port 5 output mode register (P5MD) to 1. This selects the SBO0 and SBT0 pins as the output port for the I2C interface.
P5 MD6
P5 MD5
P5 MD4
P5 MD3
P5 MD2
P5 MD1
P5 MD0
I To set up the I2C interface: The parity bits serve as the ACK signal. To output an ACK = 1 sig- nal, select a fixed parity of 1. To output an ACK = 0 signal, select a fixed parity of 0. Select a parity of none if there is no ACK signal.
Set the operating conditions in the serial control register (SC0CTR). Select ACK = 1 output for the transfer clock (SC0PTY[2:0] = b’101’), 8-bit character length (SCLN = 1), I2C protocol (SC0PTL = 1), I2C mode (SC0ICM = 1), and MSB- first bit order (SC0OD = 1). Enable both transmission and reception (SC0TEN and SC0REN = 1) and disable transmission breaks (SC0BRE = 0). Select the timer 0 underflow rate divided by 8 as the clock source.
SC0 REN
SC0 BRE
SC0 I2CS
SC0 PTL — SC0
SC0 I2CM
SC0
SC0 PTY2
SC0 PTY1
SC0 PTY0
SC0
SB — SC0
SC0
OD
LN
S1
S0
Setting: 1 1 0 0 1 0 1 0 1 0 0 0 1
I To set up the start sequence: Reception must be enabled for the circuit to detect a start sequence.
Write a 1 to the SC0IIC bit of the SC0CTR register to signal the start sequence. The SBO0 pin output immediately goes low. Read SC0STR to verify that the start sequence occurred correctly (SC0IST = 1). At this point, even if another start exists on the bus, an arbitration lost will not be detected.
I To transmit the first data byte: 1. Load the data to the serial port 0 transmit/receive buffer, which initiates data output. The SBO0 pin begins data output to the I2C bus when the SBT0 clock signal goes low, with a 1/8 clock cycle delay.
I To transmit a second data byte: Load the data to the serial port 0 transmit/receive buffer. The sequence for the first data byte repeats.
I To set up the stop sequence: 1. When all the data has been transmitted, set the SC0IIC bit of SC0CTR to 0. Never perform this step during transmission.

Reception must be enabled for the circuit to detect a stop sequence.
Figure 5-13 shows an example timing chart.
I2C sequence
b7 b6 b5 b4 b3 b2 b1 b0 b6 b5 b4 b3 b2 b1 b0 ACK b7 ACK
Stop detection bit = 1 Start detection bit = 1
Data tx 1 Start sequence
Data tx 2 Stop sequence
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 138

5.6.5 Setting Up I2C Reception Using Serial Interface 0 This example illustrates the microcontroller as a master receiver in the I2C mode, using the SBO0 and SBT0 pins.
When initiating master receiver mode, your program must always first transmit a byte of data. The master reception occurs during the interrupt service routine that runs after the data is transmitted. For an example setup of master transmission, see section 5.6.4, “Setting Up I2C Transmission Using Serial Interface 0,” on page 137.
I To set up the I2C interface: You do not need to enable reception if it is already enabled by the initial settings. You can also omit any settings already in place from the transmission sequence.
To set up data reception: 1. Write a dummy data bit, x’FF’, to the serial port 0 transmit/receive buffer. This sets the SBO0 signal high and initiates the master receiver mode.
The parity bits serve as the ACK signal. To output an ACK = 1 sig- nal, select a fixed parity of 1. To output an ACK = 0 signal, select a fixed parity of 0. Select a parity of none if there is no ACK signal
I To set up the stop sequence: 1. Set the SC0IIC bit of SC0CTR to 0 to signal the stop sequence.
Figure 5-14 shows an example timing chart.
I2C sequence
Dummy data transmission for reception
b7 b6 b5 b4 b3 b2 b1 b0 b6 b5 b4 b3 b2 b1 b0 ACK b7 ACK
Stop detection bit = 1 Start detection bit = 1
Data rx Stop sequence
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 139

5.7 Serial Interface Control Registers Three registers control each of the serial interfaces: the serial port control register (SCnCTR), the serial transmit/receive buffer (SCnTRB), and the serial port status register (SCnSTR).
Register Address R/W Description
Serial I/F 0 SC0CTR x’00FD80’ R/W Serial port 0 control register
SC0TRB x’00FD82’ R/W Serial port 0 transmit/receive buffer
SC0STR x’00FD83’ R Serial port 0 status register
Serial I/F 1 SC1CTR x’00FD88’ R/W Serial port 1 control register
SC1TRB x’00FD8A’ R/W Serial port 1 transmit/receive buffer
SC1STR x’00FD8B’ R Serial port 1 status register
SCn PTL — SCn
LN
S1
S0
Reset: 0
R/W: R/W R R/W R R/W R/W
SC0CTR controls the operating conditions for the serial interface, includ- ing the clock source, the parity bit, the protocol, and transmit/receive enabling.
0: Disable 1: Enable
SCnREN: Serial port n receive enable
0: Disable 1: Enable
SCnBRE: Serial port n break transmission
0: Don’t break 1: Break (Force SBOn to 0)
SCnIIC: Serial port n I 2 C start/stop sequence output
Do not change this bit during transmission or reception.
0: UART 1: Synchronous serial or I 2 C
SCnOD: Serial port n bit order
This bit must be set to 0 during 7-bit transmission.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 140

SCnICM: Serial port n I 2 C mode select
0: I 2 C mode off 1: I 2 C mode on
SCnLN: Serial port n character length
0: 7-bit 1: 8-bit
SCnPTY[2:0]: Serial port n parity bit select
000:None 001:Reserved 010:Reserved 011:Reserved 100:0 (output low) 101:1 (output high) 110:Even (1s are even) 111:Odd (1s are odd)
0: 1-bit 1: 2-bit
SCnS[1:0]: Serial port n clock source select
The 00 and 10 settings are reserved in UART and I2C modes.
Data transmission begins when the CPU writes data to SCnTRB.
The CPU retrieves the data by reading SCnTRB. SCnTRB has two respec- tive buffers, for transmission and for reception. The buffers for reception is consist of two buffers and the received data is set to SCnTRB after the reception ends, and held until that of the next data ends
Over-run-error occurs if SCnTRB is not read, before the reception of the next data ends (See 5-5)
When the received data is set to SCnTRB, reception end interrupt occurs and SCnRXA flag of SCnTRB register is set to 1.
During 7-bit transfers, the most significant bit (bit 7) of SCnTRB is always 0.
The reset value of SC0TRB is undefined.

SC0STR/SC1STR: Serial Port n Status Register x’00FD83’/x’00FD8B’
IST
FE
PE
OE
SCnSTR contains the error detection and status flags for the serial inter- faces.
0: OK to transmit 1: Transmission in progress
SCnRBY: Serial port n reception busy flag
0: OK to receive 1: Reception in progress
SCnISP: Serial port n I 2 C stop sequence detect
A read or write to SCnTRB clears this bit.
SCnRXA: Serial port n received data flag
0: Not received 1: Received
SCnIST: Serial port n I 2 C start sequence detect
A read or write to SCnTRB clears this bit.
SCnFE: Serial port n framing error
A framing error occurs when a 0 is received during stop bit transfer. Fram- ing error data is updated each time the stop bit is received.
SCnPE: Serial port n parity error
A parity error occurs when the received parity bit is 1 and the parity setting is 0; when the received parity bit is 0 and the parity setting is 1; when the received parity bit is odd and the parity setting is even; or when the received parity bit is even and the parity setting is odd. Parity error data is updated each time the parity bit is received.
SCnOE: Serial port n overrun error
An overrun error occurs during reception when a data byte reception ends before the CPU has read the previous byte from SCnTRB. Overrun error data is updated each time the last data bit (seventh or eighth bit) is received.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 142

6 Analog-to-Digital Converter
6.1 Description The MN102H75K/85K contains an 8-bit charge redistribution A/D converter (ADC) that can process up to 12 channels. The reference clock is selectable to BOSC x 1/8 or 1/16. When BOSC is 24 MHz, you must set the reference clock to BOSC/8 (conversion rate = 4 µs) or higher.
ADIN0 ADIN1 ADIN2 ADIN3 ADIN4 ADIN5 ADIN6 ADIN7 ADIN8 ADIN9 ADIN10 ADIN11
AN0BUF AN1BUF AN2BUF AN3BUF AN4BUF AN5BUF AN6BUF AN7BUF AN8BUF AN9BUF AN10BUF AN11BUF
M
Sample
8-bit successiveapproximation
U
and hold
ADC
V SS
Figure 6-1 ADC Architecture
6.2 Features
Table 6-1 ADC Functions and Features
Function/Feature Description
Sample and hold Embedded
Conversion time 4 µs per channel (when BOSC = 24 MHz)
Clock sources Programmable to BOSC divided by 8 or 16
Operating modes 46 operating modes (four types) (1)
Conversion start Timer 1 underflow or register setting
Interrupts An interrupt is generated each time a single or continuous conversion sequence ends

Block Diagram
6.3 Block Diagram

ADIN0 ADIN1 ADIN2 ADIN3 ADIN4 ADIN5 ADIN6 ADIN7 ADIN8 ADIN9 ADIN10 ADIN11
128 64 32 16 8 4 2 1 1
6.4 A/D Conversion Timing
6.4.1 Selecting the ADC Clock Source Calculate the A/D conversion time as follows:
conversion time (s) = [12 (cycles) × (BOSC cycle) (s) × divide-by ratio] / ch
For example, if you set the clock source to BOSC/8, the conversion time is BOSC × 96 cycles.

bit 7 6 5 4 3 2 1 0 Transfer
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 144

6.4.2 Single Channel/Single Conversion Timing When ANMD[1:0] = b’00’, the ADC converts one ADIN input signal a single time. An interrupt occurs when the conversion ends. Load the number of the channel to be converted to the AN1CH[3:0] field of the ADC control register (ANCTR). (The ANNCH[3:0] field is ignored in this mode.)
When the software starts the conversion, write a 0 to the ANTC bit (disabling conversion start at timer 1 underflow), then write a 1 to ANEN. (If ANTC = 1, ANEN goes high upon a timer 1 underflow.) ANEN remains high during the con- version, then clears to 0 when the conversion ends.
Stop
Interrupt
request
State Channel 0 conversion
ANEN
Figure 6-4 Single Channel/Single Conversion Timing
6.4.3 Multiple Channel/Single Conversion Timing When ANMD[1:0] = b’01’, the ADC converts multiple, consecutive ADIN input signals a single time. An interrupt occurs when the conversion sequence ends. Load 0s to the AN1CH[3:0] field of the ADC control register (ANCTR), then load the number of the final channel in the sequence to the ANNCH[3:0] field. The sequence always begins with channel 0.
When the software starts the conversion, write a 0 to the ANTC bit (disabling conversion start at timer 1 underflow), then write a 1 to ANEN. (If ANTC = 1, ANEN goes high upon a timer 1 underflow.) ANEN remains high during the con- version, then clears to 0 when the conversion sequence ends. Note that the AN1CH[3:0] field holds the number of the channel being converted. It clears to 0 when the sequence ends.
Stop
Interrupt
request
State Channel 0 conversion
ANEN
Figure 6-5 Multiple Channel/Single Conversion Timing
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 145

A/D Conversion Timing
6.4.4 Single Channel/Continuous Conversion Timing When ANMD[1:0] = b’10’, the ADC converts one ADIN input signal contin- uously. An interrupt occurs each time the conversion ends. Load the number of the channel to be converted in the AN1CH[3:0] field of the ADC control register (ANCTR). (The ANNCH[3:0] field is ignored in this mode.)
When the software starts the conversion, write a 0 to the ANTC bit (disabling conversion start at timer 1 underflow), then write a 1 to ANEN. (If ANTC = 1, ANEN goes high upon a timer 1 underflow.) ANEN remains high during the con- version. To end the A/D conversion, write a 0 to ANEN.
Stop
Interrupt requests
State Channel n conversion
ANEN
Figure 6-6 Single Channel/Continuous Conversion Timing
6.4.5 Multiple Channel/Continuous Conversion Timing When ANMD[1:0] = b’11’, the ADC converts multiple, consecutive ADIN input signals continuously. An interrupt occurs each time the conversion sequence ends. Load 0s to the AN1CH[3:0] field of the ADC control register (ANCTR), then load the number of the final channel in the sequence to the ANNCH[3:0] field. The sequence always begins with channel 0.
When the software starts the conversion, write a 0 to the ANTC bit (disabling conversion start at timer 1 underflow), then write a 1 to ANEN. (If ANTC = 1, ANEN goes high upon a timer 1 underflow.) ANEN remains high during the con- version. To end the A/D conversion, write a 0 to ANEN. Note that the AN1CH[3:0] field holds the number of the channel being converted. It clears to 0 when the sequence ends.
Stop
Interrupt requests
Channel 0 conversion Channel 1 conversion
ANEN
Figure 6-7 Multiple Channel/Continuous Conversion Timing
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 146

6.5 ADC Setup Examples
6.5.1 Setting Up Software-Controlled Single-Channel A/D Conversion This example illustrates single-channel conversion controlled by the software. The ADIN6 pin inputs an analog voltage signal (0.0 V–3.3 V) and the ADC converts it to 8-bit digital values.
P11, ADIN6
Figure 6-8 Single-Channel A/D Conversion
I To set up the input port: Set the P1MD2 bit of the port 1 output mode register (P1MD) to 1. This sets the ADIN6 pin (P11) to analog input.
I To set up the ADC: 1. Set the operating conditions in the ADC control register (ANCTR). Select single-channel, single-conversion mode (ANMD[1:0] = b’00’), BOSC/8 as the clock source (ANCK[1:0] = b’10’), and channel 6 as the conversion channel (AN1CH[3:0] = b’011’). Set the conversion start/busy bit, ANEN, to 0.
AN NCH2
AN NCH1
AN NCH0
AN 1CH3 AN 1CH2 AN 1CH1 AN 1CH0 AN EN
AN CK0
AN MD1
AN MD0
Setting: 0 1 1 0 1 0 0 0
When the software controls the conversion start, it must set the ANEN flag to 1.
The ADC can also generate an interrupt when the conversion ends, once the data is stored in AN6BUF. In this case, the software does not need to wait for the ANEN flag before reading AN6BUF.

ADC Setup Examples
AN6BUF (example) x’00FF14’
— ANn BUF7
set
ANEN
ADIN6 converting
State
Reference
clock
1 2 3 4 10 11 12 VALID
AN6BUF
AN6BUF
read
Interrupt
Figure 6-9 Timing of Software-Controlled Single-Channel A/D Conversion
6.5.2 Setting Up Hardware-Controlled Intermittent Three-Channel A/D Conversion This example illustrates multiple-channel conversion controlled by the hardware. The ADIN2, ADIN1, and ADIN0 pins input analog voltage signals ( 0.0 V– 3.3 V) and the ADC converts the voltages to 8-bit digital values. It writes the results to the registers periodically, each time timer 1 underflows.
MN102H75K
A/D converter data registers
Timer 1
Figure 6-10 Multiple-Channel A/D Conversion
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 148

I To set up the input port: Set the P0DIR[5:3] bits of the port 0 I/O control register (P0DIR) to 0. This sets the ADIN2 (P05), ADIN1 (P04), and ADIN0 (P03) pins (P11) to general-purpose input.
I To set up the ADC: Set the operating conditions in the ADC control register (ANCTR). Select multiple-channel, single-conversion mode (ANMD[1:0] = b’01’) and BOSC/8 as the clock source (ANCK[1:0] = b’10’). Set the conversion start/busy bit, ANEN, to 0. Set ANTC to 1, enabling conversion start at timer 1 underflow. Set the AN1CH[3:0] field to the first channel (channel 0) and set the ANNCH[3:0] to the last channel (channel 2).
AN NCH2
AN NCH1
AN NCH0
AN 1CH3 AN 1CH2 AN 1CH1 AN 1CH0 AN EN
AN CK0
AN MD1
AN MD0
Setting: 0 0 1 0 1 0 0 1 0 0 1
I To set up the conversion cycle 1. Set the divide-by ratio for timer 1. To divide BOSC/4 by 256, write 255 (x’FF’) to the timer 1 base register (TM1BR). (The valid range for TM1BR is 1 to 255.)
TM1 BR6
TM1 BR5
TM1
TM1 BR3
TM1 BR2
TM1 BR1
TM1 BR0
BR4
Do not change the clock source once you have selected it. Selecting the clock source while you set up the count operation control will corrupt the value in the binary counter.
TM1
LD — — — — TM1
TM1
EN
S1
S0
When the binary counter (TM1BC) reaches 0, the microcontroller reloads the value in the base register (TM1BR) to TM1BC and simultaneously generates a timer 1 underflow interrupt. After each timer 1 underflow, the ADC converts each of the ADIN[2:0] inputs a single time.

ADC Control Registers
Channel 0 Channel 1 Channel 2 Channel 0 Channel 1 Channel 2 Conversion
Conversion
6.6 ADC Control Registers The ADC contains thirteen registers—one control register (ANCTR) and twelve data buffers (each associated with one of the ADIN pins). ANCTR controls the operating conditions, and the read-only data buffers hold the results of the A/D conversions.
Register Address R/W Description
ANCTR x’00FF00’ R/W ADC control register
AN0BUF x’00FF08’ R ADIN0 conversion data buffer
AN1BUF x’00FF0A’ R ADIN1 conversion data buffer
AN2BUF x’00FF0C’ R ADIN2 conversion data buffer
AN3BUF x’00FF0E’ R ADIN3 conversion data buffer
AN4BUF x’00FF10’ R ADIN4 conversion data buffer
AN5BUF x’00FF12’ R ADIN5 conversion data buffer
AN6BUF x’00FF14’ R ADIN6 conversion data buffer
AN7BUF x’00FF16’ R ADIN7 conversion data buffer
AN8BUF x’00FF18’ R ADIN8 conversion data buffer
AN9BUF x’00FF1A’ R ADIN9 conversion data buffer
AN10BUF x’00FF1C’ R ADIN10 conversion data buffer
AN11BUF x’00FF1C’ R ADIN11 conversion data buffer
— ANn BUF7
Reset: 0 —
R/W: R
These buffers hold the 8-bit A/D conversion data. Their value is unknown after reset.

ANCTR: ADC Control Register x’00FF00’
AN NCH2
AN NCH1
AN NCH0
AN 1CH3 AN 1CH2 AN 1CH1 AN 1CH0 AN EN
AN CK0
AN MD1
AN MD0
Reset: 0
R/W: R/W R R R/W
0000: Convert ADIN0 0111: Convert ADIN0–ADIN7 0001: Convert ADIN0–ADIN1 1000: Convert ADIN0–ADIN8 0010: Convert ADIN0–ADIN2 1001: Convert ADIN0–ADIN9 0011: Convert ADIN0–ADIN3 1010: Convert ADIN0–ADIN10 0100: Convert ADIN0–ADIN4 1011: Convert ADIN0–ADIN11 0101: Convert ADIN0–ADIN5 1100–1111: Reserved 0110: Convert ADIN0–ADIN6
0000: Convert ADIN0 0111: Convert ADIN7 0001: Convert ADIN1 1000: Convert ADIN8 0010: Convert ADIN2 1001: Convert ADIN9 0011: Convert ADIN3 1010: Convert ADIN10 0100: Convert ADIN4 1011: Convert ADIN11 0101: Convert ADIN5 1100–1111: Reserved 0110: Convert ADIN6
0: No conversion in progress 1: Conversion in progress
ANTC: Conversion start at timer 1 underflow
0: Disable 1: Enable
ANCTR5
Always set this bit to 0.
00: Reserved 01: Reserved 10: B OSC /8 11: B OSC /16
ANMD[1:0]: Operating mode select

6.7 Cautions about Analog-to-Digital Converter The type of this Analog-to-Digital Converter is a sample-hold one, and so the current temporarily flows in conversion to charge the condenser of the sample- hold circuit. For this reasons, the following settings are needed to get the accurancy of convension:
micro computer analog signal output
R << 8k Ω or C ≥ 2000pF
Figure 6-12 Cautions on Analog-to-Digital Converter
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 152

7 On-Screen Display
7.1 Description The MN102H75K/85K contains an on-screen display (OSD) function composed of three layers: a text layer, a graphics layer, and a cursor layer. You can control each layer individually, which gives you great freedom in positioning displays. You can also modify the ROM space that contains the text characters and the graphic tiles and the VRAM space that contains the text and graphics programs. This allows you to adjust the memory space to fit your application.
If you use the OSD function, the DMA function executes for both the text and graphics layers, even if your program does not use one of these layers. To pre- vent error, program data for the unused layer to meet the restric- tions outlined here.
Function/Feature Text Layer Graphics Layer Characters or tiles per line (1) 38 characters per line (2) 18 or 28 tiles per line (3)
RAM usage 80 bytes per line Line-by-line basis Maximum 64 lines
40 or 64 bytes per line Line-by-line basis Maximum 64 lines ROM usage 36 bytes per character 16 colors: 128 bytes per tile (4)
8 colors: 96 bytes per tile 4 colors: 64 bytes per tile 2 colors: 32 bytes per tile Max. characters or tiles 1024 characters 512 tiles (in all color modes) Resolution 16 (wide) x 18 (high) pixels In closed-caption mode: 16 (W) x 26 (H) (underlining is in the hardware)
16 (W) x 16 (H) pixels, or 16 (W) x 18 (H) pixels
Color depth One 16-color palette out of 4096 colors Two 16-color palettes out of 4096 colors (Total 32 colors in one display) Display start position (5) H: 1 dot resolution, 1024 steps V: 1 H scan line resolution, 1024 steps
H: 1 dot resolution, 1024 steps V: 1 H scan line resolution, 1024 steps Character or tile size (5) 16 character sizes, line-by-line basis H: 1x, 2x, 3x, 4x V: 1x, 2x, 4x, 6x
Cursor layer Selects one tile from the graphic tile area (16 x 16) Display position: H: 1 dot resolution, 1024 steps V: 1 H scan line resolution, 1024 steps Notes: 1. Maximum 60 characters + tiles in one line (when using a 64-byte graphics line). For example, (1) If a graphics line contains 28 tiles, then the corresponding line in the text layer can only contain 32 characters. (2) If a text line contains 38 characters, then the corresponding line in the graphics layer can only contain 22 tiles. 2. Maximum 38 characters per line (60 characters + tiles) with the default text colors. Each color assignment, including outlining and blinking, decreases this total by one. 3. The maximum number of tiles per line is programmable in the GEXTE bit of the OSD2 register. 18 tiles requires 40 bytes per line, and 28 tiles requires 64 bytes per line. The setting applies to all lines. 4. Multiple modes cannot be used simultaneously—the color mode applies to the entire display. 5. The OSD dot clock frequency controls the horizontal position and size. For details, see section 7.9.4, “Setting Up the OSD Dis- play Position,” on page 180, and section 7.11, “Selecting the OSD Dot Clock,” on page 186. 6. This function can be used for a wallpapering effect or to insert spaces. One tile code can be repeated up to 16 times. Repeating tiles allows you to use more than 18 (or 28) tiles per line. 7. For the OSD block to operate correctly, always set bit 7of the PCNT2 register (x’00FF92’) to 0.

Block Diagram
7.3 Block Diagram

Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 154

7.4 Power-Saving Considerations in the OSD Block Table 7-2 shows bits that can decrease the power consumption of the OSD block. This section explains how to use these bits.
Bit Name Register Address Bit Description Reset
OSDPOFF resets to 0. To operate the OSD, you must first set this bit to 1.
Using OSDPOFF to control the system clock supply to the OSD The OSDPOFF bit enables or disables the system clock supply to the OSD block. When the OSD is unused, setting this bit to 0 stops the clock supply to the OSD, reducing power dissipation. Setting OSDPOFF to 0 not only disables the OSD display, it disables reads from and writes to the OSD registers. To operate the OSD, set this bit to 1, then set up the OSD registers.
To turn off the OSD block to save power: 1. Write a 0 to OSD (OSD1, bit 10). 2. Wait for the next VSYNC input. 3. Write a 0 to OSDPOFF (PCNT0, bit 7), turning the clock off. If you turn the clock off before the VSYNC input, power usage may not drop or the microcontroller may halt.
Using OSDREGE to control read/write access to the OSD registers The OSDREGE bit enables or disables read/write operations to the OSD reg- isters. Once you have set the OSD registers, you can write a 0 to this bit to disable furthers reads and writes to them, reducing power dissipation. This bit resets to 0.
OSDPOFF OSDREGE OSD Register R/W Power Dissipation
0 Don’t care Off Disabled
1 0 On Disabled
1 1 On Enabled
Less · Greater

OSD Operation
7.5 OSD Operation This section describes the basic operation of the OSD block. The remainder of section 7 provides more detailed specifications.
7.5.1 OSD Clock The OSD clock source is programmable to either the microcontroller system clock (OSC1, OSC2 pins) or a dedicated OSD clock (OSDXI, OSDXO pins).
I OSC clock source See section 7.11, “Selecting the OSD Dot Clock,” on page 186, for information on setting the OSD clock frequency.
An internal phase-locked loop (PLL) multiplies the external 4-MHz frequency to generate an OSD clock that is synchronized to the trailing edge of the horizontal sync signal (HSYNC). This dramatically reduces EMI and character distortion. The output frequency is programmable to 12, 16, 24, 32 or 48 MHz.
I OSDX clock source An LC blocking oscillator allows HSYNC to serve as the clock source. You can also input an external clock through the OSDXI pin and synchronize it internally. (Frequency range: 12–48 MHz)
7.5.2 External Input Sync Signals Input the horizontal sync signal through the HSYNC pin and the vertical sync signal through the VSYNC pin. The pullup resistors and polarity are pro- grammable. An interrupt must occur so that the microcontroller can detect each VSYNC start field. Set the interrupt edge in the IQ1TG[1:0] bits of the EXTMD registers and the OSD input polarity in the VPOL bit of the OSD1 register. Note that you must these parameters separately.
7.5.3 Multi-Layer Format Multi-layer technology enables the microcontroller to display text, graphics, and hardware cursor as different display layers with different color depths. You can stack the layers in any order. When the layers contain overlapping images, the cursor always takes highest priority. The priority of the text and graphics layers is programmable in the registers.
Each character in the text layer contains a foreground (character) color and a background color. Outlining and shadowing are separate options. In closed- caption mode, the OSD can only display the text in the encoded captions. The graphics and cursor layers can be displayed in this mode, but note that if any tiles from either layer overlaps italicized text, the pixels in the graphic will be dis- placed, distorting the image.
Do not layer any graphic or cur- sor tiles over italicized charac- ters in closed-caption mode.

I Graphics layer The graphics layer contains tiled images. In the 16-color mode, each 4-bit dot on a tile can display one of 16 colors. Each tile can use either of two available color palettes, allowing a total of 32 colors in one display. The graphics layer also supports 2-, 4-, and 8-color modes. All the tiles in a single display screen must be in the same color mode. (For instance, an 8-color-mode tile cannot be displayed at the same time as a 16-color-mode tile.) The size of one tile is 16W x 16H pixels in standard mode and 16W x 18H pixels in extended mode.
I Cursor layer The cursor layer displays an icon indicating the position of the next entry. One display screen displays only one cursor (tile). The ROM data and color palettes for the tile are the same as those of the graphics layer. The size of one tile is 16W x 16H pixels in standard mode and 32W x 32H pixels in extended mode.
7.5.4 Output Pin Setup To set up the output pins, enable the OSD output pins in the I/O registers. Select DAC or digital output for RGB and YM. Set the YS polarity.
When you are not using the DAC, set the COMP and IREF pins for the DAC to H.
7.5.5 Microcontroller Interface The microcontroller writes display data to be sent to the OSD control registers and the VRAM, which is assigned to internal RAM space. The control registers (CRAMEND and GRAMEND) hold the end address of the data in the VRAM.
Display data stored in the VRAM transfers automatically (through) a DMA transfer) from the internal RAM to the OSD as the display approaches its specified position. The microcontroller is suspended while the data is transferred on the bus. See section 7.10, “DMA and Interrupt Timing,” on page 185, for more information on this timing.
After a reset clears, the system clock supply to the OSD stops. To operate the OSD, you must first set the OSDPOFF bit of PCNT0 (x’00FF90’)to 1.
The two MSBs of the transferred data contain one or more of the following ID codes:
I Text layer 1. Character code CC 2. Color control code (normal mode) COL 3. Color control code (closed-caption mode) COL 4. Repeat character/blank code CCB 5. Character horizontal position code CHP 6. Character vertical position code CVP
I Graphics layer 1. Graphic tile code GTC 2. Graphics horizontal position code GHP 3. Graphics vertical position code GVP

OSD Operation
7.5.7 Conditions for VRAM Writes I Text layer
Set CHP, CVP, GHP, and GVP for every line in the VRAM. If you do not, a software processing error may occur.
I Graphics layer 1. Place each line’s horizontal and vertical position data (GHP and GVP), in that order, at the end of the preceding line. Do not place GHP and GVP at the start of a line.

7.6 Standard and Extended Display Modes Two modes are available for the graphics and cursor layers, standard and extended. In extended mode, the cursor layer can display four grouped graphic tiles rather than one. The graphics layer can display tiles that are two pixels taller than those used in standard mode, giving the graphic tiles the same dimensions as the characters in the text layer.
7.6.1 Cursor Layer Display Modes The size of the cursor in the cursor layer is programmable to 16W x 16H pixels in standard mode and 32W x 32H pixels in extended mode. Select the mode for this layer in the SPEXT bit of the OSD2 register (x’007F08’).
To create a graphic for the cursor layer in extended mode, combine four 16 x 16 tiles. They are ordered as follows: (1) upper left, (2) upper right, (3) lower left, and (4) lower right. Set the pointers to these tiles in cursor tile code registers 0 to 3 (STC0–3), where STC0 corresponds to tile (1). Table 7-4 shows the associated tiles and registers.
Display start position set in SHP and SVP 16 pixels
Display start position set in SHP and SVP
Figure 7-2 Cursor Tiles in Standard and Extended Modes
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 159

Table 7-4 Associated Tiles for Cursor Tile Code Registers
Graphic Tile Register Register Address
(1) Upper left STC0 x’007F10’
(2) Upper right STC1 x’007F2A’
(3) Lower left STC2 x’007F2C’
(4) Lower right STC3 x’007F2E’
In standard mode, STC0 is the only cursor tile code register that is enabled. Use the cursor horizontal position register (SHP, x’00F12’) and the cursor vertical position register (SVP, x’007F14’) in both modes to program the display start position. In extended mode, this position refers to the upper left corner of tile (1). Set the color palette for each tile individually.
7.6.2 Graphics Layer Display Modes The size of the tiles in the graphics layer is programmable to 16W x 16H pixels in standard mode and 16W x 18H pixels in extended mode. Select the mode for this layer in the GTHT bit of the OSD2 register (x’007F08’).
In extended mode, the tiles are the same size as the characters in the text layer. This allows for a cleaner display when text and graphics appear side by side.
You cannot use the tiles created for graphics layer extended mode as cursor tiles.
Display start position set in GHP and GVP 16 pixels
Display start position set in GHP and GVP
Figure 7-3 Graphic Tiles in Standard and Extended Modes
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 160
16 pixels · 16 pixels · 18 pixels

7.7 Display Setup Examples
7.7.1 Setting Up the Graphics Layer This section shows how to set up the graphics display data in the VRAM.
GIHP (x’007F16’) = x’0822’ (GIHP = x’22’, GIHSZ = x’1’)
GIVP (x’007F18’) = x’1803’ (GIVP = x’03’, GIVSZ = x’3’)
OSD2 (x’007F08’) = x’0047’ (1 line maximum = 18 tiles, 16-color mode, graphics take priority)
Line No. RAM Addr. RAM Data Data Type Description
1 980E 980C 980A 9808 9806 9804 ...
GTC GTC GTC GTC GHP GVP
Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’000’ Graphic tile, GCB = x’0’, GPRT = 1, GTC = x’055’ Blank tile, GCB = x’0’, GPRT = 1, GTC = x’0AA’ Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’100’ GHSZ = x’0’, GSHT = 0, GHP = x’04’ GLAST = 0, GVSZ = x’0’, GINT = 0, GVP = x’40’
2 97E6 97E4 97E2 97E0 97DE 97DC 97DA 97D8 97D6 ...
4010 4011 4012 4C13 4214 0815 4216 D810 C858
GTC GHP GVP
Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’010’ Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’011’ Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’012’ Graphic tile, GCB = x’3’, GPRT = 0, GTC = x’013’ Graphic tile, GCB = x’0’, GPRT = 1, GTC = x’014’ Blank tile, GCB = x’2’, GPRT = 0, GTC = x’015’ Graphic tile, GCB = x’0’, GPRT = 1, GTC = x’016’ GHSZ = x’3’, GSHT = 0, GHP = x’10’ GLAST = 0, GVSZ = x’1’, GINT = 0, GVP = x’58’
3 97BE 97BC 97BA 97B8 ...
GTC GTC GHP GVP
Graphic tile, GCB = x’0’, GPRT = 0, GTC = x’181’ Graphic tile, GCB = x’0’, GPRT = 1, GTC = x’182’ GHSZ = x’0’, GSHT = 0, GHP = x’44’ GLAST = 1, GVSZ = x’0’, GINT = 0, GVP = x’20’

Palette 2 Blank GTC = x'100'
HSZ = 0 (1x)
014 Palette 2 Blank Blank Blank 016 Palette 2
HSZ = 3 (4x)
Figure 7-4 Graphics Display Example
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 162

7.7.2 Setting Up the Text Layer This section shows how to set up the text display data in the VRAM.
CIHP (x’007F1A’) = x’1020’ (CIHP = x’20’, CIHSZ = x’2’)
CIVP (x’007F1C’) = x’1803’ (CIVP = x’03’, CIVSZ = x’3’)
OSD3 (x’007F0A’) = x’0000’ (CAPM = x’0’)
Table 7-6 Example Text VRAM Settings
Line No. RAM Addr. RAM Data Data Type Description
1 9FFE 9FFC 9FFA 9FF8 9FF6 9FF4 ...
CC COL
Character code = x’000’ BSHAD = 0, CSHAD = 0, FRAME = 1, BCOL = x’5’, CCOL = x’A’ Character code = x’001’ Character code = x’002’ CHSZ = x’0’, CSHT = 0, CHP = x’04’ CLAST = 0, CVSZ = x’1’, CINT = 0, CVP = x’40’
2 9FAE 9FAC 9FAA 9FA8 9FA6 9FA4 9FA2 9FA0 9F9E 9F9C ...
9469 0006 0007 4012 9A78 0008 4002 0010 D810 C870
BSHAD = 2, CSHAD = 1, FRAME = 0, BCOL = x’6’, CCOL = x’9’ Character code = x’006’ Character code = x’007’ Repeat character code, CCB = x’2’ BSHAD = 3, CSHAD = 0, FRAME = 1, BCOL = x’7’, CCOL = x’8’ Character code = x’008’ Blank, CCB = x’2’ Character code = x’010’ CHSZ = x’3’, CSHT = 0, CHP = x’10’ CLAST = 0, CVSZ = x’1’, CINT = 0, CVP = x’70’
CC CCB
CC CHP CVP
3 9F5E 9F5C 9F5A 9F58 ...
CC CC CHP CVP
Character code = x’300’ Character code = x’310’ CHSZ = x’0’, CSHT = 0, CHP = x’44’ CLAST = 1, CVSZ = x’0’, CINT = 0, CVP = x’30’

The text display starts one dot to the right of the HP setting.
HSZ = 2 (3x)
CC = x'000' No shadow No outline Background col. = 2 Text color = 1
CC = x'001' No shadow Outline Background col. = 5 Text color = A
CC = x'002' No shadow Outline Background col. = 5 Text color = A
CC=006
CC=007
CC=007
CC=007
CC=007
CC=007
CC=008
CC=010
Box shad.1 Char. shad Back col. 6 Text col. 9
Box shad.1 Char. shad Back col. 6 Text col. 9
Box shad.1 Char. shad Back col. 6 Text col. 9
Same as left.
Same as left.
Same as left.
Box shad.2 Outline Back col. 7 Text col. 8
Box shad.2 Outline Back col. 7 Text col. 8
Blank
HSZ = 3 (4x)
CC = x'300' No shadow, no outline Background col. = 2 Text color = 1
CC = x'310' No shadow, no outline Background col. = 2 Text color = 1
Figure 7-5 Text Display Example
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 164

7.8 VRAM
7.8.1 VRAM Operation
Table 7-7 VRAM Bit Allocation in Internal RAM
Text layer 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 * CCH9 CCH8 CCH7 CCH6 CCH5 CCH4 CCH3 CCH2 CCH1 CCH0
ID code Character address (1024 characters)
COL (normal mode) Color control code
1 0 * BSHAD1 BSHAD0 CSHAD FRAME BLINK BCOL3 BCOL2 BCOL1 BCOL0 CCOL3 CCOL2 CCOL1 CCOL0
ID code Box shadow Char. shadow Outline Blink Background color (16 colors) Character color (16 colors)
COL (closed-caption mode) Color control code
1 0 * * CUNDL ITALIC FRAME BLINK BCOL3 BCOL2 BCOL1 BCOL0 CCOL3 CCOL2 CCOL1 CCOL0
ID code Underline Italics Outline Blink Background color (16 colors) Character color (16 colors)
CCB Repeat character/blank code
0 1 * CCBF CCB3 CCB2 CCB1 CCB0
char. Number of blank/char. repetitions
CHP Character H position control
1 1 * CHSZ1 CHSZ0 CSHT CHP9 CHP8 CHP7 CHP6 CHP5 CHP4 CHP3 CHP2 CHP1 CHP0
ID code H size Shutter H display start position (1 dot resolution, 1024 steps)
CVP Character V position control
1 1 CLAST CVSZ1 CVSZ0 CINT CVP9 CVP8 CVP7 CVP6 CVP5 CVP4 CVP3 CVP2 CVP1 CVP0
ID code Last line
flag V size Interrupt V display start position (1 H scan line resolution, 1024 steps)
Graphics layer 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GTC Graphic tile code
0 GCBF GCB3 GCB2 GCB1 GCB0 GPRT GTC8 GTC7 GTC6 GTC5 GTC4 GTC3 GTC2 GTC1 GTC0
tile Number of blank/tile repetitions Palette
select Graphic tile address (512 tiles)
GHP Graphics H position control
1 1 * GHSZ1 GHSZ0 GSHT GHP9 GHP8 GHP7 GHP6 GHP5 GHP4 GHP3 GHP2 GHP1 GHP0
ID code H size Shutter H display start position (1 dot resolution, 1024 steps)
GVP Graphics V position control
1 1 GLAST GVSZ1 GVSZ0 GINT GVP9 GVP8 GVP7 GVP6 GVP5 GVP4 GVP3 GVP2 GVP1 GVP0
ID code Last line
flag V size Interrupt V display start position (1 H scan line resolution, 1024 steps)
CCH[9:0]
Specifies the address of one of 1024 characters stored in the ROM.
BSHAD[1:0]
Specifies shadowing of the character box for a 3D button effect.
Specifies character shadowing for a 3D effect.
FRAME
Specifies character outlining (black).
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 165

VRAM
BLINK
Specifies character blinking.
BCOL[3:0]
Specifies the background color (1 of 16 colors).
Specifies the foreground (character) color (1 of 16 colors).
CUNDL
Specifies underlining.
ITALIC
Specifies italicization.
FRAME
Specifies character outlining (black).
BLINK
Specifies character blinking.
BCOL[3:0]
Specifies the background color (1 of 16 colors).
Specifies the foreground (character) color (1 of 16 colors).
CCBF
Repeat blank/repeat character select.
CCB[3:0]
Specifies the number of times (up to 16) a blank space or character is repeated. This function saves RAM space by preventing the VRAM address from incrementing. The program redisplays the preceding charac- ter code the specified number of times. This increases the limit beyond 38 characters per line.

CHP: Character Horizontal Position Control Code ID Code: 11
CHSZ[1:0]
Specifies the H size of the characters on the next line.
Specifies shutter operation for the next line. Setting this bit to 1 disables the shuttering function. You can disable and enable shuttering on a line-by- line basis.
CHP[9:0]
Specifies a VCLK indicating the horizontal start position for the next line. 1024 steps are available.
CLAST
Specifies the last line in the internal RAM text layer. This resets the line pointer for character reads from the internal RAM to the first line.
CVSZ[1:0]
Specifies the V size of the characters on the next line.
In closed-caption mode, only the b’00’, b’01’, and b’11’ settings are available for CVSZ[1:0]. The b’10’ setting is reserved.
Specifies an OSD interrupt.
CVP[9:0]
Specifies an H scan line indicating the vertical start position for the next line. 1024 steps are available.
GCBF
Repeat blank/repeat tile select.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 167

VRAM
GCB[3:0]
Specifies the number of times (up to 16) a blank or graphic tile is repeated.
Specifies graphics color palette 1 or 2.
GTC[8:0]
Specifies the address of one of 512 graphic tiles stored in the ROM.
GHSZ[1:0]
Specifies the H size of the characters on the next line.
Specifies shutter operation for the next line. Setting this bit to 1 disables the shuttering function. You can disable and enable shuttering on a line-by- line basis.
GHP[9:0]
Specifies a VCLK indicating the horizontal start position for the next line. 1024 steps are available.
GLAST
Specifies the last line in the internal RAM graphics layer. This resets the line pointer for graphic tile reads from the internal RAM to the first line.
GVSZ[1:0]
Specifies the V size of the tiles on the next line.
Specifies an OSD interrupt.
GVP[9:0]
Specifies an H scan line indicating the vertical start position for the next line. 1024 steps are available.

7.8.2 VRAM Organization
Graphics RAM Addresses (When GEXTE = 1)
GRAMEND − 40 × (N − 1)
GRAMEND−3F GRAMEND−3E GRAMEND−3D GRAMEND−3C GRAMEND−3B GRAMEND−3A GRAMEND−2F GRAMEND−2E
Data
GRAMEND−40×n+5
GRAMEND−40×(n−1)
GRAMEND − 40 × N + 5
GRAMEND − 40 GRAMEND − 3B
GRAMEND−3 GRAMEND−2 GRAMEND−1
Low-order 8 bits of graphics code High-order 8 bits of graphics code
Line 1 data 64 bytes
Code 1 2 bytes
GRAMEND
VRAM
GRAMEND
CRAMEND − 50 × M + 1
Text RAM Addresses
CRAMEND − 50 × M + 1
Text VRAM
CRAMEND − 50 × (M − 1)
CRAMEND−50×m+1
CRAMEND−4F CRAMEND−4E CRAMEND−4D CRAMEND−4C CRAMEND−4B CRAMEND−4A
CRAMEND−50×(m−1)
CRAMEND − 50 CRAMEND − 4F
CRAMEND−3 CRAMEND−2 CRAMEND−1
Line 1 data 80 bytes
of text code High-order 8 bits
Code 1 2 bytes
CRAMEND
Notes: 1. All addresses are expressed in hex notation. Other values are decimal. 2. GRAMEND: Graphics RAM end address (programmable to any address) 3. CRAMEND: Text RAM end address (programmable to any address) 4. M: Number of lines in the text layer 5. m: 1 and up 6. N: Number of lines in the graphics layer 7. n: 1 and up
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 169

VRAM
GRAMEND − 40 × (N − 1)
GRAMEND−3F GRAMEND−3E GRAMEND−3D GRAMEND−3C GRAMEND−3B GRAMEND−3A GRAMEND−2F GRAMEND−2E
GRAMEND−40×n+5
GRAMEND−40×(n−1)
GRAMEND − 40 GRAMEND − 3B
GRAMEND−3 GRAMEND−2 GRAMEND−1
Low-order 8 bits of graphics code High-order 8 bits of graphics code
Line 1 data 64 bytes
Code 1 2 bytes
GRAMEND
A. GEXTE = 1
GRAMEND − 28 × N + 1
GRAMEND − 28 × (N − 1)
GRAMEND−27 GRAMEND−26 GRAMEND−25 GRAMEND−24 GRAMEND−23 GRAMEND−22
GRAMEND−28×n+1
GRAMEND−28×(n−1)
GRAMEND−5 GRAMEND−4 GRAMEND−3 GRAMEND−2 GRAMEND−1
Low-order 8 bits of graphics code High-order 8 bits of graphics code
Line 1 data 40 bytes
Code 1 2 bytes
GRAMEND
B. GEXTE = 0
Figure 7-7 Graphics VRAM Organization for Two Modes
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 170

7.8.3 Cautions about the number of display code set to VRAM When the display lines are adjoined or overlapped, and the number of the above display code is extremely fewer than that of the below one, first line of the display line may not be output correctly.
In OSD circuit, font data to display are read from ROM and stored to the buffer. The data in the buffer are overwritten, after the present display code is output, to the display data of the next line.
Show the example when the display lines are adjoined. The number of the display code in the above line (line M) is reffered to n, and that of the below one (line M+1) is refferred N.
The buffer holds n display data of the last line of line M at the time of A (see figure below), and the data in the buffer are overwritten to the display data of the first line of line M+1 as time goes by. At the time of B the buffer holds n display data of the first line of line M+1.
In case n is smaller than N, N-n display data are needed to display the first line of line M+1, and to be written to the buffer before it is shown on the display.
Especially when n is extremely smaller than N, a large amount of the display data is needed to be written to the buffer before display. And in case writing is not done in time, it shows wrong data on the screen.

To prevent the wrong display written above, the first line of the below line is to be shown later enough after the last line of the above line is displayed.
The time (Td) needed for the correct display is caluculated as below.
n : the number of display code in the above line. (include HP, VP) N: the number of display code in the below line. (include HP, VP) n

ROM
7.9 ROM
7.9.1 ROM Organization

CROMEND−24×(M+1)+1
CROMEND−24×(m+1)+1
CROMEND−24×(M+1)+1
GROMEND−80×(N+1)+1
GROMEND−80×(N+1)+1
GROMEND−80×(n+1)+1
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 172

7.9.2 Graphics ROM Organization in Different Color Modes The graphics layer supports up to sixteen colors, in the 16-color mode, but also supports 2-, 4-, and 8-color modes. The smaller the number of colors, the less ROM area required per tile. The figures in this section illustrate the ROM organi- zation for each color mode.
The example in figure 7-10 demonstrates the graphics ROM setup for line 16 of the code 00 data when the graphics layer is in 16-color mode. The four bits of data for each pixel, in sheets 1, 2, 3, and 4, determine the color palette used for that pixel.
Line 1 Line 2 Line 3
1 dot = 4 bits = 16 colors
In this example, line 16 of the code 00 graphics tile is set in 16-color mode.
Bit 15 Bit 0
1010 1010
Sheet 1 bits 7 to 0
Sheet 1 bits 15 to 8
1100 1100
Sheet 2 bits 7 to 0
Sheet 2 bits 15 to 8
Sheet 3 bits 7 to 0
0000 0000
GROMEND − 2
Sheet 3 bits 15 to 8
Sheet 4 bits 7 to 0
Line 16 data 8 bytes
Sheet 4 bits 15 to 8 1 byte
Use graphics palette 0 Use graphics palette 1 Use graphics palette 2 Use graphics palette 3 Use graphics palette 4 Use graphics palette 5 Use graphics palette 6 Use graphics palette 7
Line 1 Line 2 Line 3
Bit 0 Bit 15
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 173

ROM
Graphic Tile Codes
2 colors
4 colors
8 colors
16 colors
N × 4 − 1
N × 4/3 − 1
N − 1
N is a multiple of 3.
ROMEND − 180
0B
ROMEND − 160
0A
ROMEND − 140
ROMEND − 120
ROMEND − 100
ROMEND − E0
ROMEND − C0
ROMEND − A0
ROMEND − 80
ROMEND − 60
ROMEND − 40
ROMEND − 20
ROMEND
32 bytes
64 bytes
96 bytes
128 bytes
See fig.7-15
See fig.7-14
See fig.7-13
See fig.7-12
Figure 7-11 Graphics ROM in the Four Color Modes (16W x 16H Tiles)
128 bytes · Required bytes · per tile

Graphic Tile Codes
2 colors
4 colors
8 colors
16 colors
N × 4 − 1
N × 4/3 − 1
N − 1
N is a multiple of 3.
ROMEND − 1B0
0B
ROMEND − 18C
0A
ROMEND − 168
ROMEND − 144
ROMEND − 120
ROMEND − FC
ROMEND − D8
ROMEND − B4
ROMEND − 90
ROMEND − 6C
ROMEND − 48
ROMEND − 24
ROMEND
36 bytes
72 bytes
108 bytes
144 bytes
See fig.7-19
See fig.7-18
See fig.7-17
See fig.7-16
Figure 7-12 Graphics ROM in the Four Color Modes (16W x 18H Tiles)
144 bytes · Required bytes · per tile

ROM




Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 176





MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 177

Setting Up the OSD
7.10 Setting Up the OSD
7.10.1 Setting Up the OSD Display Colors This section describes how to set up the display colors for the OSD.
I To set up the color palettes: Write your settings to the color palette registers shown in table 7-8.
Layer Palette Address Applications
Text foreground and background colors
All layers COLB x’007FA0’ Color background
Text FRAME x’007FA2’ Outlining and character shadowing colors
BBSHD x’007FA4’ Box shadowing color (black)
WBSHD x’007FA6’ Box shadowing color (white)
Tile color palette 1
GPT20–
Tile color palette 2
I To set up the cursor display colors: Write to the fields described below.
o GCOL[1:0] (x’007F08’, bits 9 and 8) sets the number of colors (2, 4, 8, or 16).
o STC[8:0] (x’007F10’, bits 8 to 0) specifies the code of the tile to be displayed.
o SPRT (x’007F10’, bit 9) selects tile color palette 1 or 2.
o GPT1n (x’007FC0’–x’007FDE) or GPT2n (x’007FE0’–x’007FFE) speci- fies the colors on the palettes corresponding to the tile data stored in the ROM.
I To set up the graphics display colors: Write to the fields described below.
o GCOL[1:0] (x’007F08’, bits 9 and 8) sets the number of colors (2, 4, 8, or 16).
o GTC[8:0] (GTC bits 8 to 0 in the RAM data) specifies the code of the tile to be displayed.
o GPRT (GTC bit 9 in the RAM data) selects tile color palette 1 or 2.
o GPT1n (x’007FC0’–x’007FDE) or GPT2n (x’007FE0’–x’007FFE) speci- fies the colors on the palettes corresponding to the tile data stored in the ROM.

I To set up the text display colors: Write to the fields described below.
o CCOL[3:0] (COL bits 3 to 0 in the RAM data) sets the color of the charac- ter. This value is in reference to the selected color palette (CPT0–CPTF).
o BCOL[3:0] (COL bits 7 to 4 in the RAM data) sets the background color. As with CCOL, this value is in reference to the selected color palette (CPT0–CPTF).
o FRAME (COL bit 9 in the RAM data) enables character outlining when set to 1. Set the outline color in the FRAME color palette (x’007FA2’).
o CSHAD (COL bit 10 in the RAM data) enables character shadowing when set to 1. Set the shadowing color in the FRAME color palette (x’007FA2’). This function is unavailable in the closed-caption mode.
o BSHAD[1:0] (COL bits 12 to 11 in the RAM data) enables character box shadowing. This function is unavailable in the closed-caption mode.
00 and 01: No box shadowing 10: Upper left white and lower right black shadows 11: Upper left black and lower right white shadows
o CPT0–CPTF (x’007F80’–x’007F9E’) specifies the colors available for text foreground and background colors.
o FRAME (x’007FA2’) specifies the color for outlining or character shadowing.
o BBSHD (x’007FA4’) specifies the “black” color for box shadowing.
o WBSHD (x’007FA6’) specifies the “white” color for box shadowing.
I To set up functions applying to all layers: Write to the fields described below.
Color background function The color background function allows you to fill the television screen areas that are uncovered by the OSD display (text, graphics, or cursor layers) with any color. Specify the color in the COLB register (x’007FA0’).
o COLB (x’007F08’, bit 7) enables the color background function when set to 1.
o COLB (x’007FA0’) specifies the color of the background.
Transparency The TRPT bit allows you to make the color 0 transparent in all the palettes (CPT0, GPT10, and GPT20). RGB, YM, and YS are all output at 0 levels for that color. See figure 7-21.
o TRPT (x’007F08’, bit 10) 0: Make color 0 on all palettes transparent 1: Output color 0 as specified

Setting Up the OSD
Translucency
The TRPTF bit allows you to make the color 15 translucent in all the palettes (CPTF, GPT1F, and GPT2F). RGB and YS are output at low levels for that color, and YM is output at the level specified for the palette. This dims the color on the display. See figure 7-21.
Selecting YS palette output, by setting the YSPLT bit of OSD1 (x’007F06’) to 1, disables the PRYM bit. With this setting, you must also set the TRPT and TRPTF bits to 1. You can specify transparency for individual color palettes if needed.
o TRPTF (x’007F08’, bit 10) 0: Make color 15 on all palettes translucent 1: Output color 15 as specified
The PRYM bit allows you to make specific regions of the OSD display trans- lucent. This bit is disabled when the YSPLT bit is 1.
o PRYM (x’007F08’, bit 12) 0: Output YS high on all OSD display areas 1: Output YS low on OSD display areas that do not have low YM output
YS palette output The YSPLT bit allows you to control the YS output. See figure 7-22.
o YSPLT (x’007F06’, bit 3) 0: Output YS to entire display area (except transparent and translucent areas) 1: Output the MSB (bit 15) of all the color palettes from YS
Analog/digital output The YCNT and RGBC bits allow you to select 16-bit gradient, analog or digital output through the four OSD output pins, R, G, B, and YM.
o YCNT (x’007F06’, bit 1) 0: Analog YM output 1: Digital YM output (outputs bit 12 of color palette)
o RGBC (x’007F06’, bit 0) 0: Analog R, G, B output 1: Digital R, G, B output (outputs bits 0 (R), 4 (G), and 8 (B) of color palette)
Table 7-9 summarizes the controls for RGM, YM, and YS output.

Table 7-9 RGB, YM, and YS Output Control Settings
0 Color palettes 0 and F
Color palettes 0 and F
Color palettes 0 and F
0 0 0 1 Color palette 0 output low Color palette 0 output low Color palette 0 output low
0 0 1 0 Color palette F output low Color palette F output low Color palette F output low
0 1 0 0 Color palettes 0 and F
Color palettes 0 and F
0 1 0 1 Color palette 0 output low Color palette 0 output low Color palettes 0 output low
0 1 1 0 Color palette F output low Color palette F output low Color palettes F output low
0 1 1 1 — — Output low when YM ≠ low
1 0 0 0 Reserved — —
1 0 0 1 Reserved — —
1 0 1 0 Reserved — YM3 output
1 1 0 0 Reserved — —
1 1 0 1 Reserved — —
1 1 1 0 Reserved — —
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 181

Setting Up the OSD
Color palette 0 (YM3 = 0, YM2 = 0, YM1 = 0, YM0 = 1) Color palette 2 (YM3 = 0, YM2 = 0, YM1 = 0, YM0 = 0)
Color palette 1 (YM3 = 1, YM2 = 0, YM1 = 0, YM0 = 1)
RGB, YM, and YS signals are displayed at this line.
Color palette F (YM3 = 1, YM2 = 0, YM1 = 0, YM0 = 1)
Signal specified in color palette 0 is output.
2 F 0 1 1 0
RGB
RGB
YM
2 F 0 1 1 0
YM
2 F 0 1 1 0
YS
YS
RGB
RGB
YM
YM
YS
YS
RGB
RGB
YM
YM
YS
YS
RGB
RGB
YM
YM
YS
YS
RGB
YM
YS
Figure 7-21 OSD Signal Waveform
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 182

*** YM2
*** YM1
*** YM0
*** B3
*** B2
*** B1
*** B0
*** G3
*** G2
*** G1
*** G0
*** R3
*** R2
*** R1
*** R0
R G B YM
Internal DAC
R G B YM
RGBCNT (x'007F06', bit 1)
Output YS to entire OSD display area (except transparent and semitransparent areas).
RGB CNT
YSPLT (x'007F06', bit 3)
YCNT (x'007F06' bit 0)
R G B YM YS
Figure 7-22 OSD Signal Output Switches
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 183
Color palette · Digital input · Analog output

Setting Up the OSD
7.10.2 Text Layer Functions This section describes the character enhancement functions available in the text layer.
I Outlining In both normal and closed-caption modes, writing a 1 to bit 9 (FRAME) of the COL setting in the VRAM causes an outline to appear around all characters fol- lowing that COL. You can specify the color of the outline in the FRAME register (x’007FA2’). Figure 7-23 shows an example of character outlining. As shown in the figure, if a character contains dots in the left or right borders of its field, the outlining for those dots appear in the adjacent character field.

I Character shadowing In normal mode, writing a 1 to bit 10 (CSHAD) of the COL setting in the VRAM causes a drop shadow to appear behind all characters following that COL. You can specify the color of the shadow in the FRAME register (x’007FA2’). Figure 7-24 shows an example of character shadowing. As shown in the figure, if a character contains dots in right border of its field, the shadowing for those dots appear in the character field to the right.

Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 184

I Box shadowing In normal mode, writing a 1 to bit 12 (BSHAD1) of the COL setting in the VRAM causes a box shadow to appear around all characters following that COL. If COL bit 11 (BSHAD0) is 0, the color specified in the WBSHD register (x’007FA6’) appears on the top and left sides of the box and the color specified in the BBSHD register (x’007FA4’) appears on the bottom and right sides of the box. These positions are reversed if BSHAD0 is 1. Figure 7-25 shows an example of box shadowing. As shown in the figure, the right-hand border of the shadow box appears in the character field to the right of the shadowed text.
To output a box shadow to the right, output a space to the right of the text.
16 dots 16 dots
BSHAD0 = 1
Box shadowing (black) (Specify the color in BBSHD: x’7FA4’)
Box shadowing (white) (Specify the color in WBSHD: x’7FA6’)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 185
18 dots

Setting Up the OSD
I Italicizing In closed-caption mode, writing a 1 to bit 10 (ITALIC) of the COL setting in the VRAM italicizes all characters following that COL. Figure 7-26 shows an example of an italicized character.
I Underlining In closed-caption mode, writing a 1 to bit 11 (CUNDL) of the COL setting in the VRAM underlines all characters following that COL. Figure 7-26 shows an example of an underlined character.
Underlining
Caption mode
Figure 7-26 Italicizing and Underlining Example
I Blinking In both normal and closed-caption modes, writing a 1 to bit 8 (BLINK) of the COL setting in the VRAM causes all characters following that COL to blink. To use this function, you must enable blinking by writing a 1 to bit 5 (BLINK) of the OSD3 register (x’007F0A’).
In closed-caption mode, you can specify whether or not the underlines blink on underlined, blinking characters. Set bit 0 (UNDF) of the OSD3 register to 0 to disable underline blinking, and set it to 1 to enable underline blinking.
The blink cycle lasts for 128 VSYNC pulses (about 2 seconds). The characters display for 96 VSYNCs (about 1.5 seconds) and turn off for 32 VSYNCs (about 0.5 seconds).
18 dots · 26 dots

7.10.3 Display Sizes
I Graphic tile sizes

The settings shown are for interlaced displays. In progressive displays, the vertical size settings (GVSZ[1:0]) are as follows: 01 = 1x, 10 = 2x, and 11 = 3x. The 00 setting is reserved.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 187

Setting Up the OSD
I Character sizes

The settings shown are for interlaced displays. In progressive displays, the vertical size settings (CVSZ[1:0]) are as follows: 01 = 1x, 10 = 2x, and 11 = 3x. The 00 setting is reserved. In addition, in closed-caption mode, only the b’00’, b’01’, and b’11’ settings are available for CVSZ[1:0]. The b’10’ setting is reserved.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 188

7.10.4 Setting Up the OSD Display Position This section describes how to control the positioning of the OSD.
o Write the horizontal position of the cursor to the SHP[9:0] field (x’007F12’).
Graphics
o Write the horizontal position of the first line in the display to the GIHP[9:0] field (x’007F16’).
o Write the position of the second and all following lines in the GHP[9:0] field of the graphics display RAM data for the preceding line.
o Write the horizontal position of the first line in the display to the CIHP[9:0] field (x’007F1A’).
o Write the position of the second and all following lines in the CHP[9:0] field of the text display RAM data for the preceding line.
o HPmax = (Thsync − Thw − 0.8 µs)/Tdot − (Nchar. × 16 × Hsz); or
o HPmax = 1024 − (Nchar. × 16 × Hsz)
Thsync is the HSYNC cycle, Thw is the HSYNC pulse width, Nchar. is the number of characters in the line including repeated characters and blank spaces, Tdot is the dot clock cycle, and Hsz is the horizontal size. The HPmax limit ensures that there is at least 0.8 µs between the end of a line and the leading edge of HSYNC.
When setting up the horizontal position, you must allow at least 0.8 µs between the end of a line and the leading edge of HSYNC, or the display will flicker.
0.8 µs
RGB, YM, YS
Figure 7-29 HP max of Horizontal Display Position
I About the horizontal start position on the screen The horizontal position, or HP settings (SHP, GHP, and CHP) determine where the left side of cursor, graphics, and text lines start on the screen. You can set this value for all of the layers in 1-pixel units.
Thsync · Thw

Setting Up the OSD
I To set up the vertical position: Cursor
o Write the vertical position of the cursor to the SVP[9:0] field (x’007F14’).
o Write the vertical position of the first line in the display to the GIVP[9:0] field (x’007F18’).
When you write new values to the GIVP and CIVP fields, the settings take effect on the next VSYNC pulse. This means that changes are reflected in the next display screen rather than the current one.
o Write the position of the second and all following lines in the GVP[9:0] field of the graphics display RAM data for the preceding line.
o Write the vertical position of the first line in the display to the CIVP[9:0] field (x’007F1C’).
o Write the position of the second and all following lines in the CVP[9:0] field of the text display RAM data for the preceding line.
VP range calculation example The base graphics line height is 16 dots, or H scan lines. If the graphics line you are positioning displays at 2x the base height, the number of H scan lines is:
The valid range of settings for GVP is:
x’3F0’ − x’20’ = x’3D0’ ≥ GVP ≥ x’03’
I About the vertical start position on the screen The vertical position, or VP settings (SVP, GVP, and CVP) determine where the upper edge of cursor, graphics, and text lines start on the screen. You can set this value for all of the layers in H scan line units. Using the same VP settings for all the layers makes them all start at the same vertical position.

7.11 DMA and Interrupt Timing This section describes how the MN102H75K/85K handles the timing of direct memory access (DMA) transfers of OSD data and OSD interrupts.
On both the text and graphics layers, the microcontroller reads the line 1 data from the RAM as it scans line 1 onto the display. For line 2 and following lines, it reads the data as it scans the display start for the preceding line. The RAM read starts 12 system clock cycles (12TS) after the leading edge of the HSYNC pulse. The DMA transfer takes 4TS for each display data word.
If you use the OSD function, the DMA function executes for both the text and graphics layers, even if your program does not use one of these layers. To prevent error, program data for the unused layer to meet the restrictions outlined in section 7.1, “Description,” on page 153.
In line 1, or when a graphics and text line begin simultaneously, the data transfer requests for both layers occur simultaneously. The text data transfer always takes priority. The graphics data transfer begins 5TS after the text data transfer ends.
If a DMA transfer occurs at the same time as the leading edge of a VSYNC pulse, the screen flickers. To avoid this, do not set a display position in the last line.
Interrupts For both graphics and text displays, the microcontroller processes the GINT and CINT interrupt request bits of the display data’s GVP and CVP fields during DMA transfer. If GINT or CINT is set to 1, when the associated transfer ends (GVP or CVP transfer) the OSD generates an interrupt request.

12Ts 4nTs 5Ts 4nTs
Text interrupt Graphics interrupt
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 192

7.12 Selecting the OSD Dot Clock This section describes how to set up the OSD dot clock.
I Selecting the clock source The source for the OSD dot clock is programmable to either the 4-MHz clock supplied through the OSC1 and OSC2 pins, then multiplied by the PLL circuit to 48 MHz, or a dedicated clock supplied through the OSDXI and OSDXO pins.
The dedicated OSDX clock can be a crystal, LC oscillator, or other form of exci- tation that is input through the OSDXI pin and synchronized internally to the HSYNC pulse, or it can be an LC blocking oscillator synchronized to the HSYNC pulse.
OSCSEL1 (x’007F06’, bit 9)
OSCSEL0 (x’007F06’, bit 8) Oscillator pins Oscillator type Frequency
0 0 OSC1, OSC2 Crystal + PLL 48-MHz (with 4-MHz osc.)
1 0 OSDXI, OSDXO
Crystal, LC oscillator, or other excitation
1 1 Reserved — —
If your design uses the OSDX clock, set the XIO bit (x’007F06’, bit 7) for the appropriate frequency.
I Selecting the divide-by ratio There are five divide-by settings available for any of the clocks described above. Table 7-11 shows the register settings for each ratio.
VCLK2 (x’007F08’, bit 6)
VCLK1 (x’007F08’, bit 5)
VCLK0 (x’007F08’, bit 4) Divide by Ratio
0 0 0 1/4 (12 MHz) (1)
0 0 1 1/3 (16 MHz) (1)
0 1 0 1/2 (24 MHz) (1)
0 1 1 2/3 (32 MHz) (1)
1 0 0 1/1 (48 MHz)
1 0 1 Reserved
1 1 0 Reserved
1 1 1 Reserved

7.13 Controlling the Shuttering Effect The MN102H75K/85K OSD achieves a shuttering effect using four pro- grammable shutters—two vertical and two horizontal. With this feature, you can shutter any portion of the OSD display, or you can combine shuttering with a wipe-out effect to create a smooth appearing and disappearing effect.
To prevent flickering and shadows on the display, only write to the registers during the VSYNC cycle.
7.13.1 Controlling the Shuttered Area The register settings for the two vertical shutters, VSHT0 and VSHT1, and the two horizontal shutters, HSHT0 and HSHT1, control which area of the screen is shuttered. Table 7-12 shows the register settings required for this function, and figure 7-31 shows four setup examples.
Shutter enable/disable VSON0 VSON1 HSON0 HSON1 0:Disable shutter (Acts as though there are no shutter lines.) 1:Enable shutter
HST00–
HST10–
For vertical shutters, this is the number of H scan lines from the top of the screen. For horizontal shutters, it is the number of pixels from the left of the screen.
VST19
HST09
HST19
Shuttering direction VSP0 VSP1 HSP0 HSP1 0:Shutter below (vertical shutters) or to the right (horizontal shutters) 1:Shutter above (vertical shutters) or to the left (horizontal shutters)
Shuttering mode control SHTRAD
0:AND the shuttered areas of all the shutters 1:OR the shuttered areas of all the shutters
I Determining the vertical shutter positions (VST0 and VST1) The top edge of the television screen is x’000’. Each integer higher brings the shutter position down one H scan line.
I Determining the horizontal shutter positions (HST0 and HST1) The left edge of the television screen is x’000’. Each integer higher brings the shutter position right one pixel. (One pixel, or one dot, is the smallest display unit in the OSD.)
Shutter position VST00– · (shared bit)

HSHT1
VSON0 = VSON1 = 1: V shutters 0 and 1 on HSON0 = HSON1 = 1: H shutters 0 and 1 on VSP0 = 0: V shutter 0 shutters below VSP1 = 1: V shutter 1 shutters above HSP0 = 0: H shutter 0 shutters to the right HSP1 = 1: H shutter 1 shutters to the left SHTRAD = 0: All shutters ANDed
VSHT1
HSHT0
HSHT1
VSON0 = VSON1 = 1: V shutters 0 and 1 on HSON0 = HSON1 = 1: H shutters 0 and 1 on VSP0 = 0: V shutter 0 shutters below VSP1 = 1: V shutter 1 shutters above HSP0 = 0: H shutter 0 shutters to the right HSP1 = 1: H shutter 1 shutters to the left SHTRAD = 1: All shutters ORed
VSHT1
HSHT0
HSHT1
VSON0 = VSON1 = 1: V shutters 0 and 1 on HSON0 = HSON1 = 1: H shutters 0 and 1 on VSP0 = 1: V shutter 0 shutters above VSP1 = 0: V shutter 1 shutters below HSP0 = 1: H shutter 0 shutters to the left HSP1 = 0: H shutter 1 shutters to the right SHTRAD = 1: All shutters ORed
VSHT1
HSHT0
HSHT1
VSON0 = 0: V shutter 0 off VSON1 = 1: V shutter 1 on HSON0 = HSON1 = 1: H shutters 0 and 1 on VSP0 = 1: V shutter 0 shutters above VSP1 = 0: V shutter 1 shutters below HSP0 = 1: H shutter 0 shutters to the left HSP1 = 0: H shutter 1 shutters to the right SHTRAD = 1: All shutters ORed
Figure 7-31 Shuttered Area Setup Examples
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 195

7.13.2 Controlling Shutter Movement Enabling the shutter movement function in the registers allows the shuttered area to expand or contract over time, producing a wipe-in or wipe-out effect. This allows the OSD display to appear or disappear without an abrupt transition. Table 7-13 shows the register settings required for this function, and figure 7-32 shows four setup examples. There is no repeat operation for shutter movement, so you must reset the bits each time.
V Shutter 1
H Shutter 0
H Shutter 1
Function
Bit Name
Bit Name
Bit Name
Bit Name Description
VSMP0 VSMP1 HSMP0 HSMP1 0: Move from top to bottom (vertical shutters) or from left to right (horizontal shutters) 1: Move from bottom to top (vertical shutters) or from right to left (horizontal shutters)
Shuttering movement speed control
00:Move every VSYNC 01:Move every 2 VSYNCs 10:Move every 3 VSYNCs 11:Move every 4 VSYNCs
I Considerations for horizontal shutter movement Do not set the horizontal shutter position (HST0, HST1) within the following ranges if you are only moving the horizontal shutter. The shutter cannot move if you do.
You can set these values if you wish to prevent horizontal shutter movement. Note that the horizontal shutter position does not affect vertical movement.
Shutter movement enable/disable · Shuttering movement direction · (shared bits)

HSHT1
VSON0 = VSON1 = 1: V shutters 0 and 1 on HSON0 = HSON1 = 1: H shutters 0 and 1 on VSP0 = 1: V shutter 0 shutters above VSP1 = 0: V shutter 1 shutters below HSP0 = 1: H shutter 0 shutters to the left HSP1 = 0: H shutter 1 shutters to the right SHTRAD = 1: All shutters ORed
VSHT1
This example shows V shutter 0 moving downward. It shutters both the text and the background color in the text layer.
VSM0 = 1: V shutter 0 movement enabled VSM1 = 0: V shutter 1 movement disabled HSM0 = HSM1 = 1: Movement enabled for H shutters 0 and 1 VSMP0 = 0: V shutter 0 moves downward SHTSP0 = SHTSP1 = 0: Shutter moves 1 HSYNC each VSYNC
ABCDE
VSHT1
You must set OSDREGE = x’1’, or the shutters will not move (PCNT2 register, bit 0).
VSHT0 ABCDE
VSHT1
Vertical shutter 0 stops x’3FF’ HSYNC lines from the top of the screen.
VSHT0
Figure 7-32 Shutter Movement Setup Examples
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 197
Television screen · Shuttered region

7.13.3 Controlling Shuttering Effects Through register settings, you can independently control shuttering for text, text background, graphics, and color background. You can also output blanks to the shuttered area.
You cannot shutter the cursor layer.
Table 7-13 shows the register settings required for these effects. There are three types of shuttering—shuttering of text, text background, and graphics, shuttering of the color background, and shutter blanking. The sections below describe how to control each of these.
Text Set the text shutter control bit, CCSHT, of the shutter control register, SHTC (x’007F28’) to 1.
Do not allow the horizontal shut- tering boundaries to overlap any italicized portion of a closed- caption display. This distorts the italicized characters.
Text background Set the text background shutter control bit, BCSHT, of SHTC to 1.
Graphics Set the text background shutter control bit, GSHT, of SHTC to 1.
Figure 7-33 shows three setup examples of text-layer shuttering.
Text background shuttering · Color background shuttering

ABCDE
VSHT1
HSHT0 HSHT1
CDE
VSHT1
HSHT0 HSHT1
ABCDE
VSHT1
The text background disappears, leaving only the characters visible.
I To shutter the color background: Set the color background shutter control bit, COLBSHT, of the shutter control register, SHTC (x’007F28’) to 1.
This function exists only when the program enables a color background. It allows you to limit the area covered by the color background.
I To blank out the shuttered area: Set the shutter blanking control bit, SHTBLK, of SHTC to 1.
Shutter blanking outputs black to the entire shuttered area. To output blanking to a display that uses a color background, enable the color background shutter (COLBSHT = 1) so that the color background will also be blanked in the shuttered area. Figure 7-34 shows two setup examples.

CCSHT = 0: Shuttering of text disabled BCSHT = 0: Shuttering of text background disabled SHTBLK = 1: Shuttered area is blank
ABCDE
VSHT1
Shuttered area is blank (black).
CCSHT = 0: Shuttering of text disabled BCSHT = 0: Shuttering of text background disabled SHTBLK = 1: Shuttered area is blank COLBSHT = 1: Color background is shuttered
ABCDE
VSHT1
Figure 7-34 Shutter Blanking Setup Examples
7.13.4 Controlling Line Shuttering It is possible to cancel shuttering of individual lines on the text and graphics layers so that they will be displayed on both shuttered and non-shuttered regions.
I To disable shuttering on the next line: Set the GSHT bit (bit 10 of GHP in the RAM data) and/or the CSHT bit (bit 10 of CHP in the RAM data) to 1.
I To disable shuttering on the first line: Set the GISHT bit of the GIHP register (x’007F16’) and/or the CISHT bit of the CIHP register (x’007F14’) to 1.
Figure 7-35 shows a setup example for the text layer.
Figure 7-35 Line Shuttering Setup Example
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 200

7.14 Field Detection Circuit
7.14.1 Block Diagram
4 Upper 4 bits
by 3 7-bit counter
x’007F0E’ EVOD (FREG[13:10])
T-FF D-FF x 4 (N1) 4 LOADN1 VSYNC leading edge detection
x’007F0E’ EVOD (FREG[23:20])
D-FF x 4 (N2)
N2CNT
EOMON
EOSEL
FRMON
Figure 7-36 Field Detection Circuit Block Diagram
7.14.2 Description The 7-bit field counter in this block resets every HSYNC interval to count the system clock. At each VSYNC interval, the 4 MSBs of the 7-bit counter are alter- nately loaded (made readable) to bits 7 to 4 (N2) and 3 to 0 (N1) of the EVOD register (x’007F0E’). The comparator compares the N1 and N2 values and outputs the results to the EOMON bit of EVOD. The OSD identifies the field that sets EOMON to 1 as the display start field. Table 7-15 shows the criteria that the comparator uses.
By reading the FRMON bit of EVOD, the OSD can determine which register the 4 MSBs will load to on the next VSYNC input.
To ensure that the display starts at the right field, you must also set the EOSEL bit of EVOD so that EOMON becomes 1 at the display start field.
HSYNC
Load value to FREG2
Load value to FREG1
Figure 7-37 Field Detection Timing
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 201

Field Detection Circuit
Table 7-15 EOMON Output Criteria
EOMON Output
FRMON N1, N2 Relationship
EOSEL = 0 EOSEL = 1
0 Load to N2 next
N1 < N2 1 0
N1 = N2 Complement previous Complement previous
1 Load to N1 next
N1 < N2 0 1
N1 = N2 Complement previous Complement previous
I Switching the display start field The OSD is constructed so the display start position is the field (field 1) where the EOMON bit is 1. However, interlaced displays may require that the start position be a field (field 2) where the EOMON bit is 0. In this case, merely com- plementing the EOSEL bit will not result in a correct display. You must set the following two bits to have the display start at field 2.
o CANH (x’007F0A’, bit 4): Set to 1. 0: Normal display 1: Slide the field 1 display position down 1 line
o EOSEL (x’007F0E’, bit 10): Complement the value EOSEL has for field 1 in a normal display.
I Scrolling in the closed-caption mode To implement text-layer scrolling in the closed-caption mode, the program must constantly switch the text display fields. This can cause the text lines to display incorrectly. To prevent this, set the following bits to fix the text lines to the even or odd field characters while scrolling.
o BFLD (x’007F0A’, bit 2): Set to 1 to enable scrolling. 0: Normal display 1: Display the same characters in fields 1 and 2
o EONL (x’007F0A’, bit 3): Set to 0 or 1. 0: Fix to characters in field 1 1: Fix to characters in field 2

7.15 OSD Registers All registers in OSD block cannot be written by byte (by word only). Read by byte is possible.
— A17 A16 A15 A14 A13 A12 A11 A10 A9 A8
Reset: 0
R/W: R/W R/W
A[17:8] holds the programmable portion of the text ROM end address. The low-order 8 bits of the address are always x’FF’ and the high-order 6 bits are always b’000010’. The available address range is x’0800FF’ to x’0BFFFF’, with a programmable range from x’000’ to x’3FF’.
0000 10XX XXXX XXXX 1111 1111
0800FF 0BFFFF
0000 1000 0000 0000 1111 1111 0000 1011 1111
— A17 A16 A15 A14 A13 A12 A11 A10 A9 A8
Reset: 0
R/W: R/W R/W
A[17:8] holds the programmable portion of the graphics ROM end address. The low-order 8 bits of the address are always x’FF’ and the high- order 6 bits are always b’000010’. The available address range is x’0800FF’ to x’0BFFFF’, with a programmable range from x’000’ to x’3FF’.
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 GRAM
GRAM
GRAM
GRAM
GRAM
GRAM
GRAM
CRAM
CRAM
CRAM
CRAM
CRAM
CRAM
CRAM
CRAM
END
END
END
END
END
END
END
END
END
END
END
END
END
END
END
END
A11
A10
A9
A8
A7
A6
A5
A4
A11
A10
A9
A8
A7
A6
A5
A4
Reset: 0
R/W: R/W
GRAMENDA[11:4] holds the programmable portion of the graphics RAM end address and CRAMENDA[11:4] holds the programmable portion of the text RAM end address. The low-order 4 bits of the address are always x’F’ and the high-order 4 bits are always x’9’. The available address range
Fixed Programmable Fixed

OSD Registers
is x’900F’ to x’9FFF’, with a programmable range from x’00’ to x’FF’.
1001 XXXX XXXX 1111
1001 0000 0000 1111 1001 1111 1111 1111
— SPRT0 STC08 STC07 STC06 STC05 STC04 STC03 STC02 STC01 STC00
Reset: 0
R/W: R/W R/W
0: Graphics color palette 1 1: Graphics color palette 2
STC0[8:0]: Cursor 0 Tile Code
Use the same ROM data as that used for the graphics.
— SPRT1 STC18 STC17 STC16 STC15 STC14 STC13 STC12 STC11 STC10
Reset: 0
R/W: R/W R/W
0: Graphics color palette 1 1: Graphics color palette 2
STC1[8:0]: Cursor 1 Tile Code
Use the same ROM data as that used for the graphics.
— SPRT2 STC28 STC27 STC26 STC25 STC24 STC23 STC22 STC20 STC20
Reset: 0
R/W: R/W R/W
0: Graphics color palette 1 1: Graphics color palette 2
STC2[8:0]: Cursor 2 Tile Code
Use the same ROM data as that used for the graphics.
Fixed Programmable Fixed · x'900F' x'9FFF'
![Page 206 of the Lucent Technologies Telephone (MN102H75K) user manual — GIHSZ[1:0]: Graphics initial horizontal size](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-206.webp?w=400)
STC3: Cursor Tile Code Register 3 x’007E2E’
— SPRT3 STC38 STC37 STC36 STC35 STC34 STC33 STC32 STC30 STC30
Reset: 0
R/W: R/W R/W
0: Graphics color palette 1 1: Graphics color palette 2
STC3[8:0]: Cursor 3 Tile Code
Use the same ROM data as that used for the graphics.
— — — SHSZ1 SHSZ0 — SHP9 SHP8 SHP7 SHP6 SHP5 SHP4 SHP3 SHP2 SHP1 SHP0
Reset: 0
R/W: R/W R/W R R/W
SVP: Cursor Vertical Position Register x’007F14’
— — — SVSZ1 SVSZ0 — SVP9 SVP8 SVP7 SVP6 SVP5 SVP4 SVP3 SVP2 SVP1 SVP0
Reset: 0
R/W: R/W R/W R R/W
Table 7-16 Cursor Vertical Size Settings
SVSZ[1:0]
1 Dot Size Interlaced Displays Progressive Displays 00 1 H scan line Reserved 01 2 H scan lines 1 H scan line 10 4 H scan lines 2 H scan lines 11 6 H scan lines 3 H scan lines
SVP[9:0]: Cursor vertical position
GIHP: Graphics Initial Horizontal Position Register x’007F16’
GI HSZ0
GI SHT GIHP9 GIHP8 GIHP7 GIHP6 GIHP5 GIHP4 GIHP3 GIHP2 GIHP1 GIHP0
Reset: 0
R/W: R/W R/W
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 205

OSD Registers
0: Shutter control on 1: Shutter control off
GIHP[9:0]: Graphics initial horizontal position
GIVP: Graphics Initial Vertical Position Register x’007F18’
GI VSZ0 — GIVP9 GIVP8 GIVP7 GIVP6 GIVP5 GIVP4 GIVP3 GIVP2 GIVP1 GIVP0
Reset: 0
R/W: R/W R/W R R/W
Table 7-17 Graphics Vertical Size Settings
GIVSZ[1:0]
1 Dot Size Interlaced Displays Progressive Displays 00 1 H scan line Reserved 01 2 H scan lines 1 H scan line 10 4 H scan lines 2 H scan lines 11 6 H scan lines 3 H scan lines
GIVP[9:0]: Graphics initial vertical position
CIHP: Text Initial Horizontal Position Register x’007F1A’
CI HSZ0
CI SHT CIHP9 CIHP8 CIHP7 CIHP6 CIHP5 CIHP4 CIHP3 CIHP2 CIHP1 CIHP0
Reset: 0
R/W: R/W R/W
0: Shutter control on 1: Shutter control off
CIHP[9:0]: Graphics initial horizontal position
CIVP: Text Initial Vertical Position Register x’007F1C’
CI VSZ0 — CIVP9 CIVP8 CIVP7 CIVP6 CIVP5 CIVP4 CIVP3 CIVP2 CIVP1 CIVP0
Reset: 0
R/W: R/W R/W R R/W

CIVSZ[1:0]: Text initial vertical size
Table 7-18 Text Vertical Size Settings
CIVSZ[1:0]
1 Dot Size Interlaced Displays Progressive Displays 00 1 H scan line Reserved 01 2 H scan lines 1 H scan line 10 4 H scan lines 2 H scan lines 11 6 H scan lines 3 H scan lines
CIVP[9:0]: Text initial vertical position
EVOD: Display Start Field Control Register x’007F0E’
FR MON
EO MON
FREG
23 FREG
22 FREG
21 FREG
20 FREG
13 FREG
12 FREG
11 FREG
Reset: 0
R/W: R/W R
Monitors which field register (FREG) loaded the counter value on the leading edge of VSYNC.
EOMON: Even/odd field monitor
Set between display fields.
FREG[23:20]: Field register
4-bit register 2 storing field counter value.
4-bit register 1 storing field counter value.
9 HCNT
8 HCNT
7 HCNT
6 HCNT
5 HCNT
4 HCNT
3 HCNT
2 HCNT
1 HCNT
Reset: 0
R/W: R
This register holds the HSYNC count, which indicates the vertical display position. It is cleared to 0 on the leading edge of VSYNC.

OSD Registers
OSD1: OSD Register 1 x’007F06’
OSC SEL0 XIO HPOL VPOL YS POL
YS PLT — YCNT RGBC
Reset: 0
R/W: R/W R/W R R/W R/W
OSCSEL[1:0]: Oscillator select
A write to the OSD bit of OSD1 takes effect on the next leading edge of VSYNC. If you are turning the OSD on, the OSD starts operating on the next VSYNC after the program writes a 1 to the OSD bit. If you are turning the OSD off, the OSD stops operating on the next VSYNC after the program writes a 0 to the OSD bit.
Frequency range: 12 to 48 MHz
0: Less than 20 MHz 1: Greater than 20 MHz
HPOL: HSYNC input polarity select
0: Active low 1: Active high
VPOL: VSYNC input polarity select
0: Active high 1: Active low
To turn off the OSD block to save power:
bit 7), turning the clock off.
If you turn the clock off before the VSYNC input, power usage may not
drop or the microcontroller may halt.
0: DAC output 1: Digital output
In using LC blocking oscillation, the power comsumption becomes large.
Digital output is the LSB of YM (bit 12 of the color palette).
To reduce it, select another oscillation.
0: DAC output 1: Digital output
Digital output is the LSB of each color:
In case of of useing OSDX clock (both
R: bit 0 of the color palette G: bit 4 of the color palette B: bit 8 of the color palette
LC blocking oscilation and external
clock), to prevent the current flow set OSDXI, OSDXO terminal to port
function (P45, P46) and output H level
before invoking STOP mode.

OSD2: OSD Register 2 x’007F08’
T GTHT GEXTE PRYM TRPTF TRPT GCOL
1 GCOL
0 COLB VCLK
2 VCLK
1 VCLK
0 CGPR SOUT GOUT COUT
Reset: 0
R/W: R/W
0: 16 pixels high 1: 18 pixels high
GEXTE: Graphics maximum tiles per line select
0: Maximum 18 tiles 1: Maximum 28 tiles
PRYM: Translucent color control (YM, YS)
Setting the YSPLT bit of OSD1 to 1 disables the PRYM bit. With this setting, you must also set the TRPT and TRPTF bits to 1. You can specify transparency for individual color palettes if needed.
Specifies translucency for color 15 in all palettes.
Specifies transparency for color 0 in all palettes.
00: 16-color mode 10: 4-color mode 01: 8-color mode 11: 2-color mode
COLB: Color background control
0: Don’t output color background 1: Output color background
VCLK[2:0]: VCLK clock select
Divide-by ratio select. The values in parentheses ( ) are applicable when the oscillator in the OSD1 register is set to the OSC clock (OSCSEL[1:0] = 00).
You cannot set VCLK[2:0] to 100 (don’t divide) when the OSC clock is selected. Only select it when the clock source is 32 MHz or less.
0: Graphics layer takes priority 1: Text layer takes priority
SOUT/GOUT/COUT: Layer output on/off
SOUT: cursor layer; GOUT: graphics layer; COUT: text layer
0: Don’t output layer 1: Output layer
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 209

OSD Registers
OSD3: OSD Register 3 x’007F0A’
— BLIN
Reset: 0
R/W: R/W R/W
Controls blinking for text-layer characters with BLINK set in the COL code.
CANH: Vertical position control for closed captions
Active when interlacing is selected.
EONL and BFLD: Closed-caption scrolling control
Use when required for smoother scrolling.
0: Don’t blink 1: Blink
CAPM: Closed-caption mode setting
0: Normal display mode 1: Closed-caption mode
VSHT0: Vertical Shutter 0 Register x’007F20’
0 VSP0 VSMP
0 VSM0 VST0
9 VST0
8 VST0
7 VST0
6 VST0
5 VST0
4 VST0
3 VST0
2 VST0
1 VST0
Reset: 0
R/W: R R R/W
0: Off 1: On
VSP0: Vertical shutter 0 shuttering direction
0: Shutter below 1: Shutter above
VSMP0: Vertical shutter 0 movement direction
0: Top to bottom 1: Bottom to top
VSM0: Vertical shutter 0 movement control
0: Don’t move 1: Move
VST0[9:0]: Vertical shutter 0 position
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 210

VSHT1: Vertical Shutter 1 Register x’007F22’
1 VSP1 VSMP
1 VSM1 VST1
9 VST1
8 VST1
7 VST1
6 VST1
5 VST1
4 VST1
3 VST1
2 VST1
1 VST1
Reset: 0
R/W: R R R/W
0: Off 1: On
VSP1: Vertical shutter 1 shuttering direction
0: Shutter below 1: Shutter above
VSMP1: Vertical shutter 1 movement direction
0: Top to bottom 1: Bottom to top
VSM1: Vertical shutter 1 movement control
0: Don’t move 1: Move
VST1[9:0]: Vertical shutter 1 position
HSHT0: Horizontal Shutter 0 Register x’007F24’
0 HSP0 HSMP
0 HSM0 HST0
9 HST0
8 HST0
7 HST0
6 HST0
5 HST0
4 HST0
3 HST0
2 HST0
1 HST0
Reset: 0
R/W: R R R/W
0: Off 1: On
HSP0: Horizontal shutter 0 shuttering direction
0: Shutter to the right 1: Shutter to the left
HSMP0: Horizontal shutter 0 movement direction
0: Left to right 1: Right to left
HSM0: Horizontal shutter 0 movement control
0: Don’t move 1: Move
HST0[9:0]: Horizontal shutter 0 position
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 211

OSD Registers
HSHT1: Horizontal Shutter 1 Register x’007F26’
1 HSP1 HSMP
1 HSM1 HST1
9 HST1
8 HST1
7 HST1
6 HST1
5 HST1
4 HST1
3 HST1
2 HST1
1 HST1
Reset: 0
R/W: R R R/W
0: Off 1: On
HSP1: Horizontal shutter 1 shuttering direction
0: Shutter to the right 1: Shutter to the left
HSMP1: Horizontal shutter 1 movement direction
0: Left to right 1: Right to left
HSM1: Horizontal shutter 1 movement control
0: Don’t move 1: Move
HST1[9:0]: Horizontal shutter 1 position
SHTC: Shutter Control Register x’007F28’
— SHT BLK
SHT
SHT
SHT RAD GSHT BC SHT
CC SHT
SHT
SP1
SP0
The shuttering function does not work in the cursor layer.
Reset: 0
R/W: R/W R/W
0: Off 1: On
COLBSHT: Color background shutter control
0: Disable 1: Enable
SHTSP[1:0]: Shutter speed control
0: AND mode 1: OR mode
GSHT: Graphics shutter control
0: Disable 1: Enable
BCSHT: Text background shutter control
0: Disable 1: Enable
CCSHT: Text shutter control
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 212
![Page 214 of the Lucent Technologies Telephone (MN102H75K) user manual — FRAMEYM[3:0]: YM color code](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-214.webp?w=400)
CPT0–CPTF: Text Palette Colors 0–15 Registers x’007F80’–x’007F9E’
YM2
YM1
YM0
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
These registers contain the colors used in the text layer. When digital out- put is selected, CPTnYM0 is output as YM, CPTnB0 as B, CPTnG0 as G, and CPTnR0 as R. When the YS color palette is selected, CPTnYM3 is output as YS.
CPTnB[3:0]: Blue color code
CPTnG[3:0]: Green color code
CPTnR[3:0]: Red color code
COLB: Color Background Register x’007FA0’
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
COLB
YM3
YM2
YM1
YM0
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
This register contains the color used for the color background. When digi- tal output is selected, COLBYM0 is output as YM, COLBB0 as B, COLBG0 as G, and COLBR0 as R. When the YS color palette is selected, COLBYM3 is output as YS.
COLBB[3:0]: Blue color code
COLBG[3:0]: Green color code
COLBR[3:0]: Red color code
FRAME: Outlining and Character Shadowing Color Register x’007FA2’
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
FRAM
E YM3
E YM2
E YM1
E YM0
E B3
E B2
E B1
E B0
E G3
E G2
E G1
E G0
E R3
E R2
E R1
E R0
Reset: 0
R/W: W
This register contains the color used for text outlining and shadowing. When digital output is selected, FRAMEYM0 is output as YM, FRAMEB0 as B, FRAMEG0 as G, and FRAMER0 as R. When the YS color palette is selected, FRAMEYM3 is output as YS.
FRAMEB[3:0]: Blue color code
FRAMEG[3:0]: Green color code
FRAMER[3:0]: Red color code
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 213
![Page 215 of the Lucent Technologies Telephone (MN102H75K) user manual — GPT1nYM[3:0]: YM color code](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-215.webp?w=400)
OSD Registers
BBSHD: Black Box Shadowing Register x’007FA4’
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 BB SHD YM3
BB SHD YM1
BB SHD YM0
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
BB SHD
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
This register contains the color used as black in box shadowing. When dig- ital output is selected, BBSHDYM0 is output as YM, BBSHDB0 as B, BBSHDG0 as G, and BBSHDR0 as R. When the YS color palette is selected, BBSHDYM3 is output as YS.
BBSHDB[3:0]: Blue color code
BBSHDG[3:0]: Green color code
BBSHDR[3:0]: Red color code
WBSHD: White Box Shadowing Register x’007FA6’
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 WB SHD YM3
WB SHD YM1
WB SHD YM0
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
WB SHD
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
This register contains the color used as white in box shadowing. When dig- ital output is selected, WBSHDYM0 is output as YM, WBSHDB0 as B, WBSHDG0 as G, and WBSHDR0 as R. When the YS color palette is selected, WBSHDYM3 is output as YS.
WBSHDB[3:0]: Blue color code
WBSHDG[3:0]: Green color code
WBSHDR[3:0]: Red color code
GPT10–GPT1F: Graphics Palette 1 Colors 0–15 Registers x’007FC0’–x’007FDE’
YM2
YM1
YM0
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
These registers contain one of two sets of colors used in the graphics layer. When digital output is selected, GPT1nYM0 is output as YM, GPT1nB0 as B, GPT1nG0 as G, and GPT1nR0 as R. When the YS color palette is selected, GPT1nYM3 is output as YS.
GPT1nB[3:0]: Blue color code
GPT1nG[3:0]: Green color code
GPT1nR[3:0]: Red color code
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 214
![Page 216 of the Lucent Technologies Telephone (MN102H75K) user manual — GPT2nYM[3:0]: YM color code](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-216.webp?w=400)
GPT20–GPT2F: Graphics Palette 2 Colors 0–15 Registers x’007FE0’–x’007FFE’
YM2
YM1
YM0
B3
B2
B1
B0
G3
G2
G1
G0
R3
R2
R1
R0
Reset: 0
R/W: W
These registers contain one of two sets of colors used in the graphics layer. When digital output is selected, GPT2nYM0 is output as YM, GPT2nB0 as B, GPT2nG0 as G, and GPT2nR0 as R. When the YS color palette is selected, GPT2nYM3 is output as YS.
GPT2nB[3:0]: Blue color code
GPT2nG[3:0]: Green color code
GPT2nR[3:0]: Red color code
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 215

Description
8 IR Remote Signal Receiver
8.1 Description The MN102H75K/85K contains a remote signal receiver that processes signals in two formats: Household Electrical Appliance Manufacturers Association (HEAMA) format and 5-/6-bit format. This chapter provides an overview of each block in the circuit and describes the operation of the receiver.
fSYSCLK = 12 MHz in all of the examples and descriptions in this section. In addition, fPWM1 = fSYSCLK/23, fPWM3 = fSYSCLK/25, fPWM5 = fSYSCLK/27, fPWM6 = fSYSCLK/28, and fPWM8 = fSYSCLK/210.
The remote signal is input through the RMIN pin. Each time the edge detection circuit detects the active edge of the signal, the 6-bit counter resets and the sampling clock, TS, starts counting. TS is formed by dividing PWM3 by the value in the frequency division control register, RMTC. The clock status register, RMCS, which can be read at any time, holds the current value of the 6-bit counter.
The remote signal contains a leader, data, and a trailer, in that order. The micro- controller shifts received data into the LSB of the reception data shift register, RMSR. After it receives 8 bits, it loads the contents of RMSR to the reception data transfer register, RMTR.

8.2 Block Diagram

MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 217

8.3 IR Remote Signal Receiver Operation
8.3.1 Operating Modes The IR remote signal receiver has three operating modes: HEAMA, 5-/6-bit, and HEAMA–5-/6-bit automatic detect. Set the mode in the MODAUTO and MODSEL bits of the interrupt control register, RMIR. The FMTMON bit of the interrupt status register, RMIS, monitors the operating mode.
In automatic detect mode, the microcontroller checks the interval between remote signal edges. If the interval is (n - 4TS) to (n + 3TS), where n is the leader value set in the LD[3:0] field of the RMLD register, it processes the data in HEAMA format. If the interval is 28 to 35 TS cycles, it processes the data in 5-/6-bit format.
8.3.2 Noise Filter The IR remote signal receiver contains a noise filter to eliminate noise from the remote signal. To enable the noise filter, set the FILTRE bit of the interrupt control register, RMIR, to 1. The noise filter samples the remote input signal every PWM6 cycle (21.3 µs) or PWM8 cycle (85.5 µs), then outputs the value that it sampled at least three times during the last four sampling cycles. This eliminates any noise occurring during one or two sampling cycles. Select the sampling clock (PWM6 or PWM8) with the SP bit of the RMLD register. (PWM6 is selected at reset.)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 218

8.3.3 8-Bit Data Reception Resetting the 8-bit data reception counter allows the microcontroller to receive 8- bit data, either with or without a leader. The software can reset the counter using the BCRSTE and BCEDGS bits of the interrupt status register, RMIS. The counter can also be reset by an external reset or a hardware reset at leader detection.
Set BCRSTE to enable resets to the 8-bit data reception counter. When the BCEDGS bit is 0, the counter resets at the first remote signal edge after each trailer detection. This mode is for data containing no leader. (See figure 8-3.)
8-bit data reception detection Trailer detection
6 7 0 0 1 2
When BCEDGS is 1, the counter resets at the second remote signal edge after each trailer detection. By ignoring the leader, this mode allows the microcon- troller to receive 8-bit data that contains a leader. (See figure 8-4.)
8-bit data reception detection Trailer detection
6 7 0 1 0 1
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 219

8.3.4 Identifying the Data Format The microcontroller determines the logic levels of the data by testing the interval between remote signal edges. Table 8-1 shows the intervals that the microcon- troller interprets as 0 and 1 for both HEAMA and 5-/6-bit formats. Table 8-2 shows the conditions for identifying long and short data.
Logic Level Conditions
Operating Mode
Data = 0 Data = 1
HEAMA format < 6 TS cycles ≥ 6 TS cycles
5-/6-bit format < 12 TS cycles ≥ 12 TS cycles
Operating Mode Long Data Short Data
HEAMA format ≥ 10 TS cycles < 2 TS cycles
5-/6-bit format ≥ 20 TS cycles < 4 TS cycles
The 6-bit counter regulates data format detection. When the microcontroller detects a data leader, it sets the LONGDF bit of the clock status register, RMCS, to indicate long data. Figure 8-5 is a graphic representation of all the conditions for identifying the data format.
When the microcontroller detects a data trailer, the hardware automatically shuts off the supply to sampling clock TS, which the 6-bit counter counts. The counter resets and the clock supply restarts at the next edge detection.
0 2 4 6 8 10 12 16 20 24 28 32 36 40 64 TS
Leader (= 24 TS) (When RMLD[3:0] = x’6’) Leader
5-/6-bit format HEAMA format
Data = 0 (= 4 TS)
Data = 1 (= 8 TS)
Leader (= 32 TS)
Data = 0 (= 8 TS)
Data = 1 (= 16 TS)
0 4 8 12 16 20 24 28 32 36 40 64 TS
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 220

8.3.5 Generating Interrupts The IR remote signal receiver has four interrupt vectors: leader detection, trailer detection, 8-bit data reception detection, and pin edge detection. This section describes the operation for each of them.
8.3.5.1 Leader Detection An interrupt occurs when the circuit detects a data leader. It detects leaders by testing the interval between remote signal edges. Table 8-3 shows the conditions.
Format Edge Interval
HEAMA data leader (n - 4)TS ≤ interval < (n + 4)TS (1)
5-/6-bit data leader 28TS ≤ interval < 36TS
8.3.5.2 Trailer Detection An interrupt occurs when the 6-bit counter overflows.
8.3.5.3 8-Bit Data Reception Detection An interrupt occurs when the microcontroller loads 8-bit received data to the reception data transfer register, RMTR.
8.3.5.4 Pin Edge Detection An interrupt occurs when the remote signal input pin, RMIN, is asserted. The POLSEL bit of RMIR sets the polarity of RMIN.
(POLSEL=0) RMIN input negative edge-triggered
Edge detection output
1/fSYSCLK 1/fSYSCLK
Figure 8-6 Pin Edge Detection
The detection output for all four interrupt vectors is an active high pulse asserted at intervals of 1/fSYSCLK. Bits 3 to 0 of the RMIR register control the interrupt vectors individually. A 0 disables the interrupt vector and a 1 enables it.
A remote signal interrupt sets the RMCIR flag of the RMCICL interrupt register (x’00FC76’).

8.3.6 Controlling the SLOW Mode
Use bit 7 (SP) in the RMLD reg- ister to toggle the noise filter sampling frequency between PWM6/PWM8 and PWM3/ PWM5.
The MN102H series microcontrollers have two operating modes: NORMAL and SLOW. (See section 3.1, “CPU Modes,” on page 72.) In SLOW mode, fSYSCLK = 2 MHz, which affects the frequencies of the PWM3 clock and noise filter sampling (PWM6/PWM8). Use the SPSLW bit (bit 6) of the RMLD register to change which clocks and noise filter sampling that you use.
Normal Mode (f SYSCLK = 12 MHz)
SLOW Mode (f SYSCLK = 2 MHz)
SPSLW (RMLD,
Noise filter sampling Clock Noise filter sampling Clock
0 PWM6 (21.3 µs)
PWM8 (85.5 µs)
PWM3 (2.7 µs)
1 PWM3 (2.7 µs)
PWM5 (10.7 µs)
PWM1 (0.67 µs)
PWM1 (4.0 µs)

8.4 IR Remote Signal Receiver Control Regis- ters All registers in RMC block cannot be written by byte (by word only). Read by byte is possible.
Register Address R/W Function
RMTC x’007EA4’ R/W Remote signal frequency division control register
RMIR x’007EA2’ R/W Remote signal interrupt control register
RMIS x’007EA0’ R/W Remote signal interrupt status register
RMLD x’007EAC’ R/W Remote signal leader value set register
RMCS x’007EA6’ R Remote signal clock status register
RMSR x’007EA8’ R Remote signal reception data shift register
RMTR x’007EAA’ R Remote signal reception data transfer register
To identify the remote signal, the IR signal receiver generates a sampling clock, TS, by dividing the PWM3 pulse by the value set in RMTC[7:0]. fPWM3 is fSYSCLK divided by 25 (= 375 kHz, 2.7 µs with a 4-MHz oscilla- tor). The TS cycle is the contents of RMTC + 1, so load a value from 1 to 255 for a division ratio from 2 to 256.
The edge detection circuit samples the remote signal with fSYSCLK. Set the frequency divide-by ratio to meet this condition. If you do not, the microcontroller may interpret the data 1s and 0s incorrectly.
The microcontroller reads the value in the frequency division counter as a ones’ complement number (each digit is complemented).
Set the RMTC value so that TS = T/2, where T is the pulse width of the remote input signal. Table 8-6 shows how to define T for the different formats.
After the program sets the divide- by ratio for the frequency in RMTC, the read values may be incorrect until the circuit detects the next active edge of the remote signal.
T T Data 0:
T 3T Data 1:
2T 2T Data 0:
2T 6T Data 1:
RMTC is an 8- or 16-bit access register.
HEAMA format · 5-/6-bit format

All registers in RMC block cannot be written by byte (by word only). Read by byte is possible.
MOD
FILTR
POL SEL
LEADER
TRAILR
DAT8
EDME
SEL
E
E
E
E
E
RMIR controls the operating modes and interrupt operations for the receiver circuit. It is a 16-bit access register.
0: Automatic detect 1: Fixed
MODSEL: Operating mode select
0: HEAMA format 1: 5-/6-bit format
FILTRE: Noise filter input multiplexer on/off
0: Pin level 1: Noise filter
POLSEL: Input polarity
0: Positive-edge-triggered 1: Negative-edge-triggered
LEADERE: Interrupt enable for leader detection
0: Disable 1: Enable
TRAILRE: Interrupt enable for trailer detection
0: Disable 1: Enable
DAT8E: Interrupt enable for 8-bit data reception detection
0: Disable 1: Enable
EDMEE: Interrupt enable for RMIN pin edge detection
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 224

RMIS: Remote Signal Interrupt Status Register x’007EA0’
BC EDGS
FMT MON
DOMES
M56BIT
TRAILR
DAT8
EDGE
D
D
D
D
D
RMIR indicates the detection and operation status of remote signal inter- rupts. It is a 16-bit access register.
0: Disable 1: Enable
BCEDGS: 8-bit data reception binary counter reset edge select
0: Reset at 1st edge 1: Reset at 2nd edge
FMTMON: Format monitor
0: HEAMA format 1: 5-/6-bit format
DOMESD: Interrupt request on HEAMA leader detection
0: No request 1: Request
M56BITD: Interrupt request on 5-/6-bit leader detection
0: No request 1: Request
TRAILRD: Interrupt request on trailer detection
0: No request 1: Request
DAT8D: Interrupt request on 8-bit reception detection
0: No request 1: Request
EDGED: Interrupt request on RMIN pin edge detection
0: No request 1: Request
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 225

RMLD: Remote Signal Leader Value Set Register x’007EAC’
RMLD is a 16-bit access register.
fPWM1 = fSYSCLK/23, fPWM3 = fSYSCLK/25, fPWM5 = fSYSCLK/27, fPWM6 = fSYSCLK/28, and fPWM8 = fSYSCLK/210.
Set the four MSBs of the 6-bit leader value for HEAMA data in LD[3:0]. This 4-bit setting must be between 0 and 60 TS cycles. The default value is x’6’. The two LSBs of the leader are always 0.
Do not set the leader value too small. Leader detection and data detection may occur simultaneously.
SHORT
DF TSCNT5 TSCNT4 TSCNT3 TSCNT2 TSCNT1 TSCNT0
DF
RMCS indicates the result of the short/long data detection. It is a 16-bit access register.
Set to 1 when long data is detected.
Set to 1 when short data is detected.
RMSR: Remote Signal Reception Data Shift Register x’007EA8’
The microcontroller shifts received data into RMSR, converting it to paral- lel data. After it shifts in 8 bits, it loads the data byte to RMTR. The CPU reads the data from RMTR. The data shifts from LSB to MSB. RMSR and RMTR are 8- or 16-bit access registers.

9 Closed-Caption Decoder
9.1 Description The MN102H75K/85K contains two identical closed-caption decoder circuits, CCD0 and CCD1. The decoders extract encoded captions from composite video signals. Figure 9-1 provides a block diagram of the decoders, and section 9.3, “Functional Description,” on page 228, describes the circuit’s main blocks: the analog-to-digital converter, clamping circuit, sync separator circuit, data slicer, controller, and sampling circuit. Note that this section describes CCD0, but all descriptions apply to CCD1. Table 9-1 provides the pin names for each decoder.
Closed-Caption Decoder Pin Name
CCD1 CVBS1 VREFLS CLH0 CLL0
9.2 Block Diagram
CVBS
Data extractor (sampling circuit)
RAM
CPU
Figure 9-1 Closed-Caption Decoder Block Diagram
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 227

Functional Description
9.3 Functional Description
9.3.1 Analog-to-Digital Converter
The analog-to-digital converter (ADC) converts the clamped video signal to 8-bit digital data using a 12-MHz sampling clock. Figure 9-2 shows an example con- figuration using the recommended external pin connections. In this example, both caption decoders are used. Figure 9-3 shows the recommended connection when neither decoder is used, and figure 9-4 shows that when only CCD0 is used.
The constants shown in figures 9-2 to 9-4 are recommended values only. Operation at these values is not guaranteed.


CLH (Used as P30)
CVBS0 (Used as P31)
VREFLS
CLL (Used as P33)
Figure 9-4 External Connection with Only CCD1 Unused
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 228
(Used as P32)

Table 9-2 Caption decoder register setting
VBI control ADC control Clamp control
Use two cap- tion decoders
caption 0 ON(PCNT0.bp0=0) ON(PCNT0.bp4=1) (P3MD.bp3,2,1)=(0,1,1)
caption 1 ON(PCNT0.bp1=0) ON(PCNT0.bp5=1)
Use one cap- tion decoder
caption 0 ON(PCNT0.bp0=0) ON(PCNT0.bp4=1) (P3MD.bp3,2,1)=(1,0,1)
no caption 1 OFF(PCNT0.bp1=1) OFF(PCNT0.bp5=0)
No use caption decoder
no caption 0 OFF(PCNT0.bp0=1) OFF(PCNT0.bp4=0) (P3MD.bp3,2,1)=(0,0,0)
no caption 1 OFF(PCNT0.bp1=1) OFF(PCNT0.bp5=0)
9.3.2 Clamping Circuit This block clamps the input video signal (CVBS0, CVBS1).
6.8 kΩ
CVBS0, 1
A/D
CLH
Figure 9-5 Clamping Circuit
The clamping circuit internal to the MN102H75K/85K provides three current sources—high, medium, and low. You can modify these current sources using external resistors R1 and R2. Within the clamping circuit, you can turn each of the current sources on and off in steps. The control bits for these currents are the same for sync tip and pedestal clamping, but the reference and compare levels are dif- ferent. Table 9-3 provides these values for the two types of clamping, and table 9-4 shows how to control the three current levels so that the video signal matches the reference level.
Reference Level Compare Level
Clamping
Type
CCD0 CCD1 CCD0 CCD1
16 (dec) 16 (dec) Output from minimum detection circuit (value in SYNCMIN, x’007EC8’, bits 6-0)
Output from minimum detection circuit (value in SYNCMINW, x’007EE8’, bits 6-0)
Value in PCLV, x’007ECC’
Value in PCLVW, x’007EEC’
Value in SYNCMIN, x’007EC8’, bits 14-8
Value in SYNCMINW, x’007EE8’, bits 14-8

Functional Description
Table 9-4 Current Level Control
Current Source
Low Current Medium Current High Current
Control Conditions
(1) (2) (3) (4) (5) (6)
10 ≤ A Off On Off On Off On
4 ≤ A ≤ 9 Off On Off On Off Off
1 ≤ A ≤ 3 Off On Off
A= 0 Off
-3 ≤ A ≤ -1 On Off
-9 ≤ A ≤ -4 On Off On Off Off Off
A ≤ -10 On Off On Off On Off
Table 9-5 provides the registers used to control and monitor the clamping circuit. See the page number indicated for register and bit descriptions.
CCDO Address
CCD1 Address Description
Register Page
NFSEL 242 x’007EC0’ x’007EE0’ Noise filter select register
SCMING 243 x’007EC4’ x’007EE4’ Minimum sync level detection interval set register
SYNCMIN 244 x’007EC8’ x’007EE8’ Sync and pedestal level register
BPPST 243 x’007EC6’ x’007EE6’ Backporch position register
CLAMP 245 x’007ECC’ x’007EEC ’
CLPCND 1 248 x’007EDC’ x’007EEC ’
Clamping control signal status register 1
9.3.3 Sync Separator Circuit A low-pass filter and a sync separator comprise this block. The sync separator extracts HSYNC and VSYNC from the composite video signal. Figure 9-6 shows a block diagram of the circuit, and table 9-6 provides the registers used to control and monitor it. See the page number indicated for register and bit descriptions.
Clamping control register


MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 231

Functional Description
Table 9-6 Control Registers for Sync Separator Circuit
CCDO Address
CCD1 Address Description
Register Page
SPLV 244 x’007ECA’ x’007EEA’ Sync separator level set register
FQSEL 243 x’007EC2’ x’007EE2’ Frequency select register
HSEP1 246 x’007ECE’ x’007EEE’ HSYNC separator control register 1
HSEP2 246 x’007ED0’ x’007EF0’ HSYNC separator control register 2
HLOCKLV 246 x’007ED4’ x’007EF4’ Sync separator detection control register 1
HDISTW 247 x’007ED6’ x’007EF6’ Sync separator detection control register 2
VCNT 247 x’007ED8’ x’007EF8’ VSYNC separator control register
FIELD 246 x’007ED2’ x’007EF2’ Field detection control register
HVCOND 247 x’007EDA’ x’007EFA’ Sync separator status register
9.3.3.1 HSYNC Separator The HSYNC separator extracts the HSYNC signal from the composite sync signal using the sampling clock generated by the sync separator clock pulse gen- erator. This circuit also secures and interpolates the HSYNC signal.
Error HSYNC resulting from noise Detected HSYNC
Window for securing and interpolating HSYNC
Secured and interpolated HSYNC
As shown in figure 9-7, noise can cause the HSYNC detection circuit to both miss HSYNC pulses and add erroneous ones. The HSYNC separator contains a window circuit to correct these errors. The open and close timing for this window is set in the HSEP1 and HSEP2 registers, and the unit is the sampling clock for the HSYNC separator.
The circuit counts a corrected and interpolated HSYNC signal. If the count is greater than that set in the HLOCKLV register, within the interval set in the HDISTW register, the HLOCK bit of HVCOND sets to 0, indicating an asyn- chronous state. This allows the device to determine the quality of the signal.

9.3.3.2 VSYNC Separator The VSYNC separator extracts the VSYNC signal from the composite signal. Like the HSYNC separator, it contains programmable methods for eliminating noise. The VCNT register contains these settings. Masking the 0H to 127H range (by setting the VSEPSEL bit of VCNT to 0) prevents VSYNC errors due to noise. See figure 9-8.
127H
Figure 9-8 VSYNC Masking
9.3.3.3 Field Detection Circuit The field detection circuit detects the phase difference between VSYNC and HSYNC, based on the setting in the VPHASE[9:0] field of the FIELD register. This setting is in units of the sampling clock for the HSYNC separator. The results of the field detection are stored in the ODDEVEN bit of FIELD.
9.3.4 Data Slicer The data slicer contains the maximum and minimum detection circuits, the slice level calculator, and the slicer. The circuit compares the 8-bit digital values output from the ADC to the slice level, which can be calculated by the hardware or set in the software. It then outputs the results in serial 0s and 1s.
The data slicer calculates the slice level (the level above which a signal is 1 and below which is 0) from the maximum and minimum clock run-in (CRI) pulses occurring in the interval between the settings in the CRI1S and CRI1E registers.
CRI1S
CRI1E
(max + min)/2 of this interval = slice level (computed in the hardware)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 233
Masked · signal · CRI Data

Functional Description
Table 9-7 provides the registers used to control and monitor the data slicer. See the page number indicated for register and bit descriptions.
CCDO Address
CCD1 Address Description
Register Page
CRI1S 240 x’007E10’ x’007E30’ CRI capture start timing control register 1
CRI1E 241 x’007E12’ x’007E32’ CRI capture stop timing control register 1
MAXMIN 238 x’007E02’ x’007E22’ CRI interval maximum and minimum register
SLICE 238 x’007E04’ x’007E24’ VBI data slice level register
FCCNT 237 x’007E00’ x’007E20’ VBI decoding format select register
9.3.5 Controller and Sampling Circuit The control circuit contains the CRI window generator and the caption data window generator. The sampling circuit extracts the 16-bit caption data (503 kHz) from the serial data output from the data slicer at the 12-MHz ADC sampling rate.
Table 9-8 provides the registers used to control and monitor these two blocks. See the page number indicated for register and bit descriptions.
CCDO Address
CCD1 Address Description
Register Page
CRI2S 241 x’007E14’ x’007E34’ CRI capture start timing control register 2
CRI2E 241 x’007E16’ x’007E36’ CRI capture stop timing control register 2
CRIFA 240 x’007E0C’ x’007E2C’ CRI frequency width register A
CRIFB 240 x’007E0E’ x’007E2E’ CRI frequency width register B
DATAS 241 x’007E18’ x’007E38’ Data capture start timing control register
DATAE 242 x’007E1A’ x’007E3A’ Data capture stop timing control register
CAPDATA 239 x’007E0A’ x’007E2A’ Caption data capture register
HNUM 239 x’007E06’ x’007E26’ HSYNC count register

9.3.5.1 CRI Detection for Sampling Clock Generation The decoder captures the caption data on the rising edge of the CRI pulse. To achieve this, it contains a circuit to accurately detect the CRI pulse rises and to generate a data sampling clock.
CRI2S
CRI2E
This interval determines the sampling clock timing. CRI detection
9.3.5.2 Data Capture Control The DATAS and DATAE registers control the data capture timing, and the CAPDATA register stores the caption data captured on the sampling clock gen- erated through CRI detection. The HNUM register controls interrupt timing.
DATAS
DATAE
Figure 9-11 Caption Data Capture Timing
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 235
CRI Data · CRI Data · (Sampling clock) (CRI2S)

9.4 Closed-Caption Decoder Registers All registers in Closed-caption Decoder block cannot be written by byte (by word only). Read by byte is possible.
CCD0 Address
CCD1 Address R/W Description
Register
FCCNT x’007E00’ x’007E20’ R/W VBI decoding format select register
MAXMIN x’007E02’ x’007E22’ R CRI interval maximum and minimum register
SLICE x’007E04’ x’007E24’ R/W VBI data slice level register
HNUM x’007E06’ x’007E26’ R HSYNC count register
ACQ1 x’007E08’ x’007E28’ R/W ACQ capture timing control register 1
CAPDATA x’007E0A’ x’007E2A’ R Caption data capture register
CRIFA x’007E0C’ x’007E2C’ R CRI frequency width register A
CRIFB x’007E0E’ x’007E2E’ R CRI frequency width register B
CRI1S x’007E10’ x’007E30’ R/W CRI capture start timing control register 1
CRI1E x’007E12’ x’007E32’ R/W CRI capture stop timing control register 1
CRI2S x’007E14’ x’007E34’ R/W CRI capture start timing control register 2
CRI2E x’007E16’ x’007E36’ R/W CRI capture stop timing control register 2
DATAS x’007E18’ x’007E38’ R/W Data capture start timing control register
DATAE x’007E1A’ x’007E3A’ R/W Data capture stop timing control register
STAP x’007E1C’ x’007E3C’ R/W Sampling start position register (software setting)
FCPNUM x’007E1E’ x’007E3E’ R Sampling start position register (hardware calculation)
NFSEL x’007EC0’ x’007EE0’ R/W Noise filter select register
FQSEL x’007EC2’ x’007EE2’ R/W Frequency select register
SCMING x’007EC4’ x’007EE4’ R/W Minimum sync level detection interval set register
BPPST x’007EC6’ x’007EE6’ R/W Backporch position register
SYNCMIN x’007EC8’ x’007EE8’ R Sync and pedestal level register
SPLV x’007ECA’ x’007EEA’ R/W Sync separator level set register
CLAMP x’007ECC’ x’007EEC’ R/W Clamping control register
HSEP1 x’007ECE’ x’007EEE’ R/W HSYNC separator control register 1
HSEP2 x’007ED0’ x’007EF0’ R/W HSYNC separator control register 2
FIELD x’007ED2’ x’007EF2’ R/W Field detection control register
HLOCKLV x’007ED4’ x’007EF4’ R/W Sync separator detection control register 1
HDISTW x’007ED6’ x’007EF6’ R/W Sync separator detection control register 2
VCNT x’007ED8’ x’007EF8’ R/W VSYNC separator control register
HVCOND x’007EDA’ x’007EFA’ R Sync separator status register
CLPCND1 x’007EDC’ x’007EFC’ R Clamping control signal status register 1
SBFNUM x’007F4C’ x’007F6C’ R Sampling start position register
TESTA x’007F4E’ x’007F6E’ R Test register

FCCNT: VBI Decoding Format Select Register x’007E00’ (FCCNTW x’007E20’)
SYNC
HCNT
HCNT
SLICE
SLICE
SLICE
SLICE
SLPU
CRIC
NCRI
CNT STAP4
CNT STAP3
CNT STAP2
CNT STAP1
CNT STAP0
For designs using the closed-cap- tion decoder, always tie the FCCNT register to x’0008’.
SEL1
SEL0
SEL
LD2
LD1
LD0
L SEL
SEL
G SEL
Reset: 0 1 0 0 0
R/W: R/W
This register contains the settings for selecting either a hardware or soft- ware slice level and for setting the data capture format. When you do not use a bit or field in this register, tie it to the setting indicated below.
Tie this bit to 0.
When this field is unused, tie it to b’00’.
0: Select hardware calculation 1: Select software setting
SLICELD[2:0]: Slice level load timing select
When this field is unused, tie it to b’000’.
0: Detect 0 to 1 transitions 1: Detect 1 to 0 transitions
CRICSEL: Detection interval select for the CRI frequency width
0: Disable the CRI capture interval 1: Enable the CRI capture interval
CNTSTAP[4:0]: Caption data sampling start position
The higher the setting in this field, the later the start position. The valid range is x’00’ to x’1F’.

MAXMIN: CRI Interval Maximum and Minimum Register x’007E02’ (MAXMINW x’007E22’)
MAX7 MAX6 MAX5 MAX4 MAX3 MAX2 MAX1 MAX0 MIN7 MIN6 MIN5 MIN4 MIN3 MIN2 MIN1 MIN0
Reset: 0 1
R/W: R
Valid range: x’00’ to x’FF’
MIN[7:0]: Minimum value during the CRI interval
Valid range: x’00’ to x’FF’
SLICE: VBI Data Slice Level Register x’007E04’ (SLICEW x’007E24’)
7 SLSF
6 SLSF
5 SLSF
4 SLSF
3 SLSF
2 SLSF
1 SLSF
0 SLHD
7 SLHD
6 SLHD
5 SLHD
4 SLHD
3 SLHD
2 SLHD
1 SLHD
Reset:
R/W: R/W R
Valid range: x’00’ to x’FF’
SLHD[7:0]: VBI data slice level—hardware calculation
Valid range: x’00’ to x’FF’
MUX
SLSF
SLICESEL
Figure 9-12 SLSF and SLHD Multiplexing
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 238

HNUM: HSYNC Count Register x’007E06’ (HNUMW x’007E26’)
VBI-
VBI-
VBI-
VBI-
SB FLAG — — HNU
HNU
HNU
HNU
HNU
IRQ
IRQ
IRQ
IRQ
IRQ
M4
M3
M2
M1
M0
Reset: 0 0 0 1 0
R/W: R/W R/W R
This register allows you to time the interrupt occurring after the line 21 data capture to a line other than line 21.
In this field, set the H line number, from 0 to 25, for the VBI interrupt. You must set this field to x’13’ or higher.
0: No start bit detected 1: Start bit detected
HNUM[4:0]: HSYNC count during the VBI interval
This field indicates the H line number, from 0 to 25.
For designs using the closed-cap- tion decoder, always tie the ACQ1 register to x’1312’.
ACQ1
ACQ1
ACQ1
ACQ1
E0 — — — ACQ1
ACQ1
ACQ1
ACQ1
ACQ1
E4
E3
E2
E1
S4
S3
S2
S1
S0
Reset: 0 0 0 1 0 0 0 1
R/W: R/W R/W R/W R/W
Valid range: x’00’ to x’25’
ACQ1S[4:0]: Start position for ACQ capture 1
Valid range: x’00’ to x’25’
CAPDATA: Caption Data Capture Register x’007E0A’ (CAPDATAW x’007E2A’)
CAP DA14
CAP DA13
CAP DA12
CAP DA11
CAP DA10
CAP DA9
CAP DA8
CAP DA7
CAP DA6
CAP DA5
CAP DA4
CAP DA3
CAP DA2
CAP DA1
CAP DA0
Reset: 0
R/W: R
This register stores the 16-bit captured caption data.
![Page 241 of the Lucent Technologies Telephone (MN102H75K) user manual — CRI1S[10:0]: Start position for CRI capture 1](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-241.webp?w=400)
CRIFA: CRI Frequency Width Register A x’007E0C’ (CRIFAW x’007E2C’)
CRI2 FQW6
CRI2 FQW5
CRI2 FQW4
CRI2 FQW3
CRI2 FQW2
CRI2 FQW1
CRI2 FQW0
CRI1 FQW7
CRI1 FQW6
CRI1 FQW5
CRI1 FQW4
CRI1 FQW3
CRI1 FQW2
CRI1 FQW1
CRI1 FQW0
Reset: 0
R/W: R
The CRIFA and CRIFB registers store the CRI cycles from rising edge to rising edge, for monitoring whether the CRIs were detected correctly dur- ing this period.
This field indicates the width, in clock units, from the second to the third rising edge after the CRI.
This field indicates the width, in clock units, from the first to the second rising edge after the CRI.
CRI4 FQW6
CRI4 FQW5
CRI4 FQW4
CRI4 FQW3
CRI4 FQW2
CRI4 FQW1
CRI4 FQW0
CRI3 FQW7
CRI3 FQW6
CRI3 FQW5
CRI3 FQW4
CRI3 FQW3
CRI3 FQW2
CRI3 FQW1
CRI3 FQW0
Reset: 0
R/W: R
This field indicates the width, in clock units, from the fourth to the fifth ris- ing edge after the CRI.
This field indicates the width, in clock units, from the third to the fourth rising edge after the CRI.
10 CRI1S
9 CRI1S
8 CRI1S
7 CRI1S
6 CRI1S
5 CRI1S
4 CRI1S
3 CRI1S
2 CRI1S
1 CRI1S
Reset: 0 1
R/W: R/W R/W
Valid range: x’000’ to x’7FF’
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 240

CRI1E: CRI Capture Stop Timing Control Register 1 x’007E12’ (CRI1EW x’007E32’)
10 CRI1E
9 CRI1E
8 CRI1E
7 CRI1E
6 CRI1E
5 CRI1E
4 CRI1E
3 CRI1E
2 CRI1E
1 CRI1E
Reset: 0 1
R/W: R/W R/W
Valid range: x’000’ to x’7FF’
CRI2S: CRI Capture Start Timing Control Register 2 x’007E14 (CRI2SW x’007E34’)
10 CRI2S
9 CRI2S
8 CRI2S
7 CRI2S
6 CRI2S
5 CRI2S
4 CRI2S
3 CRI2S
2 CRI2S
1 CRI2S
Reset: 0 1
R/W: R/W R/W
Valid range: x’000’ to x’7FF’
CRI2E: CRI Capture Stop Timing Control Register 2 x’007E16’ (CRI2EW x’007E36’)
10 CRI2E
9 CRI2E
8 CRI2E
7 CRI2E
6 CRI2E
5 CRI2E
4 CRI2E
3 CRI2E
2 CRI2E
1 CRI2E
Reset: 0 1
R/W: R/W R/W
Set this field so that the last CRI rising edge is included. The valid range is x’000’ to x’7FF’.
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
—
S 9
S 8
S 7
S 6
S 5
S 4
S 3
S 2
S 1
S 0
Reset: 0 1
R/W: R/W R/W
Set this field to the same start position as that for CRI detection (set in CRI2S). The valid range is x’000’ to x’7FF’.

DATAE: Data Capture Stop Timing Control Register x’007E1A’ (DATAEW x’007E3A’)
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
—
E 9
E 8
E 7
E 6
E 5
E 4
E 3
E 2
E 1
E 0
Reset: 0 1
R/W: R/W R/W
Set this value high enough to allow the last data to be captured. The valid range is x’000’ to x’7FF’.
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
SFT STAP
—
Reset: 0 1
R/W: R/W R/W
FCPNUM: Sampling Start Position Register (Hardware Calculation) x’007E1E’ (FCPNUMW x’007E3E’)
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
FCP NUM
—
Reset: 0
R/W: R
NFSEL: Noise Filter Select Register x’007EC0’ (NFSELW x’007EE0’)
— MING — NFSW
Reset: 0
R/W: R/W R/W R/W
This register selects the low-pass filter, which eliminates noise and high- frequency signals that are unnecessary to the sync separator and the clamp- ing controller. The recommended setting for NFSEL is x’0000’.
The cutoff frequencies for low-pass filters 1 to 4 are lower in ascending order, so that low-pass filter 4 eliminates the highest amount of noise.
![Page 244 of the Lucent Technologies Telephone (MN102H75K) user manual — BPPST[8:0]: Backporch start position for the leading edge of HSYNC](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-244.webp?w=400)
FQSEL: Frequency Select Register x’007EC2’ (FQSELW x’007EE2’)
VFQ DIV4
VFQ DIV3
VFQ DIV2
VFQ DIV1
VFQ DIV0 — — — — FQ DIV3
FQ DIV2
FQ DIV1
FQ DIV0
Reset: 0 0 1 0 1
R/W: R R R/W R/W R/W R/W R/W
In this register, set the sampling cycle for separating the HSYNC and VSYNC signals from the composite sync signal. The recommended setting is x’1F01’.
In this field, set the ratio by which to divide the sampling frequency for the HSYNC separator.
In this field, set the ratio by which to divide the A/D sampling frequency.
SC MING
SC MING
SC MING
SC MING
SC MING
SC MING
SC MING
SC MING
SC MING
—
Reset: 0 1 1 0
R/W: R/W R/W
Set the HSYNC cycle in this field in ADC clock units. This is the interval used for detecting the sync tip level for sync tip clamping. The valid range is x’000’ to x’3FF’. Note that the HSYNC cycle set in this register is only used for detecting the minimum sync level. You must also set the correc- tion HSYNC cycle in HSEP1.
For the NTSC format, the setting for this register is x’02FA’, calculated as follows:
(A/D sampling frequency) × (HSYNC cycle) = 12 MHz × 63 µs = x’02FA’
— BP PST8
BP PST6
BP PST5
BP PST4
BP PST3
BP PST2
BP PST1
BP PST0
Reset: 0 1 0 0
R/W: R/W R/W
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 243

Use this register to specify the position for capturing the pedestal level value used during pedestal clamping. Specify a number of ADC clocks after the leading edge of HSYNC. The valid range is x’000’ to x’1FF’, and the recommended setting is x’003C’.
Set this interval in BPPST
Pedestal level for BPLV register
SYNCMIN: Sync and Pedestal Level Register x’007EC8’ (SYNCMINW x’007EE8’)
— BPLV6 BPLV5 BPLV4 BPLV3 BPLV2 BPLV1 BPLV0 — SYNC
SYNC
SYNC
SYNC
SYNC
SYNC
MIN6
MIN5
MIN4
MIN3
MIN2
MIN1
MIN0
Reset: 0
R/W: R
This register stores the pedestal level captured from the position specified in BPPST.
This field stores the minimum level (the sync tip level) detected during the interval set in the SCMING register. For sync tip clamping, you should control clamping so as to make this value 16 (dec).
— — BSP5 BSP4 BSP3 BSP2 BSP1 BSP0 — — PSP5 PSP4 PSP3 PSP2 PSP1 PSP0
Reset: 0 0 0 1 1 0 1 1 0 0 0
R/W: R R R/W R R R/W
The sync separator uses the value set in this register to separate the com- posite sync signal from the composite video signal.
Setting for sync separator level
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 244
Video signal · Video signal · Composite sync processing

MUX
BSP
CLMODE
Figure 9-15 BSP and PSP Multiplexing
BSP[5:0]: Sync separator level for pedestal clamping
Sync separator level = (sync tip level/2) + BSP[5:0]. The valid range is x’00’ to x’3F’.
Valid range: x’00’ to x’3F’
CLAMP: Clamping Control Register x’007ECC’ (CLAMPW x’007EEC’)
CL MODE
— PCLV6 PCLV5 PCLV4 PCLV3 PCLV2 PCLV1 PCLV0 SAFE — — VBI
Reset: 0 1 0
R/W: R R/W R R R/W R R R/W R/W
Use this register to set the clamping mode (sync tip or pedestal clamping).
Set the reference level for pedestal clamping in this field. The valid range is x’00’ to x’7F’.
0: VBI off 1: VBI on
SAFE: Clamping current source select
This bit is the capacity switch for (5) and (6) in figure 9-5 on page 229.

HSEP1: HSYNC Separator Control Register 1 x’007ECE’ (HSEP1W x’007EEE’)
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
HS FREQ
—
Reset: 0 1 0 1 1 0 0
R/W: R/W R/W
Set the correction HSYNC cycle in this field in HSYNC separator sam- pling clock units. The valid range is x’000’ to x’7FF’, and the recom- mended setting is x’010C’.
H CLOSE
H CLOSE
H CLOSE
H CLOSE
H CLOSE
H CLOSE
H CLOSE
H CLOSE
H CLOSE
—
E8
E7
E6
E5
E4
E3
E2
E1
E0
Reset: 0 1 1 1 0 0 1 0 0
R/W: R/W R/W
Set the position in HSYNC separator sampling clock units. The valid range is x’000’ to x’3FF’, and the recommended setting is x’00E4’.
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
V PHASE
Reset: 0 1 0
R/W: R/W R/W
0: Odd field 1: Even field
VPHASE[9:0]: Phase difference setting for VSYNC and HSYNC
Set the phase difference in HSYNC separator sampling clock units. The valid range is x’000’ to x’3FF’.
H LOCK
H LOCK
H LOCK
H LOCK
H LOCK
H LOCK
H LOCK
H LOCK
—
Reset: 0 1 0 0 0
R/W: R/W R/W
This value is compared to the count of the corrected HSYNC. The valid range is x’000’ to x’1FF’, and the recommended setting is x’0008’.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 246

HDISTW: Sync Separator Detection Control Register 2 x’007ED6’ HDISTWW x’007EF6’)
HDIST
HDIST
HDIST
HDIST
HDIST
HDIST
HDIST
HDIST
W8
W7
W6
W5
W4
W3
W2
W1
W0
Reset: 0 1 0
R/W: R/W R/W
In this register, set the interval during which sync separation occurs. The valid range is x’000’ to x’1FF’ and the recommended setting is x’0100’. For NTSC format, set the register to 525 (dec), indicating an HSYNC count of 525 VSYNC cycles. The recommended setting is x’0100’.
SEL — — — — — VSEP LMT2
VSEP LMT1
VSEP LMT0
Reset: 0 1 0 1
R/W: R/W R/W R/W R/W
0: 0H to 127H VSYNC separation mask 1: No mask
VSEPLMT[2:0]: VSYNC separation detection threshold
HVCOND: Sync Separator Status Register x’007EDA’ (HVCONDW x’007EFA’)
SY VSEP HSEP HLOCK
Use this register to monitor the status of the sync separator.
COMPSY: Composite sync signal status
VSEP: VSYNC signal status
HSEP: HSYNC signal status
HLOCK: Sync detection
0: Asynchronous 1: Synchronous
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 247
![Page 249 of the Lucent Technologies Telephone (MN102H75K) user manual — SLICE[7:0]: Slicing value (either from hardware calculation or software setting)](/cdn/reader/6d/6d48d77814bbef9dce6d1ee38fe7321e9d4348e1317cc5474f90b2407e0cf4c1/images/page-249.webp?w=400)
CLPCND1: Clamping Control Signal Status Register 1 x’007EDC’ (CLPCNDW x’007EFC’)
— SAFEP SAFE
XPE DOWN
PED
PE DOWN
UP
UP
Reset: 0 1 0 1 0 1 0 1 0
R/W: R
This register is for monitoring the status of the clamping current source switch shown in figure 9-5 on page 229. An N-channel transistor is on when the associated bit (PEDOWN, XPEDOWN, CLPN, or SAFEN) is 1. A P-channel transistor is on when the associated bit (PEDUP, XPEDUP, CLPP, or SAFEP) is 0.
SAFEN: Low clamping control pulse for high current source (N-channel)
CLPP: High clamping control pulse for high current source (P-channel)
CLPN: High clamping control pulse for high current source (N-channel)
XPEDUP: Clamping control pulse for medium current source (P-channel)
XPEDOWN: Clamping control pulse for medium current source (N-channel)
PEDUP: Clamping control pulse for low current source (P-channel)
PEDOWN: Clamping control pulse for low current source (N-channel)
SBFNUM: Sampling Start Position Register x’007E4C’ (SBFNUMW x’007E6C’)
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
SBF NUM
—
Reset: 0
R/W: R
TESTA: Test Register x’007E4E’ (TESTA x’007E6E’)
7 SLICE
6 SLICE
5 SLICE
4 SLICE
3 SLICE
2 SLICE
1 SLICE
0 DATA
G CRI2G CRI1G ACQG SLD SAMP FCPIN FCP SLD
Reset: 0
R/W: R
DATAG: Data window (for capturing the caption data)
CRI2G: CRI window 2 (for detecting the sampling cycle position)
CRI1G: CRI window 1 (for calculating the maximum and minimum values)
ACQG: ACQ window (for setting the H interval for data detection)
SLDSAMP: Caption data sampling pulse
FCPIN: Start position for start bit detection (software setting)
FCP: Start position for start bit detection (hardware calculation)
SLD: Sliced data from the CVBS input signal
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 248

10 Pulse Width Modulator
10.1 Description
The MN102H75K/85K contains seven 8-bit pulse width modulators (PWMs) with a minimum pulse width of 16/fSYSCLK and an output waveform cycle of 212/fSYSCLK. (With a 4-MHz oscillator, 16/fSYSCLK = 1.33 µs (8 µs for SLOW mode) and 212/fSYSCLK = 341.3 µs (2 ms for SLOW mode).)
For information on the SLOW mode, see section 3.1, “CPU Modes.”
The PWM ports are 3.3-volt, open-drain outputs. To enable the PWM ports, either turn the pullup registers on using the pullup control registers for the asso- ciated ports (P15-P17 and P20-P23; see table 10-1) or connect external pullup resistors to these ports.
PWM Block Register Bit No. Setting
1 PWM1 6
PWM2 7
PWM3
1 PWM4 1
PWM5 2
PWM6 3
The microcontroller writes the pulsewidth modulated data for a PWM block to its associated 8-bit data register (PWMn). The data register settings determine how long the waveform stays low. With a 4-MHz oscillator, the PWM output pulse width has a resolution of 1.33 µs (1/fPWM) and a cycle of 341.3 µs (28/fPWM). Note that when (and only when) the data changes between x’00’ and x’01’, the resolution is 1.34 µs (2/fPWM).
341.3 µs (2 ms for SLOW mode)
1.33 µs (8 µs for SLOW mode)
FF
Figure 10-1 PWM Output Waveform
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 249

Block Diagram
10.2 Block Diagram
7 6 5 1 0 PWM0 - PWM6 x'007E70' - x'007E7C'
PWMn (P15 - P17, P20 - P23)
DAC output I/O control fPWM
Not using internal pullup func- tion,Figuer10-2 connect the external pullup registance
10.3 PWM Data Registers All registers in PWM function cannot be written by byte (be word only). Read by byte is possible. Bits 7 to 0 of each of the seven PWM data registers (PWM0 to PWM6) hold the 8-bit pulsewidth modulated data to be written to the PWMs. The registers reset to 0, and they set to 1 when PWM output is high.
PWMn7 PWMn6 PWMn5 PWMn4 PWMn3 PWMn2 PWMn1 PWMn0

11 I/O Ports
11.1 Description The MN102H75K/85K contains 50 pins that form general-purpose I/O ports. Ports 0, 1, 2, 3, 4, and 5 are 8-bit ports, and port 6 is a 2-bit port. All of these pins have alternate functions. (Ports 7 and 8 are only available with the quad flat package.)
Port Associated Pins
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 251

11.2 I/O Port Circuit Diagrams
0: P00/IRQ0 1: RMIN/IRQ0
P0MD0
P0IN0
RMIN
IRQ0
Figure 11-1 P00/RMIN/IRQ0 (Port 0)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 252
Pin · Schmidt trigger

Figure 11-2 P03/ADIN0 to P07/ADIN4 (Port 0)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 253

ADIN5, ADIN6, ADIN7
Figure 11-3 P10/ADIN5/IRQ1, P11/ADIN6/IRQ2, and P12/ADIN7/IRQ3 (Port 1)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 254

ADIN8, ADIN9
Figure 11-4 P13/ADIN8/WDOUT and P14/ADIN9/STOP (Port 1)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 255

Figure 11-5 P15/ADIN10/PWM0 and P16/ADIN11/PWM1 (Port 1)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 256

U
X PWM2, PWM3, PWM4,
PWM5, PWM6
U
Figure 11-6 /PWM2 (Port 1), P20/PWM3, P21/PWM4, P22/PWM5, and P23/PWM6 (Port 2)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 257

00: P24 01: SBT1 10: TM4IC
P2MD8
P2MD9
P2IN4
TM4IC input SBT1 input
To use as SBT1,set P2MD8 and P2MD9 to 0.
Pin · SBT1 output · Schmidt trigger

0: P27 1: TM0IO
P2MD14
M
U
P2IN7
Figure 11-8 P27/TM0IO (Port 2)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 259
Pin · TM0IO output · TM0IO input

U
ROUT, GOUT, BOUT, YMOUT (Digital output)
DAROUT, DAGOUT, DABOUT, DAYMOUT (DAC output)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 260

00: P25 01: SBI1,SBD1
M
SIFSEL1
P2OUT5
P25/ SBI1/ SBD1/ TM4IOB
U
SBO1
P2IN5
(PCNT0) bit 13 ODASCI1
P2MD13
M
U
SBO1 (PCNT0) bit 13 ODASCI1
U
P2IN6
Figure 11-10 P25/TM4IOB/SBI1/SBD1 and P26/TM4IOA/SBO1 (Port 2)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 261

0: P55 1: SBO0
P5MD5
1 M
P5OUT5
P55/ SBO0
P5IN5
SBI0
0: P56 1: SBI0/SBD0 P5MD6
(PCNT0) bit 10 SIFSEL0
SBO0
0 P5OUT6
P56/ SBI0/ SBD0
P5IN6
Figure 11-11 P55 and P56 (Port 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 262

0: P57 1: SBT0
P5MD7
P5IN7
Figure 11-12 P57/SBT0 (Port 5)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 263
SBT0 output · SBT0 input · Schmidt trigger

0: P02 1: SCL1
P0MD2
M
P02/ SCL1
U
P0IN2
I2CSEL1
I2CSEL0
0: P61 1: SCL0
P6MD1
M
P61/ SCL0
U
P6IN1
Figure 11-13 P02/SCL1 (Port 0) and P61/SCL0 (Port 6)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 264

0: P01 1: SDA1
P0MD1
M
P01/ SDA1
U
P0IN1
I2CSEL1
I2CSEL0
0 : P60 1 : SDA0
P6MD0
M
P60/ SDA0
U
P6IN0
Figure 11-14 P01/SDA1 (Port 1) and P60/SDA0 (Port 6)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 265

Figure 11-15 P31/CVBS0 and P32/CVBS1 (Port 3)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 266

P3MD2
P3MD3
Figure 11-16 P30/CLH and P33/CLL (Port 3)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 267

0: P34 1: VREF
P3MD4
P34/VREF
P3IN4
VREF
Figure 11-17 P34/VREF (Port 3)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 268
Pin

U
TM1IO output, TM5IOA output,
TM1IO input, TM5IOA input,
0: P44 1: TM5IC/HI1
P4MD4
P44/ TM5IC/ HI1
Figure 11-19 P44/TM5IC/HI1 (Port 4)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 269

0: P45 1: OSDXI
P4OUT5
P4IN5
P45/OSDXO
LCCNT is the OSDXI/O oscillation control signal from the OSD. 0: Disable 1: Enable
0: P45/P46 1: OSDXI/OSDXO
P4MD5
P46/OSDXI
P4IN6
Figure 11-20 P45/OSDXO and P46/OSDXI (Port 4)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 270
To internal circuit · Pin · Pin

0: P47 1: HSYNC
P4MD7
P47/HSYNC
P4IN7
HSYNC
Figure 11-21 P47/HSYNC (Port 4)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 271
Schmidt trigger

0: P50 1: SYSCLK
P5MD0
M
SYSCLK or divided SYSCLK output
X P50/SYSCLK
P5IN0
Figure 11-22 P50/SYSCLK (Port 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 272
Pin

0: P51 1: YS
P5MD1
M
U
P51/YS
YSOUT
P5IN1
Figure 11-23 P51/YS (Port 5)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 273
Pin

0: P52 1: IRQ4/VI0
P5MD2
P52/IRQ4/VI0
P5IN2
IRQ4/VI0
Figure 11-24 P52/IRQ4/VI0 (Port 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 274
Schmidt trigger

P53/ RST
P5IN3/ NTGTRST
Figure 11-25 P53/RST (Port 5)
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 275
Pin · Schmidt trigger

0: P54/IRQ5 1: IRQ5/VSYNC
P5MD4
P54/IRQ5/VSYNC
P5IN4
IRQ5
VSYNC
Figure 11-26 P54/IRQ5/VSYNC (Port 5)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 276
Schmidt trigger

11.3 I/O Port Control Registers
P0PUP–P5PUP: Ports 0–5 Pullup Resistor Control Registers x’00FFB0’–x’00FFB5’ P7PUP–P8PUP: Ports 7–8 Pullup Resistor Control Registers x’00FFB8’–x’00FFBA’
Do not activate the pullup resis- tors when the pins are in output mode. This will cause incorrect output voltage levels and increase power and current con- sumption.
PnPUP7 PnPUP6 PnPUP5 PnPUP4 PnPUP3 PnPUP2 PnPUP1 PnPUP0
The PnPUP registers control the port pullup resistors. The bit number cor- responds to the associated pin number. For instance, P0PUP7 applies to the P07 pin. These are 8-bit access registers.
P7OUT–P8OUT: Ports 7–8 Output Control Registers x’00FFC8’–x’00FFCA’
PnOUT7 PnOUT6 PnOUT5 PnOUT4 PnOUT3 PnOUT2 PnOUT1 PnOUT0
Writing a 0 to P5OUT3 causes a reset to occur.
The PnOUT registers contain the port output data. The bit number corre- sponds to the associated pin number. For instance, P0OUT7 applies to the P07 pin. These are 8-bit access registers.

P0IN–P5IN: Ports 0–5 Input Registers x’00FFD0’–x’00FFD5’ P7IN–P8IN: Ports 7–8 Input Registers x’00FFD8’–x’00FFDA’
PnIN7 PnIN6 PnIN5 PnIN4 PnIN3 PnIN2 PnIN1 PnIN0
The PnIN registers contain the port input data. The bit number corresponds to the associated pin number. For instance, P0IN7 applies to the P07 pin. These are 8-bit access registers.
When using P57 as a port, set SIFSEL0 (PCNT0 x’FF90’ bp12) to ’0’.
PnDIR7 PnDIR6 PnDIR5 PnDIR4 PnDIR3 PnDIR2 PnDIR1 PnDIR0
The PnDIR registers control the I/O direction of the ports. The bit number corresponds to the associated pin number. For instance, P0DIR7 applies to the P07 pin. These are 8-bit access registers.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 278

P0MD: Port 0 Output Mode Register x’00FFF0’
P0MD is an 8-bit access register.
0: P07 1: ADIN4
P0MD6: P06 function switch
0: P06 1: ADIN3
P0MD5: P05 function switch
0: P05 1: ADIN2
P0MD4: P04 function switch
0: P04 1: ADIN1
P0MD3: P03 function switch
0: P03 1: ADIN0
P0MD2: P02 function switch
0: P02 1: SCL1
P0MD1: P01 function switch
0: P01 1: SDA1
P0MD0: P00 output switch
Control the IRQ0 interrupt enable settings in the interrupt control registers.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 279

P1MD: Port 1 Output Mode Register x’00FFF2’
14 P1MD
13 P1MD
12 P1MD
11 P1MD
10 P1MD
9 P1MD
8 P1MD
7 P1MD
6 — P1MD
4 — P1MD
2 — P1MD
Reset: 0
R/W: R R/W R R/W R R/W R R/W
P1MD is a 16-bit access register.
0: P17 1: PWM2
P1MD[13:12]: P16 output and function switch
00: P16 01: ADIN11 10: PWM1 11: Reserved
P1MD[11:10]: P15 output and function switch
00: P15 01: ADIN10 10: PWM0 11: Reserved
P1MD[9:8]: P14 output and function switch
00: P14 01: ADIN9 10: STOP 11: Reserved
P1MD[7:6]: P13 output switch
00: P13 01: ADIN8 10: WDOUT 11: Reserved
P1MD4: P12 function switch
0: P12/IRQ3 1: ADIN7
P1MD2: P11 function switch
0: P11/IRQ2 1: ADIN6
P1MD0: P10 function switch
Control the IRQ3, IRQ2, and IRQ1 interrupt enable settings in the inter- rupt control registers.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 280

P2MD: Port 2 Output Mode Register x’00FFF4’
14 P2MD
13 P2MD
12 P2MD
11 P2MD
10 P2MD
9 P2MD
8 — P2MD
6 — P2MD
4 — P2MD
2 — P2MD
Reset: 0
R/W: R R/W R R/W R R/W R R/W R R/W
P2MD is a 16-bit access register.
To use TM0IO as an output pin, set this bit to 1 and set the P2DIR7 bit to 1.
P2MD[13:12]: P26 output and function switch
To use TM4IOA as an output pin, set this field to b’01’ and set the P2DIR6 bit to 1.
P2MD[11:10]: P25 output and function switch
If you set this field to b’10’, select SBI1 or SBD1 in bit 11 of PCNT0. To use TM4IOB as an output pin, set this field to b’01’ and set the P2DIR5 bit to 1.
P2MD[9:8]: P24 output and function switch
To use SBT1 as an input, set this field to b’00’ and set the P2DIR4 bit to 0.
P2MD6: P23 output switch
0: P23 1: PWM6
P2MD4: P22 output switch
0: P22 1: PWM5
P2MD2: P21 output switch
0: P21 1: PWM4
P2MD0: P20 output switch
0: P20 1: PWM3
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 281

P3MD: Port 3 Output Mode Register x’00FFF6’
P3MD is an 8-bit access register.
If you set this field to 1, select DABOUT or B in the RGBC bit of ODS1.
P3MD6: P36 output switch
If you set this field to 1, select DAGOUT or G in the RGBC bit of ODS1.
P3MD5: P35 output switch
If you set this field to 1, select DAROUT or R in the RGBC bit of ODS1.
P3MD4: P34 function switch
0: P34 1: V REF
P3MD[3:1]: P33-P30 function switch
Set P3MD3 to 1 only when P3MD[2:1] is 01; otherwise, set it to 0.
P3MD0
This bit exists, but contains no function.

P4MD: Port 4 Output Mode Register x’00FFF8’
P4MD is an 8-bit access register.
0: P47/NHSYNC 1: NHSYNC
P4MD6
This bit exists, but contains no function.
To use P45 or P46, set the OSCSEL[1:0] field of OSD1 to b’00’.
P4MD4: P44 output switch
0: P44/TM5IC/HI0 1: TM5IC/HI0
P4MD3: P43 output switch
To use TM5IOB as an output pin, set this bit to 1 and set the P4DIR3 bit to 1.
P4MD2: P42 output switch
To use TM5IOA as an output pin, set this bit to 1 and set the P4DIR2 bit to 1. 0: P42 1: TM5IOA
To use TM1IO as an output pin, set this bit to 1 and set the P4DIR1 bit to 1.
P4MD0: P40 output switch
If you set this bit to 1, select DAYMOUT or YM in the YCNT bit of ODS1.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 283

P5MD: Port 5 Output Mode Register x’00FFFA’
Reset: 0 R/W: R/W
P5MD is an 8-bit access register.
To use SBT0 as an input pin, set this field to 0 and set the P5DIR7 bit to 0.
P5MD6: P56 output switch
If you set this bit to 1, select SBI0 or SBD0 in the bit 10 of PCNT0.
P5MD5: P55 output switch
0: P55 1: SBO0
P5MD4: P54 function switch
0: P54/IRQ5/VSYNC 1: IRQ5/VSYNC
P5MD3
This bit exists, but contains no function.
0: P52/IRQ4/VI0 1: IRQ4/VI0
P5MD1: P51 output switch
0: P51 1: YS
P5MD0: P50 output switch
If you set this bit to 1, set the SYSCLK frequency in bits [15:14] of PCNT0.
P6MD: Port 6 Output Mode Register x’00FFFC’
Reset: 0 R/W: R/W R/W
P6MD is an 8-bit access register.
0: P61 1: SCL0
P6MD0: P60 function switch
0: P60 1: SDA0
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 284

PCNT0: Port Control Register 0 x’00FF90’
SCLK
OD ASCI1
OD ASCI0
SIF SEL1
SIF SEL0
I2C SEL1
I2C SEL0
OSD POFF
PLL POFF
ADC1
ADC0
HCNT
RMC
VBI1
VBI0
F1
F0
ON
ON
OFF
OFF
OFF
OFF
Reset: 0
R/W: R/W
PCNT0 is a 16-bit access register.
Enable PWM (set PCNT1 bit 1 to 1) if you are outputting fSY-
SCLK/214.
1: Push-pull 0: Open-drain
ODASCI0: Serial port 0 output switch
To use P57 as a port, set this bit to 0.
SIFSEL1: Serial port 1 interface select
0: Three-line (enable SBI1, SBO1, SBT1) 1: Two-line (enable SBD1, SBT1)
SIFSEL0: Serial port 0 interface select
0: Three-wire (enable SBI0, SBO0, SBT0) 1: Two-wire (enable SBD0, SBT0)
I2CSEL1: SDA1, SCL1 enable
0: Disable 1: Enable
To use P01/SDA1 and P02/SCL1 as general-purpose port pins, you must both select the ports in the port mode register and disable this bit.
0: Disable 1: Enable
To use P60/SDA0 and P61/SCL0 as general-purpose port pins, you must both select the ports in the port mode register and disable this bit.

OSDPOFF: OSD circuit enable
Setting this bit to 0 shuts off the system clock supply to the OSD block, reducing power dissipation. The program must write a 1 to this bit before writing any values to the OSD registers.
To turn off the OSD block to save power: 1. Write a 0 to OSD (OSD1, bit 10). 2. Wait for the next VSYNC input. 3. Write a 0 to OSDPOFF (PCNT0, bit 7), turning the clock off. If you turn the clock off before the VSYNC input, power usage may not drop or the microcontroller may halt.
PLLPOFF: PLL circuit enable
0: Enable 1: Stop
ADC1ON: ADC circuit enable for closed-caption decoder 1
0: Disable 1: Enable
ADC0ON: ADC circuit enable for closed-caption decoder 0
0: Disable 1: Enable
HCNTOFF: H counter circuit enable
0: Enable 1: Disable
RMCOFF: IR remote signal receiver circuit enable
0: Enable 1: Disable
VBI1OFF: Closed-caption decoder 1 circuit enable
0: Enable 1: Disable
VBI0OFF: Closed-caption decoder 0 circuit enable
0: Enable 1: Disable
Setting the HCNTOFF, RMCOFF, VBI1OFF, or VBI0OFF bits to 1 shuts off the system clock supply to the associated block, which reduces power dissipation.

PCNT2: Port Control Register 2 x’00FF92’
— P7P8 CNT (Test Bits) I2C OFF
OSD REGE
OFF
Reset: 0
R/W: R/W R/W
Ports 7 and 8 are only available in the quad flat package.
Always set bits 7 to 3 of PCNT2 to 0.
0: Enable 1: Disable
PWMOFF: PWM function enable
0: Enable 1: Disable
You cannot read from or write to the registers associated with a function that is disabled.
Setting the I2COFF or PWMOFF bits to 1 shuts off the system clock sup- ply to the associated block, which reduces power dissipation.
To read or write to the OSD registers, you must first set this bit to 1.
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 287

Description
12 ROM Correction
12.1 Description The ROM correction function can correct the program data in any address within the 256-kilobyte ROM. (It cannot correct OSD ROM data.) A maximum of sixteen addresses can be corrected. Addresses are set as address match interrupts. This function shortens time-to-market for large-scale designs, since changes can be implemented in the software after the mask ROM is complete.
The ROM correction function has numerous other applications. For instance, you can insert keywords into the functional routines, then use the function to send internal status information to an external location. This enables system-level examination of the internal status even with the mask ROM version.
To use the ROM correction function, embed a routine such as that shown in figure 12-2 in the ROM.
ROM
Necessary software settings Yes
Set up the correction data
Enable the correction function
Main
Figure 12-1 ROM Area Schematic Diagram Figure 12-2 ROM Correction Flow
As figure 12-1 shows, the function lies between the microcontroller and ROM blocks. First set the correction data for any sixteen non-OSD addresses in the ROM correction address match and data registers. (Follow the flow shown in figure 12-2.) Once this is done, the circuit will correct the ROM output for the designated addresses.

12.2 Block Diagram Figure 12-3 is a block diagram of the ROM correction circuit. A match detection circuit constantly monitors the ROM address specified by the CPU instruction pointer (IP). When the value matches a correction address, the circuit replaces the data output from the ROM with the data in the appropriate correction data register. It then sends the corrected data to the CPU.
Figure 12-3 ROM Correction Block Diagram
12.3 Programming Considerations At reset, the ROM correction address match and data registers contain all 0s. Since a reset also disables ROM correction (in ROMCEN), the ROM will still operate normally.
Only read from or write to the address match registers while ROM correction is disabled in ROMCEN. Otherwise, an error may occur in the match detection circuit.

12.4 ROM Correction Control Registers Table 12-1 shows the organization of the address match and data registers for ROM correction. Write a ROM address to be corrected to an AMCHIHn and AMCHILn register pair and write the corrected data to the associated CHDATn register. Enable ROM correction for the associated address in the ROMCEN register.
Address Match Register
ROM Address
Data Register High Order Low Order
Address 0 AMCHIH0 x’00FD02’ AMCHIL0 x’00FD00’ CHDAT0 x’00FD40’
Address 1 AMCHIH1 x’00FD06’ AMCHIL1 x’00FD04’ CHDAT1 x’00FD44’
Address 2 AMCHIH2 x’00FD0A’ AMCHIL2 x’00FD08’ CHDAT2 x’00FD48’
Address 3 AMCHIH3 x’00FD0E’ AMCHIL3 x’00FD0C’ CHDAT3 x’00FD4C’
Address 4 AMCHIH4 x’00FD12’ AMCHIL4 x’00FD10’ CHDAT4 x’00FD50’
Address 5 AMCHIH5 x’00FD16’ AMCHIL5 x’00FD14’ CHDAT5 x’00FD54’
Address 6 AMCHIH6 x’00FD1A’ AMCHIL6 x’00FD18’ CHDAT6 x’00FD58’
Address 7 AMCHIH7 x’00FD1E’ AMCHIL7 x’00FD1C’ CHDAT7 x’00FD5C’
Address 8 AMCHIH8 x’00FD22’ AMCHIL8 x’00FD20’ CHDAT8 x’00FD60’
Address 9 AMCHIH9 x’00FD26’ AMCHIL9 x’00FD24’ CHDAT9 x’00FD64’
Address 10 AMCHIHA x’00FD2A’ AMCHILA x’00FD28’ CHDAT10 x’00FD68’
Address 11 AMCHIHB x’00FD2E’ AMCHILB x’00FD2C’ CHDAT11 x’00FD6C’
Address 12 AMCHIHC x’00FD32’ AMCHILC x’00FD30’ CHDAT12 x’00FD70’
Address 13 AMCHIHD x’00FD36’ AMCHILD x’00FD34’ CHDAT13 x’00FD74’
Address 14 AMCHIHE x’00FD3A’ AMCHILE x’00FD38’ CHDAT14 x’00FD78’
Address 15 AMCHIHF x’00FD3E’ AMCHILF x’00FD3C’ CHDAT15 x’00FD7C’
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
ROMC
EN15
EN14
EN13
EN12
EN11
EN10
EN9
EN8
EN7
EN6
EN5
EN4
EN3
EN2
EN1
EN0
Reset: 0
R/W: R/W
0: Disable 1: Enable
ROMCEN14: Address 14 ROM correction enable
0: Disable 1: Enable
ROMCEN13: Address 13 ROM correction enable
0: Disable 1: Enable
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 290

ROMCEN12: Address 12 ROM correction enable
0: Disable 1: Enable
ROMCEN11: Address 11 ROM correction enable
0: Disable 1: Enable
ROMCEN10: Address 10 ROM correction enable
0: Disable 1: Enable
ROMCEN9: Address 9 ROM correction enable
0: Disable 1: Enable
ROMCEN8: Address 8 ROM correction enable
0: Disable 1: Enable
ROMCEN7: Address 7 ROM correction enable
0: Disable 1: Enable
ROMCEN6: Address 6 ROM correction enable
0: Disable 1: Enable
ROMCEN5: Address 5 ROM correction enable
0: Disable 1: Enable
ROMCEN4: Address 4 ROM correction enable
0: Disable 1: Enable
ROMCEN3: Address 3ROM correction enable
0: Disable 1: Enable
ROMCEN2: Address 2 ROM correction enable
0: Disable 1: Enable
ROMCEN1: Address 1 ROM correction enable
0: Disable 1: Enable
ROMCEN0: Address 0 ROM correction enable
0: Disable 1: Enable
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 291

AMCHIH0–AMCHIHF: ROM Correction Address Match Register n (High)
23 CHAD
22 CHAD
21 CHAD
20 CHAD
19 CHAD
18 CHAD
17 CHAD
AMCHIHn is an 8-bit access register.
AMCHIL0–AMCHILF: ROM Correction Address Match Register n (Low)
15 CHAD
14 CHAD
13 CHAD
12 CHAD
11 CHAD
10 CHAD
9 CHAD
8 CHAD
7 CHAD
6 CHAD
5 CHAD
4 CHAD
3 CHAD
2 CHAD
1 CHAD
Reset: 0
R/W: R/W
AMCHILn is a 16-bit access register.
CHDAT0–CHDAT15: ROM Correction Data Register n
7 CHD
6 CHD
5 CHD
4 CHD
3 CHD
2 CHD
1 CHD
CHDATn is an 8-bit access register.
CHD6: Correction data bit D14 or D6 for address n
CHD5: Correction data bit D13 or D5 for address n
CHD4: Correction data bit D112 or D4 for address n
CHD3: Correction data bit D11 or D3 for address n
CHD2: Correction data bit D10 or D2 for address n
CHD1: Correction data bit D9 or D1 for address n
CHD0: Correction data bit D8 or D0 for address n
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 292

13 I 2 C Bus Controller
13.1 Description The MN102H75K/85K contains one I2C bus controller, fully compliant with the I2C specification, that can control one of two I2C bus connections.
An I2C bus is a simple, two-wire bus for transferring data between ICs. Since it requires only two lines, a serial data line (SDA) and a serial clock line (SCL), it minimizes interconnections so ICs have fewer pins and there are less PCB tracks. The result is smaller and less expensive PCBs. Figure 13-1 shows a typical I2C bus application.
MCU 2
Figure 13-1 Example of I 2 C Bus Application
In an I2C bus system, devices are considered as masters or slaves when performing data transfers. A master is the device that initiates a data transfer on the bus and generates the clock signals to permit that transfer. At that time, any device addressed is considered a slave. Table 13-1 defines some I2C bus terminology.
Term Description
Transmitter The device that sends the data to the bus
Receiver The device that receives the data from the bus
Master The device that initiates a transfer, generates clock signals, and termi- nates a transfer
Slave The device addressed by a master
Multimaster More than one device capable of controlling the bus can be connected to it. More than one master can attempt to control the bus at the same time without corrupting the message. The system is not dependent on any single master.
Arbitration Procedure to ensure that, if more than one master simultaneously tries to control the bus, only one is allowed to do so and the message is not corrupted. The device that loses arbitration becomes the slave of the device that wins.
Synchronization Procedure to synchronize the clock signals of two or more devices
Data line (SDA) · Clock line (SCL) · Display Serial memory

Description
Figure 13-2 shows an example of an I2C bus configuration using two microcon- trollers. Both I2C bus lines, SDA and SCL are bidirectional lines, connected to a positive supply voltage via a pullup resistor. The open-drain output pins of the microcontrollers perform the wired-AND function on the bus. The software controls when each microcontroller operates as a transmitter or receiver, or whether is in master or slave mode.
R
Device 1 Device 2
Table 13-2 describes the four possible operating modes for devices on the I2C bus.
Operating Mode Description
Master transmitter Device that generates the serial transfer clock (SCL) signal and transmits serial data to a slave device in sync with SCL
Master receiver Device that generates the SCL signal and receives serial data from a slave device in sync with SCL
Slave transmitter Device that transmits data in sync with the SCL signal from the mas- ter
Slave receiver Device that receives data in sync with the SCL signal from the master

Figure 13-3 shows the MN102H75K/85K operation sequence in each of these modes. In all modes, the I2C bus controller generates an interrupt after each data byte transfer, then the software loads the next data byte.
R/W = 0
(7 bits) R/W Data (8 bits) Data (8 bits) P
Slave ACK ACK ACK
Normally ACK = 0
ACK = 1 signals transfer end to slave transmitter.
R/W = 1
ACK ACK
P
Data (8 bits) Data (8 bits)
R/W = 1
Ack = 0 Ack = 1
P
Data (8 bits) Data (8 bits)
When the microcontroller is addressed, it outputs ACK = 0 and sets the AAS bit of the I2CDREC register to 1.
ACK = 1 signals transfer end to slave transmitter.
R/W = 0
(7 bits) R/W Data (8 bits) Data (8 bits) P
Slave ACK ACK ACK
When the microcontroller is addressed, it outputs ACK = 0 and sets the AAS bit of the I2CDREC register to 1.
STS sets to 1.
Figure 13-3 I 2 C Bus Interface Operation
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 295

Block Diagram
13.2 Block Diagram
MSB LSB Transmission data register
MSB LSB Reception data register
STO
ACK
AAS LRB STS MODE
LAB
BB
Register control Bus busy logic Arbitration logic Clock prescaler
Figure 13-4 I 2 C Bus Controller Block Diagram
13.3 Functional Description The I2C bus controller contains the registers shown in table 13-3. See the page number indicated for register and bit descriptions.
Register Page Address Description
I2CDTRM 304 x’007E40’ I2C transmission data register
I2CDREC 305 x’007E42’ I2C reception data register
I2CMYAD 305 x’007E44’ I2C self address register
I2CCLK 306 x’007E46’ I2C clock control register
I2CBRST 306 x’007E48’ I2C bus reset register
I2CBSTS 306 x’007E4A’ I2C bus status register
I Arbitration and bus busy control The I2C bus controller allows software control, but implements communication timing and bus arbitration completely in the hardware.
o Arbitration: Controlled by the software, but implemented completely in the hardware.
o Bus busy: Checked by the hardware. This eliminates the need for the software to check whether the bus is busy. The program can request a transfer to the I2C bus at any time.

I Register settings conversions to I2C protocol The I2C bus controller converts the data in the I2CDTRM register to the I2C protocol.
I Transfer modes changes A write to the I2CDTRM register indicates the transfer mode (master transmitter/ receiver or slave transmitter/receiver) for a new transfer. To minimize software control, the hardware generates an interrupt each time a transfer ends. During interrupt servicing, the SCL line stays low, then clears to high on a write to I2CDTRM. (When the microcontroller is a slave transmitter and the transfer ends, SCL goes high on a read to the I2CDREC register after an ACK = 1 (negative acknowledge) interrupt.)
I Multimaster support The hardware performs bus arbitration for a multimaster system. When it loses an arbitration, the hardware immediately stops the data transfer and generates an interrupt.
I Address decoding The I2C bus controller decodes the microcontroller’s address, set in the I2CMYAD register, when the microcontroller is a slave device. It also decodes the general code address (0).
I Forced bus reset Through software control, by a write to the I2CBRST register, the I2C bus con- troller can force the SCL line to reset to low when a bus error occurs. This resets the entire I2C bus controller circuit, leaving the microcontroller in slave receiver mode. It does not change the contents of the I2CMYAD and I2CCLK registers.
I Clock frequency adjustment The I2CCLK register sets the serial clock frequency, allowing synchronization with low-speed devices. With a 12-MHz oscillator, the maximum setting is 100 kHz and the minimum setting is 10 kHz.
I Bus state monitoring With the I2CBSTS register, the I2C bus controller determines the logic levels of the SCL and SDA lines.

I2C Bus Controller Setting Up the I2C Bus Connection
13.4 Setting Up the I2C Bus Connection Set the I2C connection in the I2CSEL0 and I2CSEL1 bits of the PCNT0 register (x’00FF90’). Since the SCL0, SDA0, SCL1, and SDA1 pins also serve as general-purpose port pins, and reset to the general-purpose function, you must set these bits every time the program uses the I2C function. You must also select the I2C function in the port mode registers. For I2C bus connection 0, set bits 0 and 1 of the P6MD register (x’00FFFC’). For I2C bus connection 1, set bits 1 and 2 of the P0MD register (x’00FFF0’).
Table 13-4 shows the register settings required to use either SDA0/SCL0 or SDA1/SCL1 alone, and figure 13-5 shows the control circuit for this pin setup.
Register Bit SDA0, SCL0 Only SDA1, SCL1 Only
P0MD (x’00FFF0) 1 0 (selects P01) 1 (selects SDA1)
2 0 (selects P02) 1 (selects SCL1)
P6MD (x’00FFFC’) 0 1 (selects SDA0) 0 (selects P60)
1 1 (selects SCL0) 0 (selects P61)
PCNT0 (x’00FF90’) 8 1 (enables SDA0, SCL0) 0 (disables SDA0, SCL0)
9 0 (disables SDA1, SCL1) 1 (enables SDA1, SCL1)
Port control register 0 x'00FF90' bit 8
I2CSEL0 x'00FF90' bit 9
SDA1
SDA OUT
Port control register 0 x'00FF90' bit 8
SCL0
I2CSEL0 x'00FF90' bit 9
SCL1
SCL OUT
Figure 13-5 Pin Control Circuit for the I 2 C Bus Controller
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 298

13.5 SDA and SCL Waveform Characteristics Figure 13-6 and table 13-5 provide the timing definitions and specifications for the for the MN102H75K/85K I2C bus interface.
SDA
tHD; DAT
tSU; DAT tSU; STA
tSU; STO tHD; STA
tHD;STA tLOW tR
Table 13-5 SDA and SCL Waveform Characteristics
Parameter Symbol Min Max Unit SCL clock frequency fSCL 0 100 kHz Bus free time between a stop and start condition tBUF 20 — µs Hold time (repeated) start condition tHD;STA 4.0 — Low period of the SCL clock tLOW 4.7 — High period of the SCL clock tHIGH 4.0 — Setup time for a repeated start condition tSU;STA 4.7 — Data hold time tHD;DAT 300 — ns Data setup time tSU;DAT 250 — SDA and SCL rise time tR — 1000 SDA and SCL fall time tF — 300 Stop condition setup time tSU;STO 4.0 µs

13.6 I 2 C Interface Setup Examples
13.6.1 Setting Up a Transition from Master Transmitter to Mas- ter Receiver This example demonstrates how to set up a data transfer when changing from master transmitter to master receiver. Figure 13-7 shows an example waveform.
I To set up the I/O port: Set port control register 0 (PCNT0; x’00FF90’) to x’0100’ (enabling the SDA0 and SCL0 pins) and set the port 6 output mode register (P6MD; x’00FFFC’) to x’0003’ (selecting the SDA0 and SCL0 functions).
I To enable I2C interrupts: Set the I2C interrupt control register pair (I2C0ICH and I2C0ICL; x’00FC9C’) to x’0100’.
I To set up the I2C registers: 1. Set the I2CCLK register (x’007E46’) to x’0041’, selecting a clock frequency of 80 kHz.
13.6.1.2Setting Up the First Interrupt When an ACK = 0 signal returns from the slave device, the I2C bus controller generates an interrupt. At this point, implement the following settings:
I To set up the interrupt: Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This enables I2C interrupts and clears the previous interrupt request.
I To set up the I2C registers: 1. Read the I2CDREC register (x’007E42’) to determine the I2C bus controller status.

13.6.1.3Setting Up the Second Interrupt When the microcontroller receives the data x’85’ from the slave device, it returns an ACK = 0 signal and the I2C bus controller generates an interrupt. At this point, implement the following settings:
I To set up the interrupt: Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This enables I2C interrupts and clears the previous interrupt request.
I To set up the I2C registers: 1. Read the I2CDREC register (x’007E42’) to determine the I2C bus controller status.
13.6.1.4Setting Up the Third Interrupt When the microcontroller receives the data x’33’ from the slave device, it returns an ACK = 1 signal and the I2C bus controller generates an interrupt. At this point, implement the following settings:
I To set up the interrupt: Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This enables I2C interrupts and clears the previous interrupt request.
I To set up the I2C registers: 1. Read the I2CDREC register (x’007E42’) to determine the I2C bus controller status.

1 0
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 301

13.6.2 Setting Up a Transition from Slave Receiver to Slave Transmitter This example demonstrates how to set up a data transfer when changing from slave receiver to slave transmitter. Figure 13-8 shows an example waveform.
I To set up the I/O port: Set port control register 0 (PCNT0; x’00FF90’) to x’0300’ (enabling the SDA1 and SCL1 pins) and set the port 0 output mode register (P0MD; x’00FFF0’) to x’0006’ (selecting the SDA1 and SCL1 functions).
I To enable I2C interrupts: Set the I2C interrupt control register pair (I2C0ICH and I2C0ICL; x’00FC9C’) to x’0100’.
I To set up the I2C registers: 1. Set the I2CMYAD register (x’007E44’) to x’0024’. This sets the slave address of the microcontroller.
13.6.2.2Setting Up the First Interrupt Once the microcontroller becomes a slave transmitter, set up the transmission data.
I To set up the interrupt: Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This enables I2C interrupts and clears the previous interrupt request.
I To set up the I2C registers: 1. Read the I2CDREC register (x’007E42’) to determine the I2C bus controller status. AAS should be 1.

13.6.2.3Setting Up the Second Interrupt The master sends an ACK = 0 signal, so the microcontroller must send the next data byte. Set up the transmission data as follows:
I To set up the interrupt: Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This enables I2C interrupts and clears the previous interrupt request.
I To set up the I2C registers: 1. Read the I2CDREC register (x’007E42’) to determine the I2C bus controller status. The previous read from I2CDREC cleared the AAS, so AAS should be 0.
13.6.2.4Setting Up the Third Interrupt The master send an ACK = 1 signal, then issues a stop condition, ending the communication.

1 1 1 0 ACK 1 0 ACK 1 1 1 SDA
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 303

13.7 I2C Bus Interface Registers All registers in I2C blook cannot be written by byte (by word only). Read by byte is possible.
— STA STO ACK DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
Reset: 0
R/W: R/W R/W
STO: I 2 C stop control
Writing to the STA and STO bits allows you to change the state of the transmission or reception operation. Table 13-6 shows the settings for dif- ferent start and stop conditions.
SCL is held low during interrupt servicing, and is cleared high by a write to I2CDTRM.
STA STO Mode Function Description 0 0 All NOP No state change 1 1 All NOP No state change 1 0 Slave receiver Start Change to mode indicated by R/W bit. R/W = 0: Change to master transmitter R/W = 1: Change to master receiver Master transmitter Repeat start
0 1 Slave receiver Stop read Change to slave receiver after stop condition. Master transmitter Stop write
The acknowledge signal is output after every byte transfer, on the ninth clock pulse. ACK is normally 1 and transitions to 0 to output an acknowl- edge (for instance if the master or slave receiver has received a data byte).
The parallel data in this field is converted to serial data for transmission to the I2C bus. It is shifted out MSB first to the interface.

I2CDREC: I 2 C Reception Data Register x’007E42’
1 MODE
0 STS LRB AAS LAB BB D7 D6 D5 D4 D3 D2 D1 D0
Reset: 0 1 0
R/W: R
The I2CDREC register contains the status bits for monitoring the device and the reception data. I2CDREC is a read-only register.
This field indicates which I2C mode the microcontroller is in. MODE1 indicates slave or master, and MODE0 indicates receiver or transmitter. If the microcontroller loses an arbitration or if a stop condition occurs, the hardware clears MODE[1:0] to b’00’.
STS: Stop condition at slave receiver
Set to 1 when a stop condition is detected while the microcontroller is in slave receiver mode.
LRB: Last received bit.
Stores the last serial data bit received. LRB normally indicates the ACK cycle data.
Set to 1 when the slave address on the bus matches the contents of the address register or matches the general address (x’00’). AAS resets after a read from the I2CDREC register.
Set to 1 when the microcontroller loses a bus arbitration. LAB resets when I2CDTRM indicates a start condition (STA = 1).
A start condition on the bus sets this flag to 0, and a stop condition resets it to 1. The microcontroller considers the bus to be busy as long as BB = 0.
The serial data received from the I2C bus is shifted into this field MSB first.
— A6 A5 A4 A3 A2 A1 A0
Reset: 0
R/W: R/W R/W
This register is formed from a 7-bit field address latch. It holds the micro- controller’s own address, used for a compare when the microcontroller is addressed as a slave. When a match occurs, AAS is set to 1.

I2CCLK: I 2 C Clock Control Register x’007E46’
— C9 C8 C7 C6 C5 C4 C3 C2 C1 C0
Reset: 0
R/W: R/W R/W
This 10-bit field determines the SCL output. With a 12-MHz system clock, calculate the frequency as follows:
To conform to the specification, the clock signal must be between 0 and 100 kHz. To sat- isfy this requirement, always set I2CCLK to x’032’ or higher.
12 MHz 2 Register setting 10 + ( ) × =
x’032’: 100 kHz x’06E’: 50 kHz x’039’: 89.6 kHz x’08C’: 40 kHz x’041’: 80 kHz x’0BE’:30 kHz x’04C’: 69.8 kHz x’122’: 20 kHz x’05A’: 60 kHz x’24E’: 10 kHz
— BRST
Reset: 0 1
R/W: R/W
When a serious bus error occurs, this bit can be set to 0, forcing the clock line low and resetting the I2C bus. This function works in all I2C modes. After a forced reset, the microcontroller is in slave receiver mode. This reset does not change the contents of the I2CMYAD and I2CCLK registers.
I2CBSTS: I 2 C Bus Status Register x’007E4A’
— SDAS SCLS
Reset: 0
R/W: R
I2CBSTS is a two-bit, read-only register that monitors the status of the I2C bus.
This bit monitors the state of the I2C data line, SDA.
This bit monitors the state of the I2C clock line, SCL.
fSCL

14 H Counter
14.1 Description The MN102H75K/85K contains two H counter circuits that can be used to count the HSYNC signal. Each H counter consists of a 10-bit counter and 10-bit register.
Selected in SELR[20:00]/SELR[21:01] fields of HCCNT0/HCCNT1 registers.
Selected in REDG0/REDG1 bits of HCCNT0/HCCNT1 registers.
341-µs signal from PWM block
Selected in SEDG0/SEDG1 bits of HCCNT0/HCCNT1 registers. HI0 for H counter 0, and HI1 for H counter 1
14.3 H Counter Operation Figure 14-2 provides a schematic diagram of an example counter operation.
N-2 N-1 N 1 2 3
VSYNC
Latched on the falling edge of VSYNC
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 307

Figure 14-3 shows the input timing for the count source and reset signals. Never input a count source signal in less than 245 ns (t1) after the reset signal input. Otherwise, the signal may be counted as part of the previous count cycle.
HI0 counted on the rising edge
t1 t2
t1 ≥ 245 ns t2 ≥ 200 ns
VSYNC counted on the falling edge
The 10-bit counter counts the HSYNC signal from 0 to x’3FF’, and the 10-bit register stores the count. The H counter uses the four pins shown in table 14-1.
Pin No.
Description Alternative Functions H75K H85K
HI0 17 45 Count source pin P43/TM5IOB
HI1 16 46 Count source pin P44/TM5IC
VI0 6 53 Count reset pin P52/IRQ4
VSYNC 2 55 Count reset pin P54/IRQ5
To use the H counter, set the port 4 and 5 output control registers (P4OUT and P5OUT) to 0 and set the H counter pins to input.
I To use HI0, set the P4DIR3 bit (x’00FFE4’) to 0.
I To use HI1, set the P4DIR4 bit (x’00FFE4’) to 0.
I To use VI0, set the P5DIR2 bit (x’00FFE5’) to 0.
I To use VSYNC, set the P5DIR4 bit (x’00FFE5’) to 0.

The H counter counts the HSYNC signal for the interval set in the HCCNT0 (x’007EB0’) or HCCNT1 (x’007EB2’) register, latches the count value in the 10- bit register, then clears the counter. HCCNT0 and HCCNT1 provide six interval settings:
I 2048-µs fixed interval obtained by dividing the system clock (12 MHz)
I 4098-µs fixed interval obtained by dividing the system clock (12 MHz)
I 8096-µs fixed interval obtained by dividing the system clock (12 MHz)
I Interval from active-edge to active-edge input of VI0 pin
I Interval from active-edge to active-edge input of VSYNC pin
If your application uses one of the fixed clocks based on divided PWM output (1024, 2048, 4098, or 8096 µs), you must also set up the PWM circuit. (See section 10, “Pulse Width Modulator,” on page 249.)
When the count overflows (is greater than x’3FF’), the counter stops counting and stores the value x’3FF’ in the 10-bit register. At any time, the CPU can obtain the count value stored in the latch by reading the HCD0 (x’007EB4’) or HCD1 (x’007EB6’) register.
To use the H counter, you must always set the HCNTOFF bit of the PCNT0 register to 0. To use the PWM function, always set the PWMOFF bit of the PCNT2 register (x’00FF92’) to 0.
To enable or disable the H counter function, set the HCNTOFF bit of the PCNT0 register (x’00FF90’; see page 286). Disabling this circuit when it is unused can reduce power consumption.
Because the H counter uses the system clock, it does not operate in STOP mode.

14.4 H Counter Control Registers All registers in H Counter block cannot be written by byte (by word only). Read by byte is possible.
— SED
SELR
20 SELR
10 SELR
G0
G0
Reset: 0
R/W: R/W R/W
0: Active low 1: Active high
SEDG0: Polarity select for reset signal
0: Active low 1: Active high
SELR20:00]: Reset signal select
All other settings default to 1024 µs.
— SED
SELR
21 SELR
11 SELR
G1
G1
Reset: 0
R/W: R/W R/W
0: Active low 1: Active high
SEDG1: Polarity select for reset signal
0: Active low 1: Active high
SELR[21:01]: Reset signal select
All other settings default to 1024 µs.

HCD0: H Counter Data Register 0 x’007EB4’
90 HCD
80 HCD
70 HCD
60 HCD
50 HCD
40 HCD
30 HCD
20 HCD
10 HCD
Reset: 0
R/W: R
This field stores the HI0 clock source count. It becomes x’3FF’ on over- flow.
91 HCD
81 HCD
71 HCD
61 HCD
51 HCD
41 HCD
31 HCD
21 HCD
11 HCD
Reset: 0
R/W: R
This field stores the HI1 clock source count. It becomes x’3FF’ on over- flow.

Appendix ARegister Map
Table A-1 Register Map: x’007E00’ to x’007FFF’ (Registers in this area cannot be written by byte only by word.)
4 LSBs Description F E D C B A 9 8 7 6 5 4 3 2 1 0
CRI3 FQW
CRI2 FQW
CRI1 FQW CAPDA ACQ1 VBI IRQ HNUM SLSF SLHD MAX MIN SL CNT FC
VBI 1 registers 007E10 FCPNUM STAP DATAE DATAS CRI2E CRI2S CRI1E CRI1S
CRI3 FQW
CRI2 FQW
CRI1 FQW
W CAPDAW ACQ1W VBI IRQW
HNUM
SLSF
SLHD
MAX
SL CNT
W
W
W
W MINW
FCW
VBI 2 registers 007E30 FCPNUMW STAPW DATAEW DATASW CRI2EW CRI2SW CRI1EW CRI1SW
W
W
W
007E40 I2CBSTS I2CBRST I2CCLK I2CMYAD I2CDREC I2CDTRM I2C interface registers
007E60
007E70 PWM6 PWM5 PWM4 PWM3 PWM2 PWM1 PWM0 PWM registers
007E90
007EA0 RML
RMT
RMS
RMC
RMT
C RMIR RMIS Remote signal receiver registers
R
R
S
007EB0 HCD1 HCD0 HCO UNT1
HCO UNT0 H counter registers
MIN BPPST SCMING FQSEL NFSEL
Sync separator 1 registers 007ED0 CLPCND
SYNC MINW BPPSTW SCMING
007EE0 HSEP1W CLAMPW SPLVW BPLV
W FQSELW NFSELW
W
Sync separator 2 registers 007EF0 CLPCND1W HVCONDW VCNTW HDIS-
TWW
LVW FIELDW HSEP2W
007F00 EVOD HCOVNT OSD3 OSD2 OSD1 RAMEND GROMEN
CROMEN
D
D
OSD control registers 007F10 CIVP CIHP GIVP GIHP SVP SHP STC0
007F20 STC3 STC2 STC1 SHTC HSHT1 HSHT0 VSHT1 VSHT0
007F40 TESTA (test register)
SBFNUM (test register) VBI 1 test registers
007F60 TESTAW (test register)
SBFNUMW (test register) VBI 2 test registers
007F80 CPT7 CPT6 CPT5 CPT4 CPT3 CPT2 CPT1 CPT0
OSD text color palette 007F90 CPTF CPTE CPTD CPTC CPTB CPTA CPT9 CPT8
007FA0 WBSHD BBSHD FRAME COLB OSD text effects registers
007FC0 GPT17 GPT16 GPT15 GPT14 GPT13 GPT12 GPT11 GPT10
OSD graphics color palette 1 007FD0 GPT1F GPT1E GPT1D GPT1C GPT1B GPT1A GPT19 GPT18
007FE0 GPT27 GPT26 GPT25 GPT24 GPT23 GPT22 GPT21 GPT20
OSD graphics color palette 2 007FF0 GPT2F GPT2E GPT2D GPT2C GPT2B GPT2A GPT29 GPT28

Table A-2 Register Map: x’00FC00’ to x’00FDFF’
20 MSBs
4 LSBs Description F E D C B A 9 8 7 6 5 4 3 2 1 0
00FC00 IAGR CPUM Special function registers
00FC20
00FC30
00FC40 IQ1 ICH
IQ1 ICL
IQ0 ICH
IQ0 ICL
EI ICR
PI ICR
WD ICR
00FC50 IQ5 ICH
IQ5 ICL
IQ4 ICH
IQ4 ICL
IQ3 ICH
IQ3 ICL
IQ2 ICH
IQ2 ICL
00FC60 VBIW
VBIW
TM5UD
TM5UD
TM5CA
TM5CA
TM5CB
TM5CB
VBI ICH
VBI ICL
TM4UD
TM4UD
TM4CA
TM4CA
TM4CB
TM4CB
ICH
ICH
ICH
ICH
ICH
ICH
ICH
00FC70 ADM0
ADM0
ADM1
ADM1
ADM2
ADM2
ADM3
ADM3
RMC
RMC
TM0UD
TM0UD
TM1UD
TM1UD
TM2UD
TM2UD
ICH
ICH
ICH
ICH
ICH
ICH
ICH
ICH
00FC80 TM3UD
TM3UD
VBIV
VBIV
VBIV
VBIV
SCR0
SCR0
SCT0
SCT0
AN ICH
AN ICL
ICH
W ICH
W ICL
ICH
ICH
ICH
OSD
OSD
00FC90 I2C ICH
I2C ICL
SCR1
SCR1
SCT1
SCT1
OSDC
OSDC
G ICH
G ICL
ICH
ICH
ICH
00FCA0
00FCB0
00FCC0
00FCD0
00FCE0
ROMCTSTL (test register) EXTMD ROMCEN ROM correction registers and
00FCF0 ROMCTSTH (test register)
external interrupt mode register
00FD00 AMC HIH3 AMCHIL3 AMC HIH2 AMCHIL2 AMC HIH1 AMCHIL1 AMC HIH0 AMCHIL0
00FD10 AMC HIH7 AMCHIL7 AMC HIH6 AMCHIL6 AMC HIH5 AMCHIL5 AMC HIH4 AMCHIL4
ROM correction address match registers
00FD20 AMC HIHB AMCHILB AMC HIHA AMCHILA AMC HIH9 AMCHIL9 AMC HIH8 AMCHIL8
00FD30 AMC HIHF AMCHILF AMC HIHE AMCHILE AMC HIHD AMCHILD AMC HIHC AMCHILC
CH DAT2
CH DAT1
CH DAT0
ROM correction data registers 00FD50 CH DAT7
CH DAT5
CH DAT4
00FD60 CH DATB
CH DATA
CH DAT9
CH DAT8
00FD70 CH DATF
CH DATE
CH DATD
CH DATC
00FD80 SC1 STR
SC1 TRB SC1CTR SCTST (test register)
SC0 TRB SC0CTR Serial interface registers
00FDA0
00FDB0
00FDC0
00FDD0
00FDE0
00FDF0
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 313
Interrupt controller registers

Table A-3 Register Map: x’00FE00’ to x’00FFFF’
20 MSBs
4 LSBs Description F E D C B A 9 8 7 6 5 4 3 2 1 0
TM2
TM1
TM0
BC
BC
BC
BC
8-bit timer registers 00FE10 TM3
TM1
TM0
BR
BR
BR
BR
00FE20 TM3
TM2
TM1
TM0
MD
MD
MD
MD
00FE30 TM8TST (test register)
00FE50
00FE60
00FE70
00FE80 TM4TST (test register)
) TM4CB (TM4CAX
) TM4CA TM4BC TM4MD 16-bit timer 4 registers
) TM5CB (TM5CAX
00FE90 TM5TST (test register)
) TM5CA TM5BC TM5MD 16-bit timer 5 registers
00FEB0
00FEC0
00FED0
00FEE0
00FEF0
00FF00 AN3BUF AN2BUF AN1BUF AN0BUF ANTST (test register) ANCTR
ADC registers 00FF10 AN11BUF AN10BUF AN9BUF AN8BUF AN7BUF AN6BUF AN5BUF AN4BUF
00FF30
00FF40
00FF50
00FF60
00FF70 FBEWER FAR- EGEX FAREG FDREG FCREG Flash memory write control registers
00FF80 MEMMD1 EXWMD External memory wait control registers
00FFA0 PCNT1 (test register)
P7 PUP
P6 PUP
P5 PUP
P4 PUP
P3 PUP
P2 PUP
P1 PUP
P0 PUP
00FFC0 P8 OUT
P7 OUT
P6 OUT
P5 OUT
P4 OUT
P3 OUT
P2 OUT
P1 OUT
P0 OUT
I/O port control registers
P7
P6
P5
P4
P3
P2
P1
P0
IN
IN
IN
IN
IN
IN
IN
IN
IN
00FFE0 P8 DIR
P7 DIR
P6 DIR
P5 DIR
P4 DIR
P3 DIR
P2 DIR
P1 DIR
P0 DIR
00FFF0 P6 MD
P5 MD
P4 MD
P3 MD P2MD P1MD P0 MD
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 314

MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 315

Description
Appendix BMN102HF75K Flash EEPROM Version
B.1 Description The MN102HF75K and MN102HF85K are electrically programmable, 256- kilobyte flash ROM versions of the MN102H75K and MN102H85K. They are programmed in one of two modes:
I PROM writer mode, which uses a dedicated adaptor socket and writer. In this mode, the user program can occupy the entire 256-kilobyte ROM space.
I Onboard serial programming mode, which the CPU controls. This mode requires an 8-kilobyte ROM area to hold a serial writer program.
A cycle of erasing to programing is counted as one time no matter how many blocks are rewritten.Even when the multi-block is rewritten separately or the same block is rewritten, each block rewrite is counted.For example,rewriting Block1,Block2 and Block3 respec- tively is counted as 3 times. There- fore, to program efficiently, rewrite all blocks in the lump.
In onboard serial programming mode, the 256-kilobyte flash memory is divided into three main areas:
I Load program area (1 kilobyte: x’0x80000 to x’0x803FF) This area stores the load program for the serial writer. It is overwritten in PROM writer mode.
I Fixed user program area (7 kilobytes: x’0x80400 to x’0x81FFD) This area stores a user program that is write-protected in serial programming mode. It is overwritten in PROM writer mode.
I User program area (248 kilobytes: x’0x82000 to x’0xBFFFD) This area stores the user program. It is overwritten in both programming modes.
The two words x’0x81FFE’ and x’0xBFFFE’ are test areas. Do not use these two words in your programs.
Table B-1 summarizes the programmable areas for the modes. Normal operation is guaranteed with up to ten programmings.
Programming Mode Programmable Area
PROM writer programming mode Entire memory space (256 KB)
Onboard serial programming mode User program area (248 KB)
Load program area 1 KB
Fixed user program area
Test area (1 word)
Test area (1 word)
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 316

B.2 Benefits Because you can maintain and upgrade the program in the MN102HF75K/85K up to and immediately following product release, this version of the device shortens time-to-market by as much as one month. This device is ideal for appli- cations in quickly changing markets, since it allows you to revise the microcon- troller program in an existing product.
B.3 Using the PROM Writer Mode In this mode, the MN102HF75K allows a PROM writer to program the internal flash memory as if it was a standalone memory chip. The microcontroller is inserted into a dedicated adaptor socket, which connects to DATA-I/O’s LabSite PROM writer. When the microcontroller connects to the adaptor socket, it auto- matically enters PROM writer mode. The adaptor socket ties the microcontroller pin states to PROM writer mode, and programming occurs without any reference to the microcontroller pin states.
Adaptor socket for MN102HF85K
Adaptor socket for MN102HF75K
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22
A17 NWE MODE A15 A14 A13 A12 A11 A10 A9 VSS A8 A7 A6 A5 A4 A3 A2 A1 A0 VDD
I/O7 I/O6 I/O5 I/O4 I/O3 I/O2 I/O1 I/O0 NOE
Figure B-3 Pin Configuration for Socket Adaptor
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 317
Third-party PROM writer

Using the PROM Writer Mode
Table B-2 PROM Writer Hardware
Device
Hardware Part
MN102HF75KBF MN102HF85KDP
84-pin QFP 64-pin SDIP
Panasonic M M Panasonic
Set this switch to the right.
Ordering information:
Ordering information:
Part no.: FLS84F18--102HF57
Part no.: FLS64SD-102HF51
OEM: Matsushita Electric Indus- trial Co., Ltd.
OEM: Matsushita Electric Indus- trial Co., Ltd.
Gang writer Single-unit writer
Osaki CN Building, 2F
Check the following web page of our microcomputer division for the writer matching information.
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 318

B.4 Using the Onboard Serial Programming Mode The serial programming mode is primarily used to program the flash ROM in devices that are already installed on a PCB board. Panasonic provides the ded- icated hardware and software for this mode. This section describes the microcon- troller hardware, system configuration, software register map, and protocol for this type of programming operation.
Television set
Serial communication
16-bit microcontroller with flash EEPROM
Figure B-4 Serial Writer Programming Configuration
I Hardware requirements:
o Onboard serial writer (YDC model AF200 (provisional))
o Add-on circuit for target board
o Flash programming connectors or pins for target board
I Software requirements:
o Serial writer load program, installed in first kilobyte of MN102HF75K/ 85K EEPROM
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company 319
Program · for TV

Using the Onboard Serial Programming Mode
B.4.1 Configuring the System for Onboard Serial Programming
Target board power source
AC adaptor
Target board
Serial writer (AF200 flash microcontroller programmer (provisional))
Figure B-5 Serial Writer Hardware Setup
The workstation containing the program data sends the program to the serial writer through an IC card. Through serial communication, the serial writer programs the flash memory inside the microcontroller on the target board. You must supply an external VDD source to the target board. The serial writer supplies the VPP source.
You must provide the personal computer that holds the IC card. To order the serial writer, contact:
(Provisional) Yokogawa Digital Computer Co., Ltd. Microcontroller System Joint Headquarters, Equipment Business Center Keio Fuchu 1-chome Building, 7F 1-9 Fuchu-cho, Fuchu-shi Tokyo, Japan
Panasonic Semiconductor Development Company MN102H75K/F75K/85K/F85K LSI User Manual 320
IC card · IC card

B.4.2 Circuit Requirements for the Target Board
V DD
VDD (for level detection)
RST V PP
SBT
MCU SBT1
SBD
SBD1
External power source 3.0 V - 3.3 V
GND
Figure B-6 Target Board–Serial Writer Connection
Table B-3 Pin Descriptions for Target Board–Serial Writer Connection
Pin Name Description
VPP 5-V power supply
VDD 3.0–3.3 external power supply
VDD (for level detection) VDD level detection pin for target board
SBT Serial interface clock supply
SBD Serial interface data supply
I During programming, the serial writer supplies VPP to the microcontroller. Install a switch on the target board to toggle between VPP supplied by the serial writer and VPP for normal operation.
I In serial programing a large-scale of current flows through Vpp. See to it that 5V is supplied to Vpp by checking the connection and reducing the impedance of switches.
I You must supply a VDD source of 3.0 V – 3.3 V externally.
I VDD (for level detection) informs the serial writer of the actual VDD level of the target board. If the VDD level is too low, the serial writer generates an error message.
I Connect pullup resistors on the target board to the RST, SBT, and SBD pins. Use a pullup resistor value of 10 kΩ ±10%. Install a switch on the target board to toggle between RST for serial programming and RST for normal operation. Alternatively, install a wired-OR connection. For a wired-OR connection, disable RST for normal operation during serial programming.
I RST, SBT, and SBD are output from the serial writer through an open con- nection.

Using the Onboard Serial Programming Mode
B.4.3 Microcontroller Hardware Used in Onboard Serial Programming
B.4.3.1 Serial Writer Interface Description The microcontroller contains the following interface hardware for serial pro- gramming of the flash ROM:
o Data transmission and reception synchronize with external clock
o Transmission bit LSB first
o Maximum clock speed ≥ 10 MHz
o Positive I/O logic
I Two I/O pins:
o SBT1 and SBD1 pins (with alternate I/O port functions)
B.4.3.2 Serial Writer Interface Block Diagram
TXD
P25, TM4IOB, SBD1
RXC,TXC
P24, TM4IC, SBT1
RST RST
8-bit serial interface (use serial interface 1)
When programming the memory, you need not be aware of these microcontroller hardware connections. However, it is vital that you take these connections into account when designing your target board, so that the serial writer can program the device correctly, and so that SBD1 and SBT1 are dedicated pins for the serial writer, preventing other user circuits from communicating with the device.

B.4.4 Microcontroller Memory Map Used During Onboard Serial Programming
B.4.4.1 Flash ROM Address Space
Table B-4 Flash ROM Address Space in Serial Programming Mode
Address Size Description
1 KB Serial writer load program area
7 KB Fixed user program area
8 bytes Security code
8 bytes Reserved area
8 bytes Branch instruction to reset service routine
(Ex., JMP 82100)
8 bytes Branch instruction to interrupt service routine
(Ex., JMP 82200)
248 KB User program area
I Serial writer load program area This kilobyte of ROM, starting at address x’0x80000’, holds the load program for the serial writer. This area is write-protected in the hardware. Panasonic provides the load program.
I Fixed user program area These 7 kilobytes of ROM starting at address x’0x80400’, hold the fixed user program. This area is write-protected in the hardware. (You can program this area with a parallel writer.)
I Security code This byte holds the password for the serial writer. Enter an 8-character ASCII code in this space.
I Reserved area Do not write to this area.
I Branch instruction to reset service routine Normally, reset servicing starts at address x’0x80000’, but the soft branch instruction in the serial writer load program branches to x’0x82010’. This address must hold a JMP instruction pointing to the real start address for the reset service routine.

Using the Onboard Serial Programming Mode
I Branch instruction to interrupt service routine Normally, interrupt servicing starts at address x’0x80008’, but the soft branch instruction in the serial writer load program branches to x’0x82018’. This address must hold a JMP instruction pointing to the real start address for the interrupt service routine.
I User program area This area stores the user program.
Table B-5 RAM Address Space in Serial Programming Mode
Address Size Description
3 KB Serial writer work area
1 KB Reserved area
I Serial writer work area The 3 kilobytes of RAM area starting at address x’0x08000’ are used for the serial writer work area. The load program downloads programs to this area that it needs to operate the serial writer and program the EEPROM. No other memory area can be used for this purpose. You do not need to know about RAM allo- cation to program the EEPROM.
I Reserved area Do not write to this area.
B.4.5 Microcontroller Clock on the Target Board For the clock supply to the microcontroller on the target board, use the existing target board clock. The OSC oscillator clock for the microcontroller is 4 MHz. Using the internal PLL circuit, the microcontroller switches to NORMAL mode and operates with a 12-MHz system clock. Table B-6 shows the clock fre- quencies for the microcontroller during serial programming.
Oscillator Clock Frequency Internal System Clock Frequency
4 MHz 12 MHz

B.4.6 Setting Up the Onboard Serial Programming Mode To enter serial programming mode, the microcontroller must be in write mode. This section describes the pin setup for the serial writer interface.
D
V DD
V PP
RST
SBT
SBD
V DD
V PP
RST
SBT
SBD
t1 t2
I To set up the serial writer interface: 1. Turn on the external VDD supply.

Using the Onboard Serial Programming Mode
I Start routine for the load program
SBT pin == high
&& SDB pin == low?
SBT pin == high
&& SDB pin == low?
Has tWAIT2 passed?
SBT pin == high
&& SDB pin == high?
Execute user
load program
program
Figure B-9 Load Program Start Flow
Conditions: 1. After the load program initiates a reset start, SBD must be low and SBT high.
If any of these conditions is not met, control returns to the user program.

B.4.7 Branching to the User Program
B.4.7.1 Branching to the Reset Start Routine
Execute user program (Generate 10-cycle delay)
When the reset starts, the serial writer load program initializes only if SBD is low. Otherwise, the program branches to the user program at address x’0x82010’.
Interrupt start address x’0x80008’
JMP x’82018’ instruction (3 bytes/2 cycles)
Write a branch instruction to address x’82018’
Execute user interrupt service routine
In the interrupt start address, place a simple branch instruction pointing to address x’0x82018’.

Reprogramming Flow
B.5 Reprogramming Flow Figure B-12 shows the flow for reprogramming (erasing and programming) the flash memory.
Write 0s to entire memory
Always program after erasing is completed.Erasing is sometimes not done finely,even though PROM- writer or onboard serial writer shows “PASS“in blank check. And in that situation the data programed successfully may be incorrect. Rewriting the data to the address where data has already set is forbid- den.
As the figure shows, the write occurs after the memory is completely erased. The erase routine consists of three steps, first writing all zeros to the entire memory space, next erasing the memory, and finally reversing.
B.6 Programming Times Table B-7 shows the time required for PROM and serial programming and repro- gramming (erasing and programming).
Programming Time (User Program Only)
Reprogramming
Writer
Time
— 3.5–4 minutes

page Line defini- Description of Changes tion Former version New version Cover Pub number C 22385-010E 22385-011E Colophon C September, 2001 1st Edition October, 2001 1st Edition 1st Printing Sales office C Latest version

page Before Modify page After Modify
P16 This manual is intended for assembly-language programming engineers. It describes the internal configuration and hardware functions of the MN102H75K microcontrollers.
P16 This manual is intended for assembly-language programming engineers. It describes the internal configuration and hardware functions of the MN102H75K and MN102H85K microcontrollers. Except when discusssiing differing specifications,this manual refers to the two microcontrollers as a single device : MN102H75K/85K.
Using This Manual The chapters in this manual deal with the internal blocks of the MN102H75K. Chapters 1 to 5 provide an overview of the MN102H75K’s general specifications, interrupts, power modes, timers, and serial connections. Chapters 6 to 10 describe the on-screen display and other specialized functions available with the MN102H75K. Chapter 11 provides the I/O port specifications, chapter 12 describes the ROM correction feature, chapter 13 describes the I2C interface, and chapter 14 describes the H scan line counter. Appendix A provides a register map, and Appendix B describes the flash EEPROM version.
Using This Manual The chapters in this manual deal with the internal blocks of the MN102H75K/85K. Chapters 1 to 5 provide an overview of the MN102H75K/85K’s general specifications, interrupts, power modes, timers, and serial connections. Chapters 6 to 10 describe the on-screen display and other specialized functions available with the MN102H75K/85K. Chapter 11 provides the I/O port specifications, chapter 12 describes the ROM correction feature, chapter 13 describes the I2C interface, and chapter 14 describes the H scan line counter. Appendix A provides a register map, and Appendix B describes the flash EEPROM version. P17 I MN10200 Series Linear Addressing High-Speed Version LSI User Manual (Describes the core hardware.) I MN10200 Series Linear Addressing High-Speed Version Instruction Manual (Describes the instruction set.) I MN10200 Series Linear Addressing High-Speed Version C Compiler User Manual: Usage Guide (Describes the installation, commands, and options for the C compiler.) I MN10200 Series Linear Addressing High-Speed Version C Compiler User Manual: Language Description (Describes the syntax for the C compiler.) I MN10200 Series Linear Addressing High-Speed Version C Compiler User Manual: Library Reference (Describes the standard libraries for the C compiler.) I MN10200 Series Linear Addressing High-Speed Version Cross-Assembler User Manual (Describes the assembler syntax and notation.) I MN10200 Series Linear Addressing Version C Source Code Debugger User Manual (Describes the use of the C source code debugger.) I MN10200 Series Linear Addressing Version PanaX Series Installation Manual (Describes the installation of the C compiler, cross-assembler, and C source code debugger and the procedures for using the in-circuit emulator.)
P17 I MN102H Series LSI User Manual (Describes the core hardware.) I MN102H Series Instruction Manual (Describes the instruction set.) I MN102H Series C Compiler User Manual: Usage Guide (Describes the installation, commands, and options for the C compiler.) I MN102H Series C Compiler User Manual: Language Description (Describes the syntax for the C compiler.) I MN102H Series C Compiler User Manual: Library Reference (Describes the standard libraries for the C compiler.) I MN102H Series Cross-Assembler User Manual (Describes the assembler syntax and notation.) I MN102H Series C Source Code Debugger User Manual (Describes the use of the C source code debugger.) I MN102H Series Installation Manual (Describes the installation of the C compiler, cross-assembler, and C source code debugger and the procedures for using the in-circuit emulator.)
Questions and Comments We welcome your questions, comments, and suggestions. Please contact the semicon- ductor design center closest to you. See the last page of this manual for a list of addresses and telephone numbers. You can also find contact and product information on the World Wide Web at: http://www.psdc.com/
P24 Figure 1-5 shows the address space for the MN102H75K.The internal ROM contains the instructions and the font data for the on-screen dis- play (OSD), in any location. The internal RAM contains the MCU data and the VRAM for the OSD, in any location.
P24 Figure 1-5 shows the address space for the MN102H75K/85K.The internal ROM contains the instructions and the font data for the on- screen display (OSD), in any location. The internal RAM contains the MCU data and the VRAM for the OSD, in any location
I/O ports 66(MN102H75K/F75K) / 50(MN102H85K/F85K)
Package 84-pin QFP(MN102H75K/F75K) / 64-pin SDIL(MN102H85K/F85K)
I/O ports 66 · Package 84-pin QFP

1.6.1 MN102H85K Pin Description
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
VSS OSC2 OSC1 VDD P61, SCL0 * P60, SDA0 * P57, SBT0 P56, SBI0, SBD0 P55, SBO0 P54, IRQ5, VSYNC P53, RST P52, IRQ4, VI0 TEST P51, YS P50, SYSCLK P47, HSYNC P46, OSDXI P45, OSDXO P44, TM5IC, HI1 * P43, TM5IOB, HI0 * P42, TM5IOA * P41, TM1IO * VCOI PDO P40, DAYMOUT, YM P37, DABOUT, B P36, DAGOUT, G P35, DAROUT, R VREF, P34 IREF COMP AVDD
* P01, SDA1 * P02, SCL1 P03, ADIN0 P04, ADIN1 P05, ADIN2 P06, ADIN3 P07, ADIN4 P10, ADIN5, IRQ1 P11, ADIN6, IRQ2 P12, ADIN7, IRQ3 P13, ADIN8, WDOUT
64-Pin SDIP Top View
P14, ADIN9, STOP P15, ADIN10, PWM0 P16, ADIN11, PWM1
P17, PWM2 P20, PWM3 P21, PWM4 P22, PWM5 P23, PWM6 P24, TM4IC, SBT1 P25, TM4IOB, SBI1, SBD1
P27, TM0IO
VDD (VPP)
P30, CLH
VREFHS P31, CVBS0
VSS P32, CVBS1
VREFLS P33, CLL
1.6.1 MN102H75K Pin Description
1.6.2 MN102H75K Pin Description
P00, RMIN, IRQ0
P56, SBI0, SBD0
P00, RMIN, IRQ0
P60, SDA0 *
P61, SCL0 *
P01, SDA1 *
P02, SCL1 *
P03, ADIN0
P04, ADIN1
P05, ADIN2
P06, ADIN3
P07, ADIN4
P57, SBT0
P60, SDA0 *
P61, SCL0 *
P01, SDA1 *
P02, SCL1 *
P03, ADIN0
P04, ADIN1
P05, ADIN2
P06, ADIN3
P07, ADIN4
P57, SBT0
VDD
OSC1
OSC2
P85
P86
VDD
OSC1
OSC2
VSS
P87
P70
P85
NC
P86
VSS
P87
P70
NC
P55, SBO0
NC
P55, SBO0
NC
P54, IRQ5, VSYNC
P71
P54, IRQ5, VSYNC
P71
P84
NC
P10, ADIN5, IRQ1
P11, ADIN6, IRQ2
P84
NC
P10, ADIN5, IRQ1
P11, ADIN6, IRQ2
P52, IRQ4, VI0
P53, RST
P12, ADIN7, IRQ3
P72
P52, IRQ4, VI0
P53, RST
P12, ADIN7, IRQ3
P72
TEST
P13, ADIN8, WDOUT
TEST
P13, ADIN8, WDOUT
P51, YS
P83
P14, ADIN9, STOP
P73
P51, YS
P83
P14, ADIN9, STOP
P73
P50, SYSCLK
84-Pin QFP Top View
P50, SYSCLK
P82
84-Pin QFP Top View
P16, ADIN11, PWM1
P47, HSYNC
P82
P16, ADIN11, PWM1
P17, PWM2
P47, HSYNC
P17, PWM2
P46, OSDXI
P81
P20, PWM3
P21, PWM4
P46, OSDXI
P81
P20, PWM3
P21, PWM4
P45, OSDXO
P22, PWM5
* P44, TM5IC, HI1
P45, OSDXO
P22, PWM5
P23, PWM6
* P43, TM5IOB, HI0
* P44, TM5IC, HI1
P23, PWM6
P24, TM4IC, SBT1
* P43, TM5IOB, HI0
P24, TM4IC, SBT1
* P42, TM5IOA
* P41, TM1IO
P25, TM4IOB, SBI1, SBD1
P26, TM4IOA, SBO1
* P42, TM5IOA
* P41, TM1IO
P25, TM4IOB, SBI1, SBD1
P26, TM4IOA, SBO1
VCOI
P27, TM0IO
VCOI
PDO
P27, TM0IO
P74
PDO
P74
P80
P40, DAYMOUT, YM
P37, DABOUT, B
P77
P36, DAGOUT, G
P35, DAROUT, R
VREF, P34
P76
IREF
COMP
AVDD
P33, CLL
VREFLS
P32, CVBS1
NC
VSS
P31, CVBS0
VREFHS
P30, CLH
VDD (VPP)
P75
P80
P40, DAYMOUT, YM
P37, DABOUT, B
P77
P36, DAGOUT, G
P35, DAROUT, R
VREF, P34
P76
IREF
COMP
AVDD
P33, CLL
VREFLS
P32, CVBS1
NC
VSS
P31, CVBS0
VREFHS
P30, CLH
VDD (VPP)
P75
P32 Table 1-3 Pin Function(Continued) P33 Table 1-3 Pin Function(Continued)
P10-P17
P10-P17
P20-P27
P20-P27
P30-P37
P30-P37
P40-P47
P40-P47
P50-P57
P50-P57
P60-P61
P60-P61
P70-P77
I/O ports only in MN102H75K/HF75K
P80-P87
P80-P87
P33
P34
V DD
V DD
V DD
AV DD
V DD
AV DD
MN102H75K MN102H85K
MN102H75K
V SS
AV SS
V SS
AV SS
V SS
V SS

P33 The MN102H75K contains an internal PLL circuit. To use this circuit, you must connect it to an external (lag-lead) filter.
P34 The MN102H75K/85K contains an internal PLL circuit. To use this circuit, you must connect it to an external (lag-lead) filter.
P37 The most important factor in real-time control is an MCU’s speed in servicing interrupts. The MN102H75K has an extremely fast interrupt response time due to its ability to abort instructions, such as multiply or divide, that require multiple clock cycles. The MN102H75K re- executes an aborted instruction after returning from the interrupt service routine.
P37 The most important factor in real-time control is an MCU’s speed in servicing interrupts. The MN102H75K/85K has an extremely fast interrupt response time due to its ability to abort instructions, such as multiply or divide, that require multiple clock cycles. The MN102H75K/85K re-executes an aborted instruction after returning from the interrupt service routine.
This section describes the interrupt system in the MN102H75K. The MN102H75K contains 36 interrupt group controllers. Each controls a single interrupt group. Because each group contains only one interrupt vector, the MN102H75K can handle interrupts much quicker than pre- viously possible. Each interrupt group belongs to one of twelve classes, which defines its interrupt priority level. With the exception of reset interrupts, all interrupts from timers, other peripheral circuits, and external pins must be registered in an interrupt group controller. Once they are registered, interrupt requests are sent to the CPU in accordance with the interrupt mask level (0 to 6) set in the interrupt group controller. Groups 1 to 3 are dedicated to system inter- rupts. Table 2-1 compares the interrupt parameters of the MN102H75K to those of the MN102L35G, the comparable MCU in the previous gen- eration of the 16-bit series
This section describes the interrupt system in the MN102H75K/85K. The MN102H75K/85K contains 36 interrupt group controllers. Each controls a single interrupt group. Because each group contains only one interrupt vector, the MN102H75K/85K can handle interrupts much quicker than previously possible. Each interrupt group belongs to one of twelve classes, which defines its interrupt priority level. With the exception of reset interrupts, all interrupts from timers, other peripheral circuits, and external pins must be registered in an interrupt group controller. Once they are registered, interrupt requests are sent to the CPU in accordance with the interrupt mask level (0 to 6) set in the interrupt group controller. Groups 1 to 3 are dedicated to system inter- rupts. Table 2-1 compares the interrupt parameters of the MN102H75K/ 85K to those of the MN102L35G, the comparable MCU in the previous generation of the 16-bit series
Table2-1Comparison of MN102H75K and MN102L35G Interrupt Features
Table2-1Comparison of MN102H75K/85K and MN102L35G Interrupt Features
4 vectors per group (Separated by interrupt service routine)
4 vectors per group (Separated by interrupt service routine)
interrupt groups (IAGR group numbers)
1 vector per group (Group number gener- ated for each interrupt)
interrupt groups (IAGR group numbers)
1 vector per group (Group number gener- ated for each interrupt)
4 vectors per level
4 vectors per level
4 vectors per level
4 vectors per level
The MN102H75K/85K has six external interrupt pins. Set the interrupt condition (positive edge, negative edge, either edge, or active low) in the EXTMD register P72 The MN102H75K provides two ways to reduce power consumption, controlling CPU operating and standby modes to cut overall consumption and shutting down unused functions by stopping the system clock supplied to them.
The MN102H75K has six external interrupt pins. Set the interrupt con- dition (positive edge, negative edge, either edge, or active low) in the EXTMD register
P72 The MN102H75K/85K provides two ways to reduce power consumption, con- trolling CPU operating and standby modes to cut overall consumption and shutting down unused functions by stopping the system clock supplied to them.
3.1 CPU Modes
3.1.1 Description The MN102H75K has two CPU operating modes, NORMAL and SLOW, and two CPU standby modes, HALT and STOP. Effective use of these modes can signifi- cantly reduce power consumption. Figure 3-1 shows the CPU states in the different modes
3.1.1 Description The MN102H75K/85K has two CPU operating modes, NORMAL and SLOW, and two CPU standby modes, HALT and STOP. Effective use of these modes can sig- nificantly reduce power consumption. Figure 3-1 shows the CPU states in the dif- ferent modes
P73
The MN102H75K/85K recovers from power up and reset in SLOW
The MN102H75K/85K recovers from power up and reset in SLOW
mode. For normal operation, the program must switch the MCU from
mode. For normal operation, the program must switch the MCU from
SLOW to NORMAL mode
SLOW to NORMAL mode
P73 The MN102H75K contains a PLL circuit that, in NORMAL mode, multiplies the clock input through the OSC1 and OSC2 pins by 12, divides the signal by 2, then sends the resulting clock to the CPU. (See figure 3-2.) The MCU starts in SLOW mode on power up and on recovery from a reset. In SLOW mode (system clock = 2 MHz), the clock from the OSC pins feeds directly to the CPU, without going through the PLL circuit. This means that the program must switch the CPU from SLOW to NORMAL mode (system clock = 12 MHz)
P73 The MN102H75K/85K contains a PLL circuit that, in NORMAL mode, multiplies the clock input through the OSC1 and OSC2 pins by 12, divides the signal by 2, then sends the resulting clock to the CPU. (See figure 3-2.) The MCU starts in SLOW mode on power up and on recovery from a reset. In SLOW mode (system clock = 2 MHz), the clock from the OSC pins feeds directly to the CPU, without going through the PLL circuit. This means that the program must switch the CPU from SLOW to NORMAL mode (system clock = 12 MHz)
P73 For information on invoking SLOW mode from NORMAL mode, see MN10200 Series Linear Addressing High-Speed Version LSI User Manual.
P73 For information on invoking SLOW mode from NORMAL mode, see MN102H Series LSI User Manual.
P75 The MN102H75K allows you to turn each peripheral function on or off through writing to the registers. You can significantly reduce power consumption by turning off unused functions. Table 3-1 shows the register bits controlling on and off for each function block. The ADC used for the OSD and CCD functions is turned off on reset. Write a 1 to the function to enable it, when necessary
P75 The MN102H75K/85K allows you to turn each peripheral function on or off through writing to the registers. You can significantly reduce power consumption by turning off unused functions. Table 3-1 shows the register bits controlling on and off for each function block. The ADC used for the OSD and CCD functions is turned off on reset. Write a 1 to the function to enable it, when necessary

P77 The MN102H75K contains four 8-bit timers that can serve as interval timers, event timer/counters, clock generators (divide-by-2 output of the underflow), reference clocks for the serial interfaces, or start timers for A/D conversions. The clock source can be the internal clock (oscil- lator frequency divided by 2) or the external clock (1/4 or less the oscil- lator frequency input). A timer interrupt is generated by a timer underflow
P77 The MN102H75K/85K contains four 8-bit timers that can serve as interval timers, event timer/counters, clock generators (divide-by-2 out- put of the underflow), reference clocks for the serial interfaces, or start timers for A/D conversions. The clock source can be the internal clock (oscillator frequency divided by 2) or the external clock (1/4 or less the oscillator frequency input). A timer interrupt is generated by a timer underflow
P88 The MN102H75K contains two 16-bit up/down timers, timers 5 and 6. Associated with each timer are two compare/capture registers that can capture and compare the up/down counter values, generate PWM sig- nals, and generate interrupts. The PWM function has a double buffering mode that causes cycle and transition changes to occur at the beginning of the next clock cycle. This prevents PWM signal losses and mini- mizes waveform distortion during timing changes
P88 The MN102H75K/85K contains two 16-bit up/down timers, timers 5 and 6. Associated with each timer are two compare/capture registers that can capture and compare the up/down counter values, generate PWM signals, and generate interrupts. The PWM function has a double buffering mode that causes cycle and transition changes to occur at the beginning of the next clock cycle. This prevents PWM signal losses and minimizes waveform distortion during timing changes
P127 The MN102H75K contains two general-purpose serial interfaces with synchronous serial, UART, and I2C modes. The maximum baud rate in synchronous serial mode is 12 Mbps. In UART mode, the maximum baud rate is 375,000 bps, when BOSC = 24 MHz
P127 The MN102H75K/85K contains two general-purpose serial interfaces with synchronous serial, UART, and I2C modes. The maximum baud rate in synchronous serial mode is 12 Mbps. In UART mode, the maxi- mum baud rate is 375,000 bps, when BOSC = 24 MHz
P143 The MN102H75K contains an 8-bit charge redistribution A/D converter (ADC) that can process up to 12 channels. The reference clock is select- able to BOSC x 1/8 or 1/16. When BOSC is 24 MHz, you must set the reference clock to BOSC/8 (conversion rate = 4 µs) or higher
P143 The MN102H75K/85K contains an 8-bit charge redistribution A/D con- verter (ADC) that can process up to 12 channels. The reference clock is selectable to BOSC x 1/8 or 1/16. When BOSC is 24 MHz, you must set the reference clock to BOSC/8 (conversion rate = 4 µs) or higher
P153 The MN102H75K contains an on-screen display (OSD) function com- posed of three layers: a text layer, a graphics layer, and a cursor layer. You can control each layer individually, which gives you great freedom in positioning displays. You can also modify the ROM space that con- tains the text characters and the graphic tiles and the VRAM space that contains the text and graphics programs. This allows you to adjust the memory space to fit your application
P153 The MN102H75K/85K contains an on-screen display (OSD) function composed of three layers: a text layer, a graphics layer, and a cursor layer. You can control each layer individually, which gives you great freedom in positioning displays. You can also modify the ROM space that contains the text characters and the graphic tiles and the VRAM space that contains the text and graphics programs. This allows you to adjust the memory space to fit your application
P191 This section describes how the MN102H75K handles the timing of direct memory access (DMA) transfers of OSD data and OSD inter- rupts
P191 This section describes how the MN102H75K/85K handles the timing of direct memory access (DMA) transfers of OSD data and OSD inter- rupts
P194 The MN102H75K OSD achieves a shuttering effect using four pro- grammable shutters—two vertical and two horizontal. With this fea- ture, you can shutter any portion of the OSD display, or you can combine shuttering with a wipe-out effect to create a smooth appearing and disappearing effect
P194 The MN102H75K/85K OSD achieves a shuttering effect using four programmable shutters—two vertical and two horizontal. With this fea- ture, you can shutter any portion of the OSD display, or you can com- bine shuttering with a wipe-out effect to create a smooth appearing and disappearing effect
P216 The MN102H75K contains a remote signal receiver that processes sig- nals in two formats: Household Electrical Appliance Manufacturers Association (HEAMA) format and 5-/6-bit format. This chapter pro- vides an overview of each block in the circuit and describes the opera- tion of the receiver
P216 The MN102H75K/85K contains a remote signal receiver that processes signals in two formats: Household Electrical Appliance Manufacturers Association (HEAMA) format and 5-/6-bit format. This chapter pro- vides an overview of each block in the circuit and describes the opera- tion of the receiver
P227 The MN102H75K contains two identical closed-caption decoder cir- cuits, CCD0 and CCD1
P227 The MN102H75K/85K contains two identical closed-caption decoder circuits, CCD0 and CCD1
P229 The clamping circuit internal to the MN102H75K provides three current sources—high, medium, and low.
P229 The clamping circuit internal to the MN102H75K/85K provides three current sources—high, medium, and low.
P249 The MN102H75K contains seven 8-bit pulse width modulators (PWMs) with a minimum pulse width of 16/fSYSCLK and an output waveform cycle of 212/fSYSCLK. (With a 4-MHz oscillator, 16/fSYSCLK = 1.33 µs (8 µs for SLOW mode) and 212/fSYSCLK = 341.3 µs (2 ms for SLOW mode).)
P249 The MN102H75K/85K contains seven 8-bit pulse width modulators (PWMs) with a minimum pulse width of 16/fSYSCLK and an output waveform cycle of 212/fSYSCLK. (With a 4-MHz oscillator, 16/fSYSCLK = 1.33 µs (8 µs for SLOW mode) and 212/fSYSCLK = 341.3 µs (2 ms for SLOW mode).)
P250 The MN102H75K contains 50 pins that form general-purpose I/O ports. Ports 0, 1, 2, 3, 4, and 5 are 8-bit ports, and port 6 is a 2-bit port. All of these pins have alternate functions. (Ports 7 and 8 are only available with the quad flat package.)
P250 The MN102H75K/85K contains 50 pins that form general-purpose I/O ports. Ports 0, 1, 2, 3, 4, and 5 are 8-bit ports, and port 6 is a 2-bit port. All of these pins have alternate functions. (Ports 7 and 8 are only avail- able with the quad flat package.)
P293 The MN102H75K contains one I2C bus controller, fully compliant with the I2C specification, that can control one of two I2C bus connections
P293 The MN102H75K/85K contains one I2C bus controller, fully compliant with the I2C specification, that can control one of two I2C bus connec- tions
P295 Figure 13-3 shows the MN102H75K operation sequence in each of these modes. In all modes, the I2C bus controller generates an interrupt after each data byte transfer, then the software loads the next data byte
P295 Figure 13-3 shows the MN102H75K/85K operation sequence in each of these modes. In all modes, the I2C bus controller generates an inter- rupt after each data byte transfer, then the software loads the next data byte
P299 Figure 13-6 and table 13-5 provide the timing definitions and specifica- tions for the for the MN102H75K I2C bus interface
P299 Figure 13-6 and table 13-5 provide the timing definitions and specifica- tions for the for the MN102H75K/85K I2C bus interface
P301 Note: The circled areas are signals output from the MN102H75K P301 Note: The circled areas are signals output from the MN102H75K/85K
P303 Note: The circled areas are signals output from the MN102H75K P303 Note: The circled areas are signals output from the MN102H75K/85K

P307 The MN102H75K contains two H counter circuits that can be used to count the HSYNC signal. Each H counter consists of a 10-bit counter and 10-bit register
P307 The MN102H75K/85K contains two H counter circuits that can be used to count the HSYNC signal. Each H counter consists of a 10-bit counter and 10-bit register
Table 14-1 H Counter Pins
Table 14-1 H Counter Pins
Pin No.
Pin No.
H75 H85
HI0
P43/TM5IOB
HI0
P43/TM5IOB
HI1
P44/TM5IC
HI1
P44/TM5IC
P52/IRQ4
P52/IRQ4
VSINC
P54/IRQ5
VSINC
P54/IRQ5
P316 The MN102HF75K is electrically programmable, 256-kilobyte flash ROM versions of the MN102H75K . It is programmed in one of two modes:
P316 The MN102HF75K and MN102HF85K are electrically programmable, 256-kilobyte flash ROM versions of the MN102H75K and MN102H85K. They are programmed in one of two modes:
P317 B.2 Benefits Because you can maintain and upgrade the program in the MN102HF75K up to and immediately following product release, this version of the device shortens time-to-market by as much as one month. This device is ideal for applications in quickly changing markets, since it allows you to revise the microcontroller program in an existing prod- uct.
P317 B.2 Benefits Because you can maintain and upgrade the program in the MN102HF75K/85K up to and immediately following product release, this version of the device shortens time-to-market by as much as one month. This device is ideal for applications in quickly changing mar- kets, since it allows you to revise the microcontroller program in an existing product.
B.3 Using the PROM Writer Mode In this mode, the MN102HF75K allows a PROM writer to program the internal flash memory as if it was a standalone memory chip. The microcontroller is inserted into a dedicated adaptor socket, which con- nects to DATA-I/O’s LabSite PROM writer. When the microcontroller connects to the adaptor socket, it automatically enters PROM writer mode. The adaptor socket ties the microcontroller pin states to PROM writer mode, and programming occurs without any reference to the microcontroller pin states.
B.3 Using the PROM Writer Mode In this mode, the MN102HF75K allows a PROM writer to program the internal flash memory as if it was a standalone memory chip. The microcontroller is inserted into a dedicated adaptor socket, which con- nects to DATA-I/O’s LabSite PROM writer. When the microcontroller connects to the adaptor socket, it automatically enters PROM writer mode. The adaptor socket ties the microcontroller pin states to PROM writer mode, and programming occurs without any reference to the microcontroller pin states.
Adaptor socket for MN102HF85K
Adaptor socket for MN102HF75K
Adaptor socket for MN102HF75K
MN102HF75KBF
MN102HF85KDP MN102HF75KBF
84-pin QFP 64-pin SDIP
Set this switch to the right
Ordering information: Part no.:FLS84F18-102HF57 OEM:Matsushita Electric Indus- trial Co.,Ltd.
Ordering information: Part no.:FLS84F18-102HF57 OEM:Matsushita Electric Indus- trial Co.,Ltd.
Ordering information: Part no.:FLS64SD-102HF51 OEM:Matsushita Electric Indus- trial Co.,Ltd.
Gang writer Single-unit writer



LSI User’s Manual
Issued by Matsushita Electric Industrial Co., Ltd.
Matsushita Electric Industrial Co., Ltd.

Semiconductor Company, Matsushita Electric Industrial Co., Ltd.
Tel: (075) 951-8151 http://www.panasonic.co.jp/semicon/
SALES OFFICES
I NORTH AMERICA
GU.S.A. Sales Office:
Panasonic Industrial Company [PIC] • New Jersey Office: Two Panasonic Way Secaucus, New Jersey 07094 U.S.A.
Tel: 60-4-201-5113 Fax:60-4-261-9989 • Johore Sales Office: Menara Pelangi, Suite8.3A, Level8, No.2, Jalan Kuning Taman Pelangi, 80400 Johor Bahru, Johor, MALAYSIA
Panasonic Industrial (THAILAND) Ltd. [PICT] 252-133 Muang Thai-Phatra Complex Building, 31st Fl. Rachadaphisek Rd., Huaykwang, Bangkok 10320, THAILAND
Tel: 66-2-693-3428 Fax:66-2-693-3422 GPhilippines Sales Office: [PISP] Panasonic Indsutrial Sales Philippines Division of Matsushita Electric Philippines Corporation 102 Laguna Boulevard,Bo.Don Jose Laguna Technopark, Santa. Rosa, Laguna 4026 PHILIPPINES
Panasonic Canada Inc. [PCI] 5770 Ambler Drive 27 Mississauga, Ontario, L4W 2T3 CANADA
National Panasonic India Ltd. [NPI] E Block, 510, International Trade Tower Nehru Place, New Delhi_110019 INDIA
GMexico Sales Office:
P.T.MET & Gobel [M&G] JL. Dewi Sartika (Cawang 2) Jakarta 13630, INDONESIA
Panasonic de Mexico, S.A. de C.V. [PANAMEX] Amores 1120 Col. Del Valle Delegacion Benito Juarez C.P. 03100 Mexico, D.F. MEXICO
Tel: 52-5-488-1000 Fax:52-5-488-1073 • Guadalajara Office: SUCURSAL GUADALAJARA Av. Lazaro Cardenas 2305 Local G-102 Plaza Comercial Abastos; Col. Las Torres Guadalajara, Jal. 44920 MEXICO
Panasonic do Brasil Ltda. [PANABRAS] Caixa Postal 1641, Sao Jose dos Campos, Estado de Sao Paulo
Panasonic Industrial (Shanghai) Co., Ltd. [PI(SH)] Floor 6, Zhong Bao Mansion, 166 East Road Lujian Zui, PU Dong New District, Shanghai, 200120 CHINA
Tel: 86-21-5866-6114 Fax:86-21-5866-8000 Panasonic Industrial (Tianjin) Co., Ltd. [PI(TJ)] Room No.1001, Tianjin International Building 75, Nanjin Road, Tianjin 300050, CHINA
GU.K. Sales Office:
Panasonic Industrial Europe Ltd. [PIEL] Willoughby Road, Bracknell, Berks., RG12 8FP, THE UNITED KINGDOM
Tel: 86-22-2313-9771 Fax:86-22-2313-9770 Panasonic SH Industrial Sales (Shenzhen) Co., Ltd.
[PSI(SZ)] 7A-107, International Bussiness & Exhibition Centre, Futian Free Trade Zone, Shenzhen 518048, CHINA
Panasonic Industrial Europe GmbH [PIEG] Hans-Pinsel-Strasse 2 85540 Haar, GERMANY
Tel: 86-755-359-8500 Fax:86-755-359-8516 Panasonic Shun Hing Industrial Sales (Hong Kong) Co., Ltd. [PSI(HK)] 11th Floor, Great Eagle Center 23 Harbour Road, Wanchai, HONG KONG
GSingapore Sales Office:
Panasonic Semiconductor of South Asia [PSSA] 300 Beach Road, #16-01, The Concourse, Singapore 199555 THE REPUBLIC OF SINGAPORE Tel: 65-390-3688 Fax:65-390-3689 GMalaysia Sales Office:
Panasonic Industrial Korea Co., Ltd. [PIKL] Kukje Center Bldg. 11th Fl., 191 Hangangro 2ga, Youngsan-ku, Seoul 140-702, KOREA
Panasonic Industrial Company (M) Sdn. Bhd. [PICM] • Head Office: Tingkat 16B, Menara PKNS Petaling Jaya, No.17, Jalan Yong Shook Lin 46050 Petaling Jaya, Selangor Darul Ehsan, MALAYSIA
Printed in JAPAN Matsushita Electric Industrial Co., Ltd. 2001
Pages referenced in this manual — manufacturer, support and downloads.
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.