UPD78F9200MA-CAC-A Renesas Electronics America, UPD78F9200MA-CAC-A Datasheet

no-image

UPD78F9200MA-CAC-A

Manufacturer Part Number
UPD78F9200MA-CAC-A
Description
MCU 8BIT 1KB FLASH 128B RAM
Manufacturer
Renesas Electronics America
Series
78K0S/Kx1+r
Datasheet

Specifications of UPD78F9200MA-CAC-A

Package / Case
*
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Operating Temperature
-40°C ~ 85°C
Speed
10MHz
Number Of I /o
7
Core Processor
78K0S
Program Memory Type
FLASH
Ram Size
128 x 8
Program Memory Size
1KB (1K x 8)
Data Converters
A/D 4x10b
Oscillator Type
Internal
Peripherals
LVD, POR, PWM, WDT
Core Size
8-Bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
UPD78F9200MA-CAC-A
Manufacturer:
NEC
Quantity:
20 000
To our customers,
Corporation, and Renesas Electronics Corporation took over all the business of both
companies. Therefore, although the old company name remains in this document, it is a valid
Renesas Electronics document. We appreciate your understanding.
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
On April 1
st
, 2010, NEC Electronics Corporation merged with Renesas Technology
Renesas Electronics website: http://www.renesas.com
Old Company Name in Catalogs and Other Documents
April 1
Renesas Electronics Corporation
st
, 2010

Related parts for UPD78F9200MA-CAC-A

UPD78F9200MA-CAC-A Summary of contents

Page 1

To our customers, Old Company Name in Catalogs and Other Documents st On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the ...

Page 2

All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm ...

Page 3

User’s Manual 78K0S/KU1+ 8-Bit Single-Chip Microcontrollers μ PD78F9200 μ PD78F9500 Document No. U18172EJ3V0UD00 (3rd edition) Date Published November 2009 NS 2006 © Printed in Japan μ PD78F9201 μ PD78F9501 μ PD78F9202 μ PD78F9502 ...

Page 4

User’s Manual U18172EJ3V0UD ...

Page 5

VOLTAGE APPLICATION WAVEFORM AT INPUT PIN: Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the CMOS device stays in the area between VIL (MAX) and VIH (MIN) due to noise, ...

Page 6

Windows is a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. PC/ trademark of International Business Machines Corporation. HP9000 series 700 and HP-UX are trademarks of Hewlett-Packard Company. SPARCstation is a ...

Page 7

Target Readers <R> Purpose Organization How to Use This Manual INTRODUCTION This manual is intended for user engineers who wish to understand the functions of the 78K0S/KU1+ in order to design and develop its application systems and programs. The target ...

Page 8

Conventions Related Documents Documents Related to Devices 78K0S/KU1+ User’s Manual 78K/0S Series Instructions User’s Manual <R> Documents Related to Development Software Tools (User’s Manuals) RA78K0S Ver.2.00 Assembler Package CC78K0S Ver.2.00 C Compiler SM+ System Simulator ID78K0S-QB Ver.3.00 Integrated Debugger PM+ ...

Page 9

Other Related Documents SEMICONDUCTOR SELECTION GUIDE - Products and Packages - Semiconductor Device Mount Manual Quality Grades on NEC Semiconductor Devices NEC Semiconductor Device Reliability/Quality Control System Guide to Prevent Damage for Semiconductor Devices by Electrostatic Discharge (ESD) Note See ...

Page 10

CHAPTER 1 OVERVIEW.........................................................................................................................14 1.1 Features .........................................................................................................................................14 1.2 Ordering Information....................................................................................................................15 1.3 Pin Configuration (Top View) ......................................................................................................16 1.3.1 PD78F920x .....................................................................................................................................16 1.3.2 PD78F950x .....................................................................................................................................16 1.4 78K0S/Kx1+ Product Lineup........................................................................................................17 1.5 Block Diagram...............................................................................................................................18 1.5.1 PD78F920x .....................................................................................................................................18 1.5.2 PD78F950x .....................................................................................................................................19 1.6 Functional Outline ........................................................................................................................20 CHAPTER 2 ...

Page 11

Register addressing .......................................................................................................................... 46 3.4 Operand Address Addressing .................................................................................................... 47 3.4.1 Direct addressing .............................................................................................................................. 47 3.4.2 Short direct addressing ..................................................................................................................... 48 3.4.3 Special function register (SFR) addressing ....................................................................................... 49 3.4.4 Register addressing .......................................................................................................................... 50 3.4.5 Register indirect addressing.............................................................................................................. 51 ...

Page 12

PPG output operations ....................................................................................................................116 6.4.6 One-shot pulse output operation .....................................................................................................119 6.5 Cautions Related to 16-Bit Timer/Event Counter 00 ...............................................................124 CHAPTER 7 8-BIT TIMER H1 .............................................................................................................131 7.1 Functions of 8-Bit Timer H1.......................................................................................................131 7.2 Configuration of 8-Bit Timer H1 ................................................................................................131 7.3 ...

Page 13

Interrupt request pending .............................................................................................................. 185 CHAPTER 11 STANDBY FUNCTION..................................................................................................186 11.1 Standby Function and Configuration .....................................................................................186 11.1.1 Standby function ........................................................................................................................... 186 11.1.2 Registers used during standby ( 11.2 Standby Function Operation ...................................................................................................189 11.2.1 HALT mode ................................................................................................................................... 189 11.2.2 STOP mode ...

Page 14

RESET pin.....................................................................................................................................231 16.6.4 Port pins ........................................................................................................................................231 16.6.5 Power supply.................................................................................................................................231 16.7 On-Board and Off-Board Flash Memory Programming ........................................................232 16.7.1 Flash memory programming mode................................................................................................232 16.7.2 Communication commands ...........................................................................................................232 16.7.3 Security settings ............................................................................................................................233 16.8 Flash Memory Programming by Self Programming..............................................................234 16.8.1 Outline ...

Page 15

APPENDIX A DEVELOPMENT TOOLS ..............................................................................................310 A.1 Software Package ......................................................................................................................313 A.2 Language Processing Software ...............................................................................................313 A.3 Flash Memory Writing Tools.....................................................................................................314 A.3.1 When using flash memory programmer PG-FP5 and FL-PR5........................................................ 314 A.3.2 When using on-chip debug emulator with programming function QB-MINI2................................... 314 ...

Page 16

Features O 78K0S CPU core O ROM and RAM capacities Item Part number μ <R> PD78F9200, 78F9500 μ <R> PD78F9201, 78F9501 μ <R> PD78F9202, 78F9502 O Minimum instruction execution time: 0.2 O Clock • High-speed system clock … Selected ...

Page 17

O Assembler and C language supported O Enhanced development environment • Support for full-function emulator (IECUBE), simplified emulator (MINICUBE2), and simulator O Supply voltage ∗ Use these products at V range. O Operating temperature range: T 1.2 Ordering ...

Page 18

Pin Configuration (Top View) μ 1.3.1 PD78F920x 10-pin plastic SSOP P20/ANI0/TI000/TOH1 P23/X1/ANI3 ANI0 to ANI3: Analog input INTP0, INTP1: External interrupt input P20 to P23: Port 2 P30, P34: Port 3 P40, P43: Port 4 ...

Page 19

Product Lineup The following table shows the product lineup of the 78K0S/Kx1+. Part Number Item Number of pins <R> Internal Flash memory memory RAM Supply voltage Minimum instruction execution time System clock (oscillation frequency) Clock for TMH1 and ...

Page 20

Block Diagram μ 1.5.1 PD78F920x TO00/TI010/P21 16-bit TIMER/ EVENT COUNTER 00 TI000/P20 TOH1/P20 8-bit TIMER H1 LOW-SPEED INTERNAL OSCILLATOR WATCHDOG TIMER ANI0/P20- A/D CONVERTER 4 ANI3/P23 INTP0/P21 INTERRUPT CONTROL INTP1/P32 μ Notes 1. In PD78F920x, V functions alternately as ...

Page 21

PD78F950x TOH1/P20 8-bit TIMER H1 LOW-SPEED INTERNAL OSCILLATOR WATCHDOG TIMER INTP0/P21 INTERRUPT CONTROL INTP1/P32 CHAPTER 1 OVERVIEW 78K0S FLASH CPU MEMORY CORE POWER ON CLEAR/ LOW VOLTAGE INTERNAL HIGH-SPEED RESET CONTROL RAM User’s ...

Page 22

Functional Outline Item <R> Internal Flash memory memory High-speed RAM Memory space <R> X1 input clock (oscillation frequency) Internal High speed (oscillation oscillation frequency) clock Low speed (for TMH1 and WDT) General-purpose registers Instruction execution time I/O port Timer ...

Page 23

Pin Function List 2.1.1 PD78F920x (1) Port pins Pin Name I/O P20 I/O Port 2. 4-bit I/O port. P21 Can be set to input or output mode in 1-bit units. An on-chip pull-up resistor can be connected by setting ...

Page 24

Non-port pins Pin Name I/O INTP0 Input External interrupt input for which the valid edge (rising edge, falling edge, or both rising and falling edges) can be specified INTP1 TI000 Input External count clock input to 16-bit timer/event counter ...

Page 25

PD78F950x (1) Port pins Pin Name I/O P20 I/O P21 P22 Note P23 P32 I/O Note P34 Input P40, P43 I/O Note For the setting method for pin functions, see CHAPTER 15 OPTION BYTE. Caution The P22 and ...

Page 26

Pin Functions 2.2.1 P20 to P23 (Port 2) P20 to P23 constitute a 4-bit I/O port. In addition to the function as I/O port pins, these pins also have a function to input an analog signal to the A/D ...

Page 27

P32 and P34 (Port 3) P32 is a 1-bit I/O port. In addition to the function as an I/O port pin, this pin also has a function to input an external interrupt request signal. P34 is a 1-bit input-only ...

Page 28

EXCLK ( PD78F950x) This is the external clock input pin for the main system clock. EXCLK functions as P23. For the setting method for pin functions, see CHAPTER 15 OPTION BYTE. Caution The P23/EXCLK pin is pulled down during ...

Page 29

Pin I/O Circuits and Connection of Unused Pins Tables 2-1 and 2-2 show I/O circuit type of each pin and the connections of unused pins. For the configuration of the I/O circuit of each type, refer to Figure 2-1. ...

Page 30

Type 2 IN Schmitt-triggered input with hysteresis characteristics Type 2-A Pull up enable IN Schmitt-triggered input with hysteresis characteristics Type 8-A Pull up enable Data Output disable Type 11 Pull up enable Data Output disable Comparator + - V ...

Page 31

Memory Space The 78K0S/KU1+ can access memory space. Figures 3-1 to 3-3 show the memory maps. <R> Data memory space Program memory space Remark The option byte and protect byte are 1 byte each. ...

Page 32

Data memory space Program ...

Page 33

Data memory space Program memory space Remark The option byte and protect byte are 1 byte each. CHAPTER 3 CPU ARCHITECTURE Figure 3-3. Memory Map ( PD78F9202, 78F9502 Special function registers (SFR) 256 8 ...

Page 34

Internal program memory space The internal program memory space stores programs and table data. This space is usually addressed by the program counter (PC). The 78K0S/KU1+ provide the following internal ROMs (or flash memory) containing the following capacities. <R> ...

Page 35

Internal data memory space 128-byte internal high-speed RAM is provided in the 78K0S/KU1+. The internal high-speed RAM can also be used as a stack memory. 3.1.3 Special function register (SFR) area Special function registers (SFRs) of on-chip peripheral hardware ...

Page 36

Figure 3-5. Data Memory Addressing ( PD78F9201, 78F9501 Special function registers (SFR) 256 Internal ...

Page 37

Special function registers (SFR Internal high-speed RAM ...

Page 38

Processor Registers The 78K0S/KU1+ provide the following on-chip processor registers. 3.2.1 Control registers The control registers have special functions to control the program sequence statuses and stack memory. The control registers include a program counter, a program status word, ...

Page 39

CHAPTER 3 CPU ARCHITECTURE (a) Interrupt enable flag (IE) This flag controls interrupt request acknowledge operations of the CPU. When the interrupt disabled (DI) status is set. All interrupt requests are disabled. When the ...

Page 40

Stack pointer (SP) This is a 16-bit register to hold the start address of the memory stack area. Only the internal high-speed RAM area can be set as the stack area (Other than the internal high-speed RAM area cannot ...

Page 41

General-purpose registers A general-purpose register consists of eight 8-bit registers ( and H). In addition each register being used as an 8-bit register, two 8-bit registers in pairs can be used as a ...

Page 42

Special function registers (SFRs) Unlike the general-purpose registers, each special function register has a special function. The special function registers are allocated to the 256-byte area FF00H to FFFFH. The special function registers can be manipulated, like the general-purpose ...

Page 43

Address Symbol 7 FF00H, FF01H FF02H P2 0 FF03H P3 0 FF04H P4 0 FF05H to FF0DH FF0EH CMP01 FF0FH CMP11 FF10H, FF11H FF12H TM00 Note 2 FF13H FF14H CR000 Note 2 FF15H FF16H CR010 Note 2 FF17H FF18H ADCR ...

Page 44

Address Symbol 7 6 FF50H LVIM <LVI 0 ON> FF51H LVIS 0 0 FF52H, FF53H FF54H RESF 0 0 FF55H to FF57H FF58H LSRCM 0 0 FF59H to FF5FH FF60H TMC00 0 0 Note 3 FF61H PRM00 ES110 ES100 Note ...

Page 45

Address Symbol 7 FFA0H PFCMD REG7 FFA1H PFS 0 FFA2H FLPMC 0 FFA3H FLCMD 0 FFA4H FLAPL FLA P7 FFA5H FLAPH 0 FFA6H FLAPHC 0 FFA7H FLAPLC FLAP C7 FFA8H FLW FLW7 − − FFA9H to FFDFH FFE0H IF0 <ADIF> ...

Page 46

Instruction Address Addressing An instruction address is determined by the program counter (PC) contents. The PC contents are normally incremented (+1 for each byte) automatically according to the number of bytes of an instruction to be fetched each time ...

Page 47

Immediate addressing [Function] Immediate data in the instruction word is transferred to the program counter (PC) to branch. This function is carried out when the CALL !addr16 and BR !addr16 instructions are executed. CALL !addr16 and BR !addr16 instructions ...

Page 48

Register addressing [Function] The register pair (AX) contents to be specified with an instruction word are transferred to the program counter (PC) to branch. This function is carried out when the BR AX instruction is executed. [Illustration ...

Page 49

Operand Address Addressing The following methods (addressing) are available to specify the register and memory to undergo manipulation during instruction execution. 3.4.1 Direct addressing [Function] The memory indicated by immediate data in an instruction word is directly addressed. [Operand ...

Page 50

Short direct addressing [Function] The memory to be manipulated in the fixed space is directly addressed with the 8-bit data in an instruction word. The fixed space where this addressing is applied is the 160-byte space FE80H to FF1FH ...

Page 51

Special function register (SFR) addressing [Function] A memory-mapped special function register (SFR) is addressed with the 8-bit immediate data in an instruction word. This addressing is applied to the 256-byte space FF00H to FFFFH. However, SFRs mapped at FF00H ...

Page 52

Register addressing [Function] A general-purpose register is accessed as an operand. The general-purpose register to be accessed is specified with the register specify code and functional name in the instruction code. Register addressing is carried out when an instruction ...

Page 53

Register indirect addressing [Function] The memory is addressed with the contents of the register pair specified as an operand. The register pair to be accessed is specified with the register pair specify code in the instruction code. This addressing ...

Page 54

Based addressing [Function] 8-bit immediate data is added to the contents of the base register, that is, the HL register pair, and the sum is used to address the memory. Addition is performed by expanding the offset data as ...

Page 55

Stack addressing [Function] The stack area is indirectly addressed with the stack pointer (SP) contents. This addressing method is automatically employed when the PUSH, POP, subroutine call, and return instructions are executed or the register is saved/restored upon interrupt ...

Page 56

Functions of Ports The 78K0S/KU1+ has the ports shown in Figure 4-1, which can be used for various control operations. Table 4-1 shows the functions of each port. In addition to digital I/O port functions, each of these ports ...

Page 57

Pin Name I/O P20 I/O P21 P22 Note P23 P32 I/O Note P34 Input P40 and P43 I/O Note For the setting method for pin functions, see CHAPTER 15 OPTION BYTE. Caution The P22 and P23/EXCLK pins are pulled ...

Page 58

Port 2 μ (1) PD78F920x Port 4-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using port mode register 2 (PM2). When the ...

Page 59

CHAPTER 4 PORT FUNCTIONS Figure 4-2. Block Diagram of P20 and P21 ( WR PU PU2 PU20, PU21 WR PMC PMC2 PMC20, PMC21 Alternate RD function WR PORT P2 Output latch (P20, P21 PM2 PM20, PM21 Alternate function ...

Page 60

Figure 4-3. Block Diagram of P22 ( WR PU PU2 PU22 WR PMC PMC2 PMC22 RD WR PORT P2 Output latch (P22 PM2 PM22 A/D converter P2: Port register 2 PU2: Pull-up resistor option register 2 PM2: Port ...

Page 61

CHAPTER 4 PORT FUNCTIONS Figure 4-4. Block Diagram of P23 ( WR PU PU2 PU23 WR PMC PMC2 PMC23 RD WR PORT P2 Output latch (P23 PM2 PM23 A/D converter P2: Port register 2 PU2: Pull-up resistor option ...

Page 62

PD78F950x Port 4-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using port mode register 2 (PM2). When the P20 to P23 ...

Page 63

PORT WR PM P2: Port register 2 PU2: Pull-up resistor option register 2 PM2: Port mode register 2 RD: Read signal WR : Write signal CHAPTER 4 PORT FUNCTIONS Figure 4-5. Block Diagram of P20 ...

Page 64

PORT Output latch WR PM P2: Port register 2 PU2: Pull-up resistor option register 2 PM2: Port mode register 2 RD: Read signal WR : Write signal 62 CHAPTER 4 PORT FUNCTIONS Figure 4-6. Block ...

Page 65

PORT WR PM P2: Port register 2 PU2: Pull-up resistor option register 2 PM2: Port mode register 2 RD: Read signal WR××: Write signal CHAPTER 4 PORT FUNCTIONS Figure 4-7. Block Diagram of P23 ( ...

Page 66

Port 3 The P32 pin is a 1-bit I/O port with an output latch. This pin can be set to the input or output mode by using port mode register 3 (PM3). When this pin is used as an ...

Page 67

RD: Read signal Caution Because the P34 pin functions alternately as the RESET pin used as an input port pin, the function to input an external reset signal to the RESET pin cannot be used. The function ...

Page 68

Port 4 Port 2-bit I/O port with an output latch. Each bit of this port can be set to the input or output mode by using Note port mode register 4 (PM4) . When the P40 ...

Page 69

Port mode registers (PM2 to PM4) These registers are used to set the corresponding port to the input or output mode in 1-bit units. Each port mode register can be set by a 1-bit or 8-bit memory manipulation instruction. ...

Page 70

Port registers (P2 to P4) These registers are used to write data to be output from the corresponding port pin to an external device connected to the chip. When a port register is read, the pin level is read ...

Page 71

Figure 4-14. Format of Port Mode Control Register 2 ( Address: FF84H, After reset: R/W Symbol 7 PMC2 0 PMC2n 0 Port/alternate-function (except the A/D converter function) mode 1 A/D converter mode Caution When PMC20 to PMC23 are set to ...

Page 72

Pull-up resistor option registers (PU2 to PU4) These registers are used to specify whether an on-chip pull-up resistor is connected to P20 to P23, P32, P34, P40 and P43. By setting PU2 to PU4, an on-chip pull-up resistor can ...

Page 73

Operation of Port Function The operation of a port differs, as follows, depending on the setting of the I/O mode. Caution Although a 1-bit memory manipulation instruction manipulates 1 bit, it accesses a port in 8-bit units. Therefore, the ...

Page 74

Functions of Clock Generators The clock generators include a circuit that generates a clock (system clock supplied to the CPU and peripheral hardware, and a circuit that generates a clock (interval time generation clock supplied ...

Page 75

Configuration of Clock Generators The clock generators consist of the following hardware. Item Control registers <R> <R> Oscillators CHAPTER 5 CLOCK GENERATORS Table 5-1. Configuration of Clock Generators Processor clock control register (PCC) Preprocessor clock control register (PPCC) Low-speed ...

Page 76

Figure 5-1. Block Diagram of Clock Generators (1/2) (1) PD78F920x Oscillation stabilization time select register (OSTS) OSTS1 OSTS0 System clock oscillation stabilization time counter STOP System clock Note oscillator X1/P23/ANI3 Crystal/ceramic oscillation f X X2/P22/ANI2 External clock input High-speed internal ...

Page 77

PD78F950x STOP System clock Note oscillator EXCLK/P23 External clock input High-speed internal oscillation Note Select the high-speed internal oscillator or external clock input circuit as the system clock source by using the option byte. CHAPTER 5 CLOCK GENERATORS ...

Page 78

Registers Controlling Clock Generators The clock generators are controlled by the following four registers. Processor clock control register (PCC) Preprocessor clock control register (PPCC) Low-speed internal oscillation mode register (LSRCM) <R> Oscillation stabilization time select register (OSTS) ( PD78F920x ...

Page 79

The fastest instruction of the 78K0S/KU1+ is executed in two CPU clocks. Therefore, the relationship between the CPU clock (f ) and the minimum instruction execution time is as shown in Table 5-2. CPU Table 5-2. Relationship between CPU Clock ...

Page 80

Oscillation stabilization time select register (OSTS) ( PD78F920x only) This register is used to select oscillation stabilization time of the clock supplied from the oscillator when the STOP mode is released. The wait time set by OSTS is ...

Page 81

System Clock Oscillators The following three types of system clock oscillators are available. High-speed internal oscillator: Crystal/ceramic oscillator External clock input circuit: <R> Notes 1. PD78F920x only <R> 2. PD78F920x: X1 pin, PD78F950x: EXCLK pin 5.4.1 High-speed internal oscillator ...

Page 82

Figure 5-7 shows examples of incorrect resonator connection. Figure 5-7. Examples of Incorrect Resonator Connection (1/2) (a) Too long wiring of connected circuit (c) Wiring near high fluctuating current CHAPTER 5 CLOCK GENERATORS ...

Page 83

Signals are fetched V SS 5.4.3 External clock input circuit This circuit supplies a clock from an external IC to the X1 pin If external clock input is selected by the option byte as the system clock source, the ...

Page 84

Operation of CPU Clock Generator A clock ( supplied to the CPU from the system clock (f CPU oscillators. High-speed internal oscillator: Note 1 Crystal/ceramic oscillator External clock input circuit: <R> Notes 1. PD78F920x only <R> 2. ...

Page 85

CHAPTER 5 CLOCK GENERATORS (a) The internal reset signal is generated by the power-on clear function on power application, the option byte is referenced after reset, and the system clock is selected. (b) The option byte is referenced and the ...

Page 86

Crystal/ceramic oscillator ( PD78F920x only) <R> If crystal/ceramic oscillation is selected by the option byte, a clock frequency of 2 MHz to 10 MHz can be selected and the accuracy of processing is improved because the frequency deviation is ...

Page 87

CHAPTER 5 CLOCK GENERATORS Figure 5-11. Status Transition of Default Start by Crystal/Ceramic Oscillation ( PD78F920x Only) oscillation stabilization Interrupt HALT Remark PCC: Processor clock control register PPCC: Preprocessor clock control register Power application V > 2.1 V 0.1 V ...

Page 88

External clock input circuit If external clock input is selected by the option byte, the following is possible. High-speed operation The accuracy of processing is improved as compared with high-speed internal oscillation (8 MHz (TYP.)) because an oscillation frequency ...

Page 89

CHAPTER 5 CLOCK GENERATORS Figure 5-13. Status Transition of Default Start by External Clock Input Interrupt HALT Remark PCC: Processor clock control register PPCC: Preprocessor clock control register Power application V > 2 Reset by power-on ...

Page 90

Operation of Clock Generator Supplying Clock to Peripheral Hardware The following two types of clocks are supplied to the peripheral hardware. Clock to peripheral hardware (f XP Low-speed internal oscillation clock (f (1) Clock to peripheral hardware The clock ...

Page 91

Figure 5-14. Status Transition of Low-Speed Internal Oscillator Can be stopped Clock source of WDT is selected Note by software Low-speed internal oscillator can be stopped LSRSTOP = 1 Low-speed internal oscillator stops Note The clock source of the watchdog ...

Page 92

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) 6.1 Functions of 16-Bit Timer/Event Counter 00 16-bit timer/event counter 00 has the following functions. (1) Interval timer 16-bit timer/event counter 00 generates interrupt requests at the preset time interval. ...

Page 93

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( 6.2 Configuration of 16-Bit Timer/Event Counter 00 16-bit timer/event counter 00 consists of the following hardware. Table 6-1. Configuration of 16-Bit Timer/Event Counter 00 Item Timer counter Register Timer input Timer output Control ...

Page 94

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (1) 16-bit timer counter 00 (TM00) TM00 is a 16-bit read-only register that counts count pulses. The counter is incremented in synchronization with the rising edge of the count clock. If ...

Page 95

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) When CR000 is used as a capture register It is possible to select the valid edge of the TI000 pin or the TI010 pin as the capture trigger. Setting of the ...

Page 96

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (3) 16-bit timer capture/compare register 010 (CR010) CR010 is a 16-bit register which has the functions of both a capture register and a compare register. Whether it is used as a ...

Page 97

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Cautions 6. Changing the CR010 setting during TM00 operation may cause a malfunction. To change the setting, refer to 6.5 Cautions Related to 16-Bit Timer/Event Counter 00 (17) Changing compare register ...

Page 98

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-5. Format of 16-Bit Timer Mode Control Register 00 (TMC00) Address: FF60H After reset: 00H R/W Symbol TMC00 TMC003 TMC003 TMC002 ...

Page 99

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Remark TM00: 16-bit timer counter 00 CR000: 16-bit timer capture/compare register 000 CR010: 16-bit timer capture/compare register 010 (2) Capture/compare control register 00 (CRC00) This register controls the operation of the ...

Page 100

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (3) 16-bit timer output control register 00 (TOC00) This register controls the operation of the 16-bit timer/event counter output controller. It sets timer output F/F set/reset, output inversion enable/disable, 16-bit timer/event ...

Page 101

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Caution 6. When the TOE00 is 0, set the TOE00, LVS00, and LVR00 at the same time with the 8-bit memory manipulation instruction. When the TOE00 is 1, the LVS00 and ...

Page 102

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Cautions 3. In the following cases, note with caution that the valid edge of the TI0n0 pin is detected. <1> Immediately after a system reset high level is input ...

Page 103

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-10. Format of Port Mode Control Register 2 (PMC2) Address: FF84H After reset: 00H R/W Symbol 7 PMC2 0 PMC2n 0 Port/Alternate-function (except A/D converter) mode 1 A/D converter mode ...

Page 104

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-11. Control Register Settings for Interval Timer Operation (a) 16-bit timer mode control register 00 (CRC00 CRC00 ES110 ES100 ES010 ES000 PRM00 ...

Page 105

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-13. Timing of Interval Timer Operation t Count clock TM00 count value 0000H 0001H Timer operation enabled CR000 N INTTM000 Remark Interval time = ( 0001H ...

Page 106

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) The external event counter counts the number of external clock pulses to be input to the TI000 pin with using 16-bit timer counter 00 (TM00). TM00 is incremented each time the ...

Page 107

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-16. External Event Counter Configuration Diagram f Noise eliminator XP Valid edge of TI000 Note OVF00 is 1 only when 16-bit timer capture/compare register 000 (CR000) is set to FFFFH. ...

Page 108

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( 6.4.3 Pulse width measurement operations It is possible to measure the pulse width of the signals input to the TI000 pin and TI010 pin using 16-bit timer counter 00 (TM00). There are two ...

Page 109

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-19. Control Register Settings for Pulse Width Measurement with Free-Running Counter and One Capture Register (When TI000 and CR010 Are Used) (a) Capture/compare control register 00 (CRC00 CRC00 ...

Page 110

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-21. Timing of Pulse Width Measurement Operation by Free-Running Counter and One Capture Register (with Both Edges Specified) t Count clock 0000H 0001H TM00 count value TI000 pin input CR010 ...

Page 111

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-22. Control Register Settings for Measurement of Two Pulse Widths with Free-Running Counter (a) Capture/compare control register 00 (CRC00 CRC00 (b) Prescaler ...

Page 112

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-23. Timing of Pulse Width Measurement Operation with Free-Running Counter (with Both Edges Specified) t Count clock 0000H 0001H TM00 count value TI000 pin input CR010 capture value INTTM010 TI010 ...

Page 113

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-24. Control Register Settings for Pulse Width Measurement with Free-Running Counter and Two Capture Registers (with Rising Edge Specified) (a) Capture/compare control register 00 (CRC00 CRC00 0 ...

Page 114

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-25. Timing of Pulse Width Measurement Operation by Free-Running Counter and Two Capture Registers (with Rising Edge Specified) t Count clock TM00 count value 0000H 0001H TI000 pin input CR010 ...

Page 115

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-26. Control Register Settings for Pulse Width Measurement by Means of Restart (with Rising Edge Specified) (2/2) (b) Prescaler mode register 00 (PRM00) ES110 ES100 ES010 ES000 3 PRM00 0/1 ...

Page 116

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) 6.4.4 Square-wave output operation Setting The basic operation setting procedure is as follows. <1> Set the count clock by using the PRM00 register. <2> Set the CRC00 register (see Figure 6-28 ...

Page 117

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-28. Control Register Settings in Square-Wave Output Mode (2/2) (c) 16-bit timer output control register 00 (TOC00) 7 OSPT00 OSPE00 TOC004 LVS00 TOC00 0/1 (d) 16-bit ...

Page 118

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) 6.4.5 PPG output operations Setting 16-bit timer mode control register 00 (TMC00) and capture/compare control register 00 (CRC00) as shown in Figure 6-30 allows operation as PPG (Programmable Pulse Generator) output. ...

Page 119

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-30. Control Register Settings for PPG Output Operation (a) Capture/compare control register 00 (CRC00 CRC00 (b) 16-bit timer output control register 00 ...

Page 120

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-31. Configuration Diagram of PPG Output Noise TI000/ANI0/ eliminator TOH1/P20 f XP Figure 6-32. PPG Output Operation Timing Count clock ...

Page 121

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) 6.4.6 One-shot pulse output operation 16-bit timer/event counter 00 can output a one-shot pulse in synchronization with a software trigger or an external trigger (TI000 pin input). Setting The basic operation ...

Page 122

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-33. Control Register Settings for One-Shot Pulse Output with Software Trigger ES110 ES100 ES010 PRM00 0/1 0/1 0/1 (b) Capture/compare control register 00 (CRC00 CRC00 0 0 ...

Page 123

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-34. Timing of One-Shot Pulse Output Operation with Software Trigger Set TMC00 to 04H (TM00 count starts) Count clock TM00 count 0000H 0001H CR010 set value N CR000 set value ...

Page 124

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-35. Control Register Settings for One-Shot Pulse Output with External Trigger ES110 ES100 ES010 PRM00 0/1 0/1 0 (b) Capture/compare control register 00 (CRC00 CRC00 0 0 ...

Page 125

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-36. Timing of One-Shot Pulse Output Operation with External Trigger (with Rising Edge Specified) When TMC00 is set to 08H (TM00 count starts) t Count clock TM00 count value 0000H ...

Page 126

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) 6.5 Cautions Related to 16-Bit Timer/Event Counter 00 (1) Timer start errors An error one clock may occur in the time required for a match signal to be ...

Page 127

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (4) Capture register data retention The values of 16-bit timer capture/compare registers 0n0 (CR0n0) after 16-bit timer/event counter 00 has stopped are not guaranteed. Remark (5) Setting ...

Page 128

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) <3> Do not set the 16-bit timer capture/compare registers 000 and 010 (CR000 and CR010) to 0000H. (12) One-shot pulse output with external trigger <1> Do not input the external trigger ...

Page 129

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) Figure 6-39. Capture Register Data Retention Timing Count clock TM00 count value Edge input INTTM010 Capture read signal CR010 capture value (15) Capture operation <1> If the valid edge of the ...

Page 130

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (17) Changing compare register during timer operation <1> With the 16-bit timer capture/compare register 0n0 (CR0n0) used as a compare register, when changing CR0n0 around the timing of a match between ...

Page 131

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( PD78F920x ONLY) (18) Edge detection <1> In the following cases, note with caution that the valid edge of the TI0n0 pin is detected. (a) Immediately after a system reset high level ...

Page 132

CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00 ( (23) External clock limitation <1> When using an input pulse of the TI000 pin as a count clock (external trigger), be sure to input the pulse width which satisfies the AC characteristics. For ...

Page 133

Functions of 8-Bit Timer H1 8-bit timer H1 has the following functions. • Interval timer • PWM output mode • Square-wave output 7.2 Configuration of 8-Bit Timer H1 8-bit timer H1 consists of the following hardware. Item Timer register ...

Page 134

H mode register 1 (TMHMD1) TMHE1 CKS12 CKS11 CKS10 TMMD11 TMMD10 TOLEV1 TOEN1 3 2 Decoder ...

Page 135

H compare register 01 (CMP01) This register can be read or written by an 8-bit memory manipulation instruction. Reset signal generation clears this register to 00H. Figure 7-2. Format of 8-Bit Timer H Compare Register 01 (CMP01) ...

Page 136

Registers Controlling 8-Bit Timer H1 The following four registers are used to control 8-Bit Timer H1. • 8-bit timer H mode register 1 (TMHMD1) • Port mode register 2 (PM2) • Port register 2 (P2) • Port mode control ...

Page 137

Figure 7-4. Format of 8-Bit Timer H Mode Register 1 (TMHMD1) Address: FF70H After reset: 00H <7> Symbol TMHMD1 TMHE1 CKS12 TMHE1 0 Stop timer count operation (counter is cleared Enable timer count operation (count operation started ...

Page 138

Port mode register 2 (PM2) and port mode control register 2 (PMC2) <R> When using the P20/TOH1/TI000/ANI0 pin for timer output, clear PM20, the output latch of P20, and PMC20 to 0. PM2 and PMC2 can be set by ...

Page 139

Usage Generates the INTTMH1 signal repeatedly at the same interval. <1> Set each register. Figure 7-7. Register Setting During Interval Timer/Square-Wave Output Operation (i) Setting timer H mode register 1 (TMHMD1) TMHE1 CKS12 CKS11 TMHMD1 0 0/1 0/1 (ii) ...

Page 140

Figure 7-8. Timing of Interval Timer/Square-Wave Output Operation (1/2) (a) Basic operation (01H ≤ CMP01 ≤ FEH) Count clock Count start 00H 01H 8-bit timer counter H1 CMP01 TMHE1 INTTMH1 TOH1 <1> <1> The count operation is enabled by setting ...

Page 141

Figure 7-8. Timing of Interval Timer/Square-Wave Output Operation (2/2) Count clock Count start 00H 01H 8-bit timer counter H1 CMP01 TMHE1 INTTMH1 TOH1 Count clock Count start 8-bit timer counter H1 CMP01 TMHE1 INTTMH1 TOH1 Interval time CHAPTER 7 8-BIT ...

Page 142

Operation as PWM output mode In PWM output mode, a pulse with an arbitrary duty and arbitrary cycle can be output. 8-bit timer compare register 01 (CMP01) controls the cycle of timer output (TOH1). Rewriting the CMP01 register during ...

Page 143

When 8-bit timer counter H1 and the CMP11 register match, TOH1 output becomes inactive and the compare register to be compared with 8-bit timer counter H1 is changed from the CMP11 register to the CMP01 register. At this time, ...

Page 144

Figure 7-10. Operation Timing in PWM Output Mode (1/4) (a) Basic operation (00H < CMP11 < CMP01 < FFH) Count clock 8-bit timer counter H1 00H 01H CMP01 CMP11 TMHE1 INTTMH1 TOH1 (TOLEV1 = 0) <1> TOH1 (TOLEV1 = 1) ...

Page 145

Figure 7-10. Operation Timing in PWM Output Mode (2/4) (b) Operation when CMP01 = FFH, CMP11 = 00H Count clock 8-bit timer counter H1 00H 01H CMP01 CMP11 TMHE1 INTTMH1 TOH1 (TOLEV1 = 0) (c) Operation when CMP01 = FFH, ...

Page 146

Figure 7-10. Operation Timing in PWM Output Mode (3/4) (d) Operation when CMP01 = 01H, CMP11 = 00H Count clock 8-bit timer counter H1 CMP01 CMP11 TMHE1 INTTMH1 TOH1 (TOLEV1 = 0) 144 CHAPTER 7 8-BIT TIMER H1 00H 01H ...

Page 147

Figure 7-10. Operation Timing in PWM Output Mode (4/4) (e) Operation by changing CMP11 (CMP11 = 02H → 03H, CMP01 = A5H) Count clock 8-bit timer counter H1 00H 01H 02H CMP01 02H CMP11 TMHE1 INTTMH1 TOH1 (TOLEV1 = 0) ...

Page 148

Functions of Watchdog Timer The watchdog timer is used to detect an inadvertent program loop program loop is detected, an internal reset signal is generated. When a reset occurs due to the watchdog timer, bit 4 (WDTRF) ...

Page 149

Table 8-2. Option Byte Setting and Watchdog Timer Operation Mode Low-Speed Internal Oscillator Cannot Be Stopped Low-Speed Internal Oscillator Can Be Stopped by Software Note 1 Watchdog timer clock Fixed source Operation after reset Operation starts ...

Page 150

Configuration of Watchdog Timer The watchdog timer consists of the following hardware. Table 8-3. Configuration of Watchdog Timer Item Control registers Figure 8-1. Block Diagram of Watchdog Timer 2 Clock 16-bit input counter ...

Page 151

Registers Controlling Watchdog Timer The watchdog timer is controlled by the following two registers. Watchdog timer mode register (WDTM) Watchdog timer enable register (WDTE) (1) Watchdog timer mode register (WDTM) This register sets the overflow time and operation clock ...

Page 152

Cautions 2. After reset is released, WDTM can be written only once by an 8-bit memory manipulation instruction. If writing is attempted a second time, an internal reset signal is generated. However, at the first write, if “1” and “x” ...

Page 153

Operation of Watchdog Timer 8.4.1 Watchdog timer operation when “low-speed internal oscillator cannot be stopped” is selected by option byte The operation clock of watchdog timer is fixed to low-speed internal oscillation clock. After reset is released, operation is ...

Page 154

Figure 8-4. Status Transition Diagram When “Low-Speed Internal Oscillator Cannot Be Stopped” Is Selected by Option Byte WDTE = “ACH” Clear WDT counter. HALT instruction HALT WDT count continues. 152 CHAPTER 8 WATCHDOG TIMER Reset WDT clock Overflow ...

Page 155

Watchdog timer operation when “low-speed internal oscillator can be stopped by software” is selected by option byte The operation clock of the watchdog timer can be selected as either the low-speed internal oscillation clock or system clock. After reset ...

Page 156

Figure 8-5. Status Transition Diagram When “Low-Speed Internal Oscillator Can Be Stopped by Software” Is Selected by Option Byte WDT clock = f X Select overflow time (settable only once). WDTE = “ACH” Clear WDT counter. WDT clock ...

Page 157

Watchdog timer operation in STOP mode (when “low-speed internal oscillator can be stopped by software” is selected by option byte) The watchdog timer stops counting during STOP instruction execution regardless of whether the system clock or low-speed internal oscillation ...

Page 158

When the watchdog timer operation clock is the low-speed internal oscillation clock (f instruction is executed When the STOP instruction is executed, operation of the watchdog timer is stopped. After STOP mode is released, operation stops for 34 operation ...

Page 159

Functions of A/D Converter The A/D converter converts an analog input signal into a digital value, and consists four channels (ANI0 to ANI3) with a resolution of 10 bits. The A/D converter has the following ...

Page 160

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) Table 9-1. Sampling Time and A/D Conversion Time Reference Sampling Conversion Note 2 Note 3 Voltage Time Time Note 1 Range V 4.5 V 12/f 36 4.0 V 24/f ...

Page 161

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) Figure 9-2 shows the block diagram of A/D converter. Figure 9-2. Block Diagram of A/D Converter ANI0/P20/TI000 TOH1 ANI1/P21/TI010/ TO00/INTP0 ANI2/X2/P22 ANI3/X1/P23 2 ADS1 ADS0 ADCS Analog input channel specification register (ADS) Cautions ...

Page 162

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (5) Successive approximation register (SAR) This register compares the sampled analog voltage and the voltage of the D/A converter, and converts the result, starting from the most significant bit (MSB). When the voltage ...

Page 163

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.3 Registers Used by A/D Converter The A/D converter uses the following six registers. A/D converter mode register (ADM) Analog input channel specification register (ADS) 10-bit A/D conversion result register (ADCR) 8-bit A/D ...

Page 164

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) Figure 9-3. Format of A/D Converter Mode Register (ADM) Address: FF80H After reset: 00H R/W Symbol <7> 6 ADM ADCS 0 ADCS 0 Stops conversion operation Note 1 1 Starts conversion operation FR2 ...

Page 165

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) Notes 3. Set the sampling time as follows Set the A/D conversion time as follows. V ...

Page 166

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (2) Analog input channel specification register (ADS) This register specifies the input port of the analog voltage to be A/D converted. ADS can be set by a 1-bit or 8-bit memory manipulation instruction. ...

Page 167

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (4) 8-bit A/D conversion result register (ADCRH) This register is an 8-bit register that stores the A/D conversion result. It stores the higher 8 bits of a 10-bit resolution result. ADCRH can be ...

Page 168

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.4 A/D Converter Operations 9.4.1 Basic operations of A/D converter <1> Select one channel for A/D conversion using the analog input channel specification register (ADS). <2> Set ADCE to 1 and wait for ...

Page 169

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) Figure 9-10. Basic Operation of A/D Converter Sampling time A/D converter Sampling operation Undefined SAR ADCR, ADCRH INTAD A/D conversion operations are performed continuously until bit 7 (ADCS) of the A/D converter mode ...

Page 170

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.4.2 Input voltage and conversion results The relationship between the analog input voltage input to the analog input pins (ANI0 to ANI3) and the theoretical A/D conversion result (stored in the 10-bit A/D ...

Page 171

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.4.3 A/D converter operation mode The operation mode of the A/D converter is the select mode. One channel of analog input is selected from ANI0 to ANI3 by the analog input channel specification ...

Page 172

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) The setting method is described below. <1> Set bit 0 (ADCE) of the A/D converter mode register (ADM <2> Select the channel and conversion time using bits 1 and 0 (ADS1, ...

Page 173

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.5 How to Read A/D Converter Characteristics Table Here, special terms unique to the A/D converter are explained. (1) Resolution This is the minimum analog input voltage that can be identified. That is, ...

Page 174

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (5) Full-scale error This shows the difference between the actual measurement value of the analog input voltage and the theoretical value (Full-scale 3/2LSB) when the digital output changes from 1......110 to 1......111. (6) ...

Page 175

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) 9.6 Cautions for A/D Converter (1) Supply current in STOP mode To satisfy the DC characteristics of supply current in STOP mode, clear bit 7 (ADCS) and bit 0 (ADCE) of the A/D ...

Page 176

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (5) ANI0/P20 to ANI3/P23 <1> The analog input pins (ANI0 to ANI3) are also used as I/O port pins (P20 to P23). When A/D conversion is performed with any of ANI0 to ANI3 ...

Page 177

CHAPTER 9 A/D CONVERTER ( PD78F920x ONLY) (8) Conversion results just after A/D conversion start The first A/D conversion value immediately after A/D conversion starts may not fall within the rating range if the ADCS bit is set to 1 ...

Page 178

Interrupt Function Types There are two types of interrupts: maskable interrupts and resets. Maskable interrupts These interrupts undergo mask control. When an interrupt request occurs, the standby release signal occurs, and if an interrupt can be acknowledged then the ...

Page 179

Note 1 Interrupt Type Priority Maskable Reset Notes 1. Priority is the vector interrupt servicing priority order when several maskable interrupt requests are generated at the same time the highest and ...

Page 180

Figure 10-1. Basic Configuration of Interrupt Function (A) Internal maskable interrupt IF Interrupt request (B) External maskable interrupt External interrupt mode register (INTM0) Edge Interrupt detector request IF: Interrupt request flag IE: Interrupt enable flag MK: Interrupt mask flag 10.3 ...

Page 181

Interrupt Request Signal INTLVI INTP0 INTP1 INTTMH1 Note INTTM000 Note INTTM010 Note INTAD <R> Note PD78F920x only (1) Interrupt request flag register 0 (IF0) An interrupt request flag is set to 1 when the corresponding interrupt request is issued, or ...

Page 182

Interrupt mask flag register 0 (MK0) The interrupt mask flag is used to enable and disable the corresponding maskable interrupts. MK0 is set with a 1-bit or 8-bit memory manipulation instruction. Reset signal generation sets MK0 to FFH. Figure ...

Page 183

Cautions 1. Be sure to clear bits and Before setting the INTM0 register, be sure to set the corresponding interrupt mask flag ( disable interrupts. After setting the INTM0 ...

Page 184

A pending interrupt is acknowledged when a status in which it can be acknowledged is set. Figure 10-6 shows the algorithm of interrupt request acknowledgment. When a maskable interrupt request is acknowledged, the contents of the PSW and PC are ...

Page 185

Figure 10-8. Interrupt Request Acknowledgment Timing (When Interrupt Request Flag Is Set at Last Clock During Instruction Execution) Clock CPU NOP Interrupt If an interrupt request flag ( IF) is set at the last clock of the instruction, the interrupt ...

Page 186

Figure 10-9. Example of Multiple Interrupts (1/2) Example 1. Multiple interrupts are acknowledged Main processing INTxx During interrupt INTxx servicing, interrupt request INTyy is acknowledged, and multiple interrupts are generated. Before each interrupt request acknowledgement, the ...

Page 187

Figure 10-9. Example of Multiple Interrupts (2/2) Example 3. A priority is controlled by the Multiple interrupts The vector interrupt enable state is set for INTP0, INTP1, and INTTMH1. (Interruption priority INTP0 > INTP1 > INTTMH1 (refer to Table10-1)) Main ...

Page 188

Standby Function and Configuration 11.1.1 Standby function Table 11-1. Relationship Between Operation Clocks in Each Operation Status Status Note 1 Operation Mode Reset Stopped STOP Oscillating HALT Notes 1. When “Cannot be stopped” is selected for low-speed internal oscillator ...

Page 189

STOP mode STOP instruction execution sets the STOP mode. In the STOP mode, the system clock oscillator stops, stopping the whole system, thereby considerably reducing the CPU operating current. Because this mode can be cleared by an interrupt request, ...

Page 190

Registers used during standby ( PD78F920x only) The oscillation stabilization time after the standby mode is released is controlled by the oscillation stabilization time select register (OSTS). Remark For the registers that start, stop, or select the clock, ...

Page 191

Standby Function Operation 11.2.1 HALT mode (1) HALT mode The HALT mode is set by executing the HALT instruction. The operating statuses in the HALT mode are shown below. Caution Because an interrupt request signal is used to clear ...

Page 192

HALT mode release The HALT mode can be released by the following two sources. (a) Release by unmasked interrupt request When an unmasked interrupt request is generated, the HALT mode is released. If interrupt acknowledgement is enabled, vectored interrupt ...

Page 193

Release by reset signal generation When the reset signal is input, HALT mode is released, and then the case with a normal reset operation, the program is executed after branching to the reset vector address. (1) When ...

Page 194

STOP mode (1) STOP mode setting and operating statuses The STOP mode is set by executing the STOP instruction. Caution Because an interrupt request signal is used to clear the standby mode, if there is an interrupt source with ...

Page 195

STOP mode release <1> If high-speed internal oscillation clock or external input clock is selected as system clock to be supplied STOP mode is released. STOP mode System clock oscillation CPU clock <R> <2> If crystal/ceramic oscillation clock is ...

Page 196

Release by unmasked interrupt request When an unmasked interrupt request (8-bit timer H1 generated, the STOP mode is released. After the oscillation stabilization time has elapsed, if interrupt acknowledgment is enabled, vectored interrupt servicing is carried out. If interrupt ...

Page 197

Release by reset signal generation When the reset signal is input, STOP mode is released and a reset operation is performed after the oscillation stabilization time has elapsed. (1) If CPU clock is high-speed internal oscillation clock or external ...

Page 198

The following four operations are available to generate a reset signal. (1) External reset input via RESET pin (2) Internal reset by watchdog timer overflows (3) Internal reset by comparison of supply voltage and detection voltage of power-on-clear (POC) circuit ...

Page 199

Figure 12-1. Block Diagram of Reset Function Set Reset signal of WDT RESET Reset signal of POC Reset signal of LVI Caution The LVI circuit is not reset by the internal reset signal of the LVI circuit. Remarks 1. LVIM: ...

Page 200

With high-speed internal oscillation clock or external clock input High-speed internal oscillation clock or external clock input CPU clock RESET Internal reset signal Port pin Note The operation stop time is 277 s (MIN.), 544 s (TYP.), and 1.075 ...

Related keywords