UPD78F1233GB-GAH-AX Renesas Electronics America, UPD78F1233GB-GAH-AX Datasheet
UPD78F1233GB-GAH-AX
Specifications of UPD78F1233GB-GAH-AX
Available stocks
Related parts for UPD78F1233GB-GAH-AX
UPD78F1233GB-GAH-AX 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 78K0R/Ix3 16-bit Single-Chip Microcontrollers μ 78K0R/IB3 : PD78F1201, 78F1203 μ 78K0R/IC3 : PD78F1211, 78F1213, 78F1214, 78F1215 μ 78K0R/ID3 : PD78F1223, 78F1224, 78F1225 μ 78K0R/IE3 : PD78F1233, 78F1234, 78F1235 Document No. U19678EJ1V1UD00 (1st edition) Date Published November 2009 NS ...
Page 4
User’s Manual U19678EJ1V1UD ...
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 and Windows NT are registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. PC/ trademark of International Business Machines Corporation. EEPROM is a trademark of NEC Electronics Corporation. SuperFlash is a registered ...
Page 7
Readers This manual is intended for user engineers who wish to understand the functions of the 78K0R/Ix3 and design and develop application systems and programs for these devices. The target products are as follows. • 78K0R/IB3: • 78K0R/IC3: • 78K0R/ID3: ...
Page 8
Conventions Data significance: Active low representations: ××× (overscore over pin and signal name) Note: Caution: Remark: Numerical representations: Binary Related Documents The related documents indicated in this publication may include preliminary versions. However, preliminary versions are not marked as such. ...
Page 9
Other 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 the ...
Page 10
CHAPTER 1 OUTLINE ............................................................................................................................ 19 1.1 Features......................................................................................................................................... 20 1.2 Applications .................................................................................................................................. 21 1.3 Ordering Information.................................................................................................................... 21 1.4 Pin Configuration (Top View) ...................................................................................................... 22 1.4.1 78K0R/IB3........................................................................................................................................ 22 1.4.2 78K0R/IC3........................................................................................................................................ 23 1.4.3 78K0R/ID3........................................................................................................................................ 26 1.4.4 78K0R/IE3........................................................................................................................................ 27 1.5 Pin Identification........................................................................................................................... 28 1.6 ...
Page 11
AV ..............................................................................................................................................75 REF 2.2.14 AV ................................................................................................................................................75 SS 2.2.15 RESET ............................................................................................................................................75 2.2.16 REGC..............................................................................................................................................76 2.2. ........................................................................................................................................ 2.2. ........................................................................................................................................ 2.2.19 FLMD0 ............................................................................................................................................77 2.3 Pin I/O Circuits and Recommended Connection of Unused Pins........................................... ...
Page 12
Based indexed addressing ..............................................................................................................143 3.4.9 Stack addressing.............................................................................................................................144 CHAPTER 4 PORT FUNCTIONS ......................................................................................................... 145 4.1 Port Functions ............................................................................................................................ 145 4.2 Port Configuration...................................................................................................................... 151 4.2.1 Port 0...............................................................................................................................................153 4.2.2 Port 1...............................................................................................................................................155 4.2.3 Port 2...............................................................................................................................................157 4.2.4 Port 3...............................................................................................................................................159 4.2.5 Port 4...............................................................................................................................................163 4.2.6 Port ...
Page 13
Example of setting internal high-speed oscillator ............................................................................251 5.6.2 Example of setting 40 MHz internal high-speed oscillator...............................................................251 5.6.3 Example of setting X1 oscillator ......................................................................................................252 5.6.4 Example of setting XT1 oscillator (products other than 78K0R/IB3) ...............................................253 5.6.5 CPU clock status transition ...
Page 14
CHAPTER 7 INVERTER CONTROL FUNCTIONS .............................................................................. 360 7.1 Outline of Functions................................................................................................................... 360 7.2 Configuration of Inverter Control Function ............................................................................. 363 7.3 Registers Controlling Timer Array Unit TAUS and Inverter Control Function Block.......... 367 7.4 Basic Rule of Real-time Output Function ...
Page 15
Reading/writing real-time counter ...................................................................................................559 9.4.4 Setting alarm of real-time counter ...................................................................................................561 CHAPTER 10 WATCHDOG TIMER ..................................................................................................... 562 10.1 Functions of Watchdog Timer ................................................................................................ 562 10.2 Configuration of Watchdog Timer .......................................................................................... 563 10.3 Register Controlling Watchdog Timer ................................................................................... 564 10.4 ...
Page 16
Operation stop mode ............................................................................................................... 637 13.4.1 Stopping the operation by units.....................................................................................................638 13.4.2 Stopping the operation by channels ..............................................................................................639 13.5 Operation of 3-Wire Serial I/O (CSI00, CSI01, CSI10) Communication ............................... 639 13.5.1 Master transmission ......................................................................................................................640 13.5.2 Master reception ...........................................................................................................................650 13.5.3 ...
Page 17
I C Bus Definitions and Control Methods .............................................................................. 782 14.5.1 Start conditions .............................................................................................................................782 14.5.2 Addresses .....................................................................................................................................783 14.5.3 Transfer direction specification .....................................................................................................783 14.5.4 Acknowledge (ACK) ......................................................................................................................784 14.5.5 Stop condition ...............................................................................................................................785 14.5.6 Wait...............................................................................................................................................786 14.5.7 Canceling wait...............................................................................................................................788 14.5.8 Interrupt request (INTIICA) ...
Page 18
UART consecutive reception + ACK transmission ........................................................................859 16.5.4 Holding DMA transfer pending by DWAITn ...................................................................................861 16.5.5 Forced termination by software .....................................................................................................862 16.6 Cautions on Using DMA Controller ........................................................................................ 864 CHAPTER 17 INTERRUPT FUNCTIONS ............................................................................................ 866 17.1 Interrupt Function Types ...
Page 19
Cautions for Low-Voltage Detector ........................................................................................ 941 CHAPTER 22 REGULATOR ................................................................................................................. 945 22.1 Regulator Overview ................................................................................................................ 945 22.2 Registers Controlling Regulator............................................................................................ 945 CHAPTER 23 OPTION BYTE............................................................................................................... 947 23.1 Functions of Option Bytes ...................................................................................................... 947 23.1.1 User option byte (000C0H to ...
Page 20
CHAPTER 25 ON-CHIP DEBUG FUNCTION ..................................................................................... 974 25.1 Connecting QB-MINI2 to 78K0R/Ix3....................................................................................... 974 25.2 On-Chip Debug Security ID .................................................................................................... 975 25.3 Securing of User Resources .................................................................................................. 975 CHAPTER 26 BCD CORRECTION CIRCUIT ..................................................................................... 977 26.1 BCD Correction Circuit Function........................................................................................... 977 ...
Page 21
The 78K0R/Ix3 is a 16-bit single-chip microcontroller that uses a 78K0R CPU core and incorporates peripheral functions, such as ROM/RAM, a multi-function timer, a multi-function serial interface, an A/D converter, a programmable gain amplifier (PGA), a comparator, a real-time counter, ...
Page 22
Features Minimum instruction execution time can be changed from high speed (0.05 speed system clock) to ultra low-speed (61 General-purpose register: 8 bits × 32 registers (8 bits × 8 registers × 4 banks) ROM, RAM capacities Flash ROM ...
Page 23
Applications Home appliances • Air cleaners • Air conditioners • Refrigerators • Dishwashers Electric bicycles 1.3 Ordering Information • Flash memory version (lead-free product) 78K0R/Ix3 Package Microcontroller 78K0R/IB3 30-pin plastic SSOP (7.62 mm (300) ) 78K0R/IC3 38-pin plastic SSOP ...
Page 24
Pin Configuration (Top View) 1.4.1 78K0R/IB3 • 30-pin plastic SSOP (7.62 mm (300) ) P23/ANI3 P22/ANI2 P21/ANI1 P20/ANI0 P120/INTP0/EXLVI RESET FLMD0 P122/X2/EXCLK/INTP5 P121/X1/INTP4 REGC P30/SO10/TXD1/TO11 P31/SI10/RXD1/SDA10/INTP1/TI09 P32/SCK10/SCL10/INTP2 Cautions 1. Make AV the same potential as ...
Page 25
SSOP (7.62 mm (300) ) Cautions 1. Make AV the same potential Connect the REGC pin P20/ANI0 to P27/ANI7 are set as analog inputs in the order of ...
Page 26
LQFP (10 × 10 ...
Page 27
TQFP (fine pitch) (7 × 7) Cautions 1. Make AV the same potential Connect the REGC pin P20/ANI0 to P27/ANI7 and P150/ANI8 to P152/ANI10 are set as analog inputs in ...
Page 28
LQFP (10 × 10 P140/PCLBUZ0 1 P120/INTP0/EXLVI 2 P41/TOOL1 3 P40/TOOL0 4 RESET 5 P124/XT2 6 P123/XT1 7 FLMD0 8 P122/X2/EXCLK 9 ...
Page 29
LQFP (12 × 12) • 64-pin plastic LQFP (fine pitch) (10 × 10 P120/INTP0/EXLVI 1 P43 2 P42 3 ...
Page 30
Pin Identification ANI0 to ANI11: Analog Input AV : Analog Reference Voltage REF AV : Analog Ground SS CMP0M, CMP1M: Comparator Input (Minus) CMP0P, CMP1P: Comparator Input (Plus Power Supply for Port Ground for ...
Page 31
Block Diagram 1.6.1 78K0R/IB3 TIMER ARRAY UNIT (12ch) ch0 ch1 ch2 TI02/TO02/P10 TI03/TO03/P11 ch3 RxD0/P11 (LINSEL) TI04/TO04/P12 ch4 ch5 TI05/TO05/P13 TI06/TO06/P50 ch6 TI07/TO07/P51 ch7 ch8 TI09/P31 ch9 ch10 TO11/P30 ch11 TIMER ARRAY TMOFF0/P80 UNIT OPTION CMP0M/P81, 2 CMP1M/P83 COMPARATOR ...
Page 32
TIMER ARRAY UNIT (12ch) SLTI/SLTO/P52 ch0 ch1 TI02/TO02/P10 ch2 ch3 TI03/TO03/P11 TI04/TO04/P12 ch4 TI05/TO05/P13 ch5 ch6 TI06/TO06/P50 TI07/TO07/P51 ch7 RxD0/P72 (LINSEL) ch8 TI09/P31 ch9 TO10/P73 ch10 TO11/P30 ch11 TMOFF0/P80 TIMER ARRAY UNIT OPTION TMOFF1/P82 CMP0M/P81, ...
Page 33
TIMER ARRAY UNIT (12ch) SLTI/SLTO/P52 ch0 ch1 TI02/TO02/P10 ch2 ch3 TI03/TO03/P11 TI04/TO04/P12 ch4 ch5 TI05/TO05/P13 TI06/TO06/P50 ch6 TI07/TO07/P51 ch7 RxD0/P74 (LINSEL) ch8 TI09/P31 ch9 TI10/P74 TO10/P73 ch10 RxD0/P74 (LINSEL) TI11/P75 ch11 TO11/P30 TMOFF0/P80 TIMER ARRAY UNIT OPTION ...
Page 34
TIMER ARRAY UNIT (12ch) SLTI/SLTO/P52 ch0 ch1 TI02/TO02/P10 ch2 TI03/TO03/P11 ch3 TI04/TO04/P12 ch4 ch5 TI05/TO05/P13 TI06/TO06/P50 ch6 TI07/TO07/P51 ch7 RxD0/P74 (LINSEL) ch8 TI09/P31 ch9 TI10/P74 TO10/P73 ch10 RxD0/P74 (LINSEL) TI11/P75 ch11 TO11/P30 TMOFF0/P80 TIMER ARRAY UNIT OPTION ...
Page 35
TIMER ARRAY UNIT (12ch) TI00/P00 ch0 TO00/P01 SLTI/SLTO/P52 ch1 ch2 TI02/TO02/P10 ch3 TI03/TO03/P11 TI04/TO04/P12 ch4 TI05/TO05/P13 ch5 TI06/TO06/P50 ch6 TI07/TO07/P51 ch7 RxD0/P74 (LINSEL) ch8 TI09/P31 ch9 TI10/P74 TO10/P73 ch10 RxD0/P74 (LINSEL) TI11/P75 ch11 TO11/P30 TMOFF0/P80 TIMER ARRAY UNIT ...
Page 36
TIMER ARRAY UNIT (12ch) TI00/P00 ch0 TO00/P01 SLTI/SLTO/P52 ch1 ch2 TI02/TO02/P10 ch3 TI03/TO03/P11 TI04/TO04/P12 ch4 TI05/TO05/P13 ch5 TI06/TO06/P14 ch6 TI07/TO07/P15 ch7 RxD0/P74 (LINSEL) TI08/TO08/P16 ch8 TI09/TO09/P17 ch9 TI10/P74 TO10/P73 ch10 RxD0/P74 (LINSEL) TI11/P75 ch11 TO11/P30 TMOFF0/P80 TIMER ARRAY ...
Page 37
Outline of Functions Item 78K0R/IB3 Part Number Internal Flash memory 16 memory (self-programming supported) (KB) RAM (KB) 1 Memory space 1 MB Main system High-speed system X1 (crystal/ceramic) oscillation, external main system clock input (EXCLK) clock clock 2 to ...
Page 38
Item 78K0R/IB3 Part Number Clock output/buzzer output 10-bit resolution A/D converter 6 channels 8 channels 10 channels (AV = 2.7 to 5.5 V) REF Serial interface 78K0R/IB3, 78K0R/IC3 (38-pins) • UART (LIN-bus supported): 1 channel • CSI: 1 channel/UART: 1 ...
Page 39
Pin Function List There are three types of pin I/O buffer power supplies: AV power supplies and the pins is shown below. Table 2-1. Pin I/O Buffer Power Supplies (78K0R/IB3) • 30-pin plastic SSOP (7.62 mm (300)) Power Supply ...
Page 40
Port functions : 78K0R/IB3 Function Name I/O P10 I/O Port 1. 4-bit I/O port. P11 Input/output can be specified in 1-bit units. P12 Use of an on-chip pull-up resistor can be specified by a software P13 setting. ...
Page 41
Non-port functions (1/2): 78K0R/IB3 Function Name I/O ANI0 to ANI5 Input A/D converter analog input CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side of comparator 0 CMP1M Input ...
Page 42
Non-port functions (2/2): 78K0R/IB3 Function Name I/O TI02 Input External count clock input to 16-bit timer 02 TI03 External count clock input to 16-bit timer 03 TI04 External count clock input to 16-bit timer 04 TI05 External count clock ...
Page 43
Port functions (1/2): 78K0R/IC3 38-pin products Function Name I/O P10 I/O Port 1. 4-bit I/O port. P11 Input/output can be specified in 1-bit units. P12 Use of an on-chip pull-up resistor can be specified ...
Page 44
Port functions (2/2): 78K0R/IC3 38-pin products Function Name I/O P120 I/O Port 12. 1-bit I/O port and 4-bit input port. P121 Input For only P120, input/output can be specified in 1-bit units. P122 For only P120, use of an ...
Page 45
Non-port functions (1/2): 78K0R/IC3 38-pin products Function Name I/O ANI0 to ANI7 Input A/D converter analog input CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side of comparator 0 ...
Page 46
Non-port functions (2/2): 78K0R/IC3 38-pin products Function Name I/O Function TI02 Input External count clock input to 16-bit timer 02 TI03 External count clock input to 16-bit timer 03 TI04 External count clock input to 16-bit timer 04 TI05 ...
Page 47
Port functions (1/2): 78K0R/IC3 44-pin products Function Name I/O Port 1. P10 I/O 4-bit I/O port. P11 Input/output can be specified in 1-bit units. P12 Use of an on-chip pull-up resistor can be specified by a ...
Page 48
Port functions (2/2): 78K0R/IC3 44-pin products Function Name I/O P120 I/O Port 12. 1-bit I/O port and 4-bit input port. P121 Input For only P120, input/output can be specified in 1-bit units. P122 For only P120, use of an ...
Page 49
Non-Port functions (1/2): 78K0R/IC3 44-pin products Function Name I/O ANI0 to ANI7 Input A/D converter analog input ANI8, ANI9 CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side of ...
Page 50
Non-Port functions (2/2): 78K0R/IC3 44-pin products Function Name I/O SO00 Output Serial data output from CSI00, CSI01, and CSI10 SO01 SO10 TI02 Input External count clock input to 16-bit timer 02 TI03 External count clock input to 16-bit timer ...
Page 51
Port functions (1/2): 78K0R/IC3 48-pin products Function Name I/O Port 1. P10 I/O 4-bit I/O port. P11 Input/output can be specified in 1-bit units. P12 Use of an on-chip pull-up resistor can be specified by a ...
Page 52
Port functions (2/2): 78K0R/IC3 48-pin products Function Name I/O P120 I/O Port 12. 1-bit I/O port and 4-bit input port. P121 Input For only P120, input/output can be specified in 1-bit units. P122 For only P120, use of an ...
Page 53
Non-Port functions (1/3): 78K0R/IC3 48-pin products Function Name I/O ANI0 to ANI7 Input A/D converter analog input ANI8 to ANI10 CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side ...
Page 54
Non-Port functions (2/3): 78K0R/IC3 48-pin products Function Name I/O SLTO Output 16-bit timer 00, 01, 08, 09, 10, 11 output SO00 Output Serial data output to CSI00, CSI01, and CSI10 SO01 SO10 TI02 Input External count clock input to ...
Page 55
Non-Port functions (3/3): 78K0R/IC3 48-pin products Function Name I/O Function − V Positive power supply (P20 to P27, P80 to P83, P150 to P152 and DD other than ports − • A/D converter and comparator reference voltage input AV ...
Page 56
Port functions (1/2): 78K0R/ID3 Function Name I/O P00 I/O Port 0. 2-bit I/O port. P01 Input/output can be specified in 1-bit units. Use of an on-chip pull-up resistor can be specified by a software setting. P10 I/O ...
Page 57
Port functions (2/2): 78K0R/ID3 Function Name I/O P80 I/O Port 8. 4-bit I/O port. Inputs/output can be specified in 1-bit units. P81 Inputs of P80 to P83 can be set as comparator inputs or P82 programmable gain amplifier inputs. ...
Page 58
Non-port functions (1/3): 78K0R/ID3 Function Name I/O ANI0 to ANI7 Input A/D converter analog input ANI8 to ANI10 CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side of comparator ...
Page 59
Non-port functions (2/3): 78K0R/ID3 Function Name I/O SLTI Input 16-bit timer 00, 01, 08, 09, 10, 11 input SLTO Output 16-bit timer 00, 01, 08, 09, 10, 11 output SO00 Output Serial data output from CSI00, CSI01, and CSI10 ...
Page 60
Non-port functions (3/3): 78K0R/ID3 Function Name I/O − V Positive power supply (P20 to P27, P80 to P83, P150 to P152 DD and other than ports • A/D converter and comparator reference voltage input − AV REF • Positive ...
Page 61
Port functions (1/2): 78K0R/IE3 Function Name I/O P00 I/O Port 0. 2-bit I/O port. P01 Input/output can be specified in 1-bit units. Use of an on-chip pull-up resistor can be specified by a software setting. P10 I/O ...
Page 62
Port functions (2/2): 78K0R/IE3 Function Name I/O P70 I/O Port 7. 8-bit I/O port. P71 Input of P71, P72, P74, and P75 can be set to TTL buffer. P72 Output of P70, P72, P73, and P75 can be set ...
Page 63
Non-Port functions (1/3): 78K0R/IE3 Function Name I/O ANI0 to ANI7 Input A/D converter analog input ANI8 to ANI11 CMP0M Input Input voltage on the (−) side of comparator 0 CMP0P Input Input voltage on the (+) side of comparator ...
Page 64
Non-Port functions (2/3): 78K0R/IE3 Function Name I/O SLTI Input 16-bit timer 00, 01, 08, 09, 10, 11 input SLTO Output 16-bit timer 00, 01, 08, 09, 10, 11 output SO00 Output Serial data output from CSI00, CSI01, and CSI10 ...
Page 65
Non-Port functions (3/3): 78K0R/IE3 Function Name I/O − • A/D converter and comparator reference voltage input AV REF • Positive power supply for P20 to P27, P80 to P83, P150 to P153, A/D converter, programmable gain amplifier, and comparator ...
Page 66
Description of Pin Functions Remark The pins mounted depend on the product. See 1.4 Pin Configuration (Top View) and 2.1 Pin Function List. 2.2.1 P00, P01 (port 0) P00 and P01 function as I/O port. These pins also function ...
Page 67
P10 to P17 (port 1) P10 to P17 function as I/O port. These pins also function as timer I/O. 78K0R/IB3 √ P10/TI02/TO02/ P10/TI02/TO02 TxD0 √ P11/TI03/TO03/ P11/TI03/TO03 RxD0 √ P12/TI04/TO04 √ P13/TI05/TO05 − Note 2 P14/TI06/TO06 − Note 2 ...
Page 68
P20 to P27 (port 2) P20 to P27 function as an 8-bit I/O port. These pins also function as A/D converter analog input. 78K0R/IB3 √ P20/ANI0 √ P21/ANI1 √ P22/ANI2 √ P23/ANI3 √ P24/ANI4 √ P25/ANI5 − P26/ANI6 − ...
Page 69
P30 to P33 (port 3) P30 to P33 function as I/O port. These pins also function as serial interface data I/O, clock I/O, external interrupt request input, and timer I/O. Input to the P30 and P31 pins can be ...
Page 70
SCL10 This is a serial clock I/O pin of serial interface for simplified I (h) INTP1, INTP2 These are the external interrupt request input pins for which the valid edge (rising edge, falling edge, or both rising and falling ...
Page 71
TOOL0 This is a data I/O pin for a flash memory programmer/debugger. Be sure to pull up this pin externally when on-chip debugging is enabled (pulling it down is prohibited). (b) TOOL1 This is a clock output pin for ...
Page 72
Port mode P50 to P53 function as I/O port. P50 to P53 can be set to input or output port in 1-bit units using port mode register 5 (PM5). Use of an on-chip pull-up resistor can be specified by ...
Page 73
P70 to P77 (port 7) P70 to P77 function as I/O port. These pins also function as serial interface data I/O, clock I/O, external interrupt request input, and timer I/O. Input to the P71, P72, P74, and P75 pins ...
Page 74
TxD0 This is a serial data output pin of serial interface UART0. (g) RxD0 This is a serial data input pin of serial interface UART0. (h) INTP4 to INTP6 These are the external interrupt request input pin for which ...
Page 75
INTP3, INTP7 These are the external interrupt request input pin for which the valid edge (rising edge, falling edge, or both rising and falling edges) can be specified. (e) PGAI This is an programmable gain amplifier input pin. 2.2.10 ...
Page 76
EXLVI This is a potential input pin for external low-voltage detection. (c) X1, X2 These are the pins for connecting a resonator for main system clock. (d) XT1, XT2 These are the pins for connecting a resonator for subsystem ...
Page 77
P150 to P153 (port 15) P150 to P153 function as I/O port. These pins also function as A/D converter analog input. 78K0R/IB3 − P150/ANI8 − P151/ANI9 − P152/ANI10 − P153/ANI11 The following operation modes can be specified in 1-bit ...
Page 78
REGC This is the pin for connecting regulator output stabilization capacitance for internal operation. Connect this pin to μ V via a capacitor (0. F). SS Also, use a capacitor with good characteristics, since it is used ...
Page 79
FLMD0 This is a pin for setting flash memory programming mode. Perform either of the following processing. (a) In normal operation mode It is recommended to leave this pin open during normal operation. The FLMD0 pin must always be ...
Page 80
Pin I/O Circuits and Recommended Connection of Unused Pins 2.3.1 78K0R/IB3 Table 2-5 shows the types of pin I/O circuits and the recommended connections of unused pins. Table 2-5. Connection of Unused Pins(78K0R/IB3) (1/2) Pin Name I/O Circuit Type ...
Page 81
Table 2-5. Connection of Unused Pins(78K0R/IB3) (2/2) Pin Name I/O Circuit Type − AV REF − FLMD0 2-W RESET 2 − REGC CHAPTER 2 PIN FUNCTIONS I/O Recommended Connection of Unused Pins − <When one or more of ...
Page 82
Table 2-6 to 2-8 shows the types of pin I/O circuits and the recommended connections of unused pins. (1) 38-pin products Table 2-6. Connection of Unused Pins(78K0R/IC3 38-pin products) (1/2) Pin Name I/O Circuit Type P10/TI02/TO02 8-R P11/TI03/TO03 ...
Page 83
Table 2-6. Connection of Unused Pins(78K0R/IC3 38-pin products) (2/2) Pin Name I/O Circuit Type P120/INTP0/EXLVI 8-R Note P121/X1/INTP4 37-C Note P122/X2/EXCLK/INTP5 Note P123/XT1 37-B Note P124/XT2 AV REF AV SS 2-W FLMD0 RESET 2 REGC Note Use recommended connection above ...
Page 84
Table 2-7. Connection of Unused Pins(78K0R/IC3 44-pin products) (1/3) Pin Name I/O Circuit Type P10/TI02/TO02 8-R P11/TI03/TO03 P12/TI04/TO04 P13/TI05/TO05 Note P20/ANI0 to P27/ANI7 11-G P30/SO10/TxD1/TO11 5-AG P31/SI10/RxD1/SDA10/ 5-AN INTP1/TI09 P32/SCK10/SCL10/INTP2 P40/TOOL0 8-R P41/TOOL1 P50/TI06/TO06 P51/TI07/TO07 P52/SLTI/SLTO P70/SO01/INTP4 ...
Page 85
Table 2-7. Connection of Unused Pins(78K0R/IC3 44-pin products) (2/3) Pin Name I/O Circuit Type P71/SI01/INTP5 5-AN P72/SCK01/INTP6 P73/SO00/TxD0/TO10 8-R P74/SI00/RxD0/TI10 5-AN P75/SCK00/TI11 P80/CMP0P/TMOFF0/ 11-J Note 1 INTP3/PGAI Note 1 P81/CMP0M 11-H P82/CMP1P/TOMOFF1/ 11-I Note 1 INTP7 Note 1 P83/CMP1M 11-H ...
Page 86
Table 2-7. Connection of Unused Pins(78K0R/IC3 44-pin products) (3/3) Pin Name I/O Circuit Type AV REF AV SS FLMD0 2-W RESET 2 REGC 84 CHAPTER 2 PIN FUNCTIONS I/O Recommended Connection of Unused Pins − − <When one or more ...
Page 87
Table 2-8. Connection of Unused Pins(78K0R/IC3 48-pin products) (1/3) Pin Name I/O Circuit Type P10/TI02/TO02 8-R P11/TI03/TO03 P12/TI04/TO04 P13/TI05/TO05 Note P20/ANI0 to P27/ANI7 11-G P30/SO10/TxD1/TO11 5-AG P31/SI10/RxD1/SDA10/ 5-AN INTP1/TI09 P32/SCK10/SCL10/INTP2 P40/TOOL0 8-R P41/TOOL1 P50/TI06/TO06 P51/TI07/TO07 P52/SLTI/SLTO P60/SCL0 ...
Page 88
Table 2-8. Connection of Unused Pins(78K0R/IC3 48-pin products) (2/3) Pin Name I/O Circuit Type P71/SI01/INTP5 5-AN P72/SCK01/INTP6 P73/SO00/TxD0/TO10 8-R P74/SI00/RxD0/TI10 5-AN P75/SCK00/TI11 P80/CMP0P/TMOFF0/ 11-J Note 1 INTP3/PGAI Note 1 P81/CMP0M 11-H P82/CMP1P/TMOFF1/ 11-I Note 1 INTP7 Note 1 P83/CMP1M 11-H ...
Page 89
Table 2-8. Connection of Unused Pins(78K0R/IC3 48-pin products) (3/3) Pin Name I/O Circuit Type − AV REF − FLMD0 2-W RESET 2 − REGC CHAPTER 2 PIN FUNCTIONS I/O Recommended Connection of Unused Pins − <When one or ...
Page 90
Table 2-9 show the types of pin I/O circuits and the recommended connections of unused pins. Table 2-9. Connection of Unused Pins (78K0R/ID3) (1/3) Pin Name I/O Circuit Type P00/TI00 8-R P01/TO00 5-AG P10/TI02/TO02 8-R P11/TI03/TO03 P12/TI04/TO04 P13/TI05/TO05 ...
Page 91
Table 2-9. Connection of Unused Pins (78K0R/ID3) (2/3) Pin Name I/O Circuit Type P60/SCL0 13-R P61/SDA0 8-R P70/SO01/INTP4 P71/SI01/INTP5 5-AN P72/SCK01/INTP6 P73/SO00/TxD0/TO10 8-R P74/SI00/RxD0/TI10 5-AN P75/SCK00/TI11 P76 8-R P77 P80/CMP0P/TMOFF0/ 11-J Note INTP3/PGAI Note P81/CMP0M 11-H P82/CMP1P/TOMOFF1/ 11-I Note INTP7 ...
Page 92
Table 2-9. Connection of Unused Pins (78K0R/ID3) (3/3) Pin Name I/O Circuit Type Note 1 P121/X1 37-C Note 1 P122/X2/EXCLK Note 1 P123/XT1 37-B Note 1 P124/XT2 P140/PCLBUZ0 3-C Note 2 P150/ANI8 to P152/ANI10 11-G AV REF AV SS FLMD0 ...
Page 93
Table 2-10 show the types of pin I/O circuits and the recommended connections of unused pins. Table 2-10. Connection of Unused Pins (78K0R/IE3) (1/3) Pin Name I/O Circuit Type P00/TI00 8-R P01/TO00 5-AG P10/TI02/TO02 8-R P11/TI03/TO03 P12/TI04/TO04 P13/TI05/TO05 ...
Page 94
Table 2-10. Connection of Unused Pins (78K0R/IE3) (2/3) Pin Name I/O Circuit Type P70/SO01/INTP4 8-R P71/SI01/INTP5 5-AN P72/SCK01/INTP6 P73/SO00/TxD0/TO10 8-R P74/SI00/RxD0/TI10 5-AN P75/SCK00/TI11 P76 8-R P77 P80/CMP0P/TMOFF0/ 11-J Note INTP3/PGAI Note P81/CMP0M 11-H P82/CMP1P/TOMOFF1/ 11-I Note INTP7 Note P83/CMP1M 11-H ...
Page 95
Table 2-10. Connection of Unused Pins (78K0R/IE3) (3/3) Pin Name I/O Circuit Type Note 1 P121/X1 37-C Note 1 P122/X2/EXCLK Note 1 P123/XT1 37-B Note 1 P124/XT2 P140/PCLBUZ0 3-C P141/PCLBUZ1 5-AG Note 2 P150/ANI8 to 53/ANI11 11-G AV REF AV ...
Page 96
Type 2 IN Schmitt-triggered input with hysteresis characteristics Type 3-C EV data EV Type 5-AN Pull-up enable EV Data Output disable EV CMOS TTL Input characteristic Remark With products not provided with CHAPTER 2 PIN FUNCTIONS Figure ...
Page 97
Type 11-G AV REF Data Output disable AV SS P-ch Comparator + _ N-ch Series resistor string voltage AV SS Input enable Type 11-I data P-ch output N-ch disable AV SS P-ch Voltage generated by internal amplifier N-ch Comparator P-ch ...
Page 98
Type 13-R data output disable Type 37-C input amp enable enable input enable Remark With products not provided with CHAPTER 2 PIN FUNCTIONS Figure 2-1. Pin I/O Circuit List (3/3) Type 37-B IN/OUT input N-ch enable amp ...
Page 99
Memory Space Products in the 78K0R/Ix3 can access memory space. Figures 3-1 to 3-4 show the memory maps. Figure 3-1. Memory Map ( Special function register (SFR ...
Page 100
Figure 3-2. Memory Map ( Special function register (SFR General-purpose register 32 bytes ...
Page 101
Figure 3-3. Memory Map ( Special function register (SFR) 256 bytes General-purpose register 32 bytes ...
Page 102
Figure 3-4. Memory Map ( Special function register (SFR General-purpose register 32 bytes ...
Page 103
Remark The flash memory is divided into blocks (one block = 1 KB). For the address values and block numbers, see Table 3-1 Correspondence Between Address Values and Block Numbers in Flash Memory ...
Page 104
Correspondence between the address values and block numbers in the flash memory are shown below. Table 3-1. Correspondence Between Address Values and Block Numbers in Flash Memory Address Value Block Address Value Number 00000H to 003FFH 00H 04000H to 043FFH ...
Page 105
Internal program memory space The internal program memory space stores the program and table data. The 78K0R/Ix3 products incorporate internal ROM (flash memory), as shown below. Part Number μ PD78F1201, 78F1211 μ PD78F1203, 78F1213, 78F1223, 78F1233 μ PD78F1214, 78F1224, ...
Page 106
Vector Table Address 00000H RESET input, POC, LVI, WDT, TRAP 00004H INTWDTI 00006H INTLVI 00008H INTP0 0000AH INTP1 0000CH INTP2 0000EH INTP3/INTTMOFF0 00010H INTP4 00012H INTP5 00014H INTTMAD 00016H INTCMP0 00018H INTCMP1 0001AH INTDMA0 0001CH INTDMA1 0001EH INTST0/INTCSI00 00020H INTSR0/INTCSI01 ...
Page 107
Vector Table Address Interrupt Source 0004EH INTTMM1 00050H INTTMV1 00052H INTTM08 00054H INTTM09 00056H INTTM10 00058H INTTM11 √ : Mounted, −: Not mounted Remark CHAPTER 3 CPU ARCHITECTURE Table 3-3. Vector Table (1/2) IB3 (38-pin) √ √ √ √ √ ...
Page 108
CALLT instruction table area The 64-byte area 00080H to 000BFH can store the subroutine entry address of a 2-byte call instruction (CALLT). Set the subroutine entry address to a value in a range of 00000H to 0FFFFH (because an ...
Page 109
Mirror area The 78K0R/Ix3 mirrors the data flash area of 00000H to 0FFFFH, to F0000H to FFFFFH (set by the processor mode control register (PMC)). By reading data from F0000H to FFFFFH, an instruction that does not have the ...
Page 110
Processor mode control register (PMC) This register selects the flash memory space for mirroring to area from F0000H to FFFFFH. PMC can be set by a 1-bit or 8-bit memory manipulation instruction. Reset signal generation sets this register to ...
Page 111
Special function register (SFR) area On-chip peripheral hardware special function registers (SFRs) are allocated in the area FFF00H to FFFFFH (see Table 3-5 in 3.2.4 Special function registers (SFRs)). Caution Do not access addresses to which SFRs are not ...
Page 112
Data memory addressing Addressing refers to the method of specifying the address of the instruction to be executed next or the address of the register or memory relevant to the execution of instructions. Several addressing modes are provided for ...
Page 113
Figure 3-7. Correspondence Between Data Memory and Addressing ( Special function register (SFR 256 bytes ...
Page 114
Figure 3-8. Correspondence Between Data Memory and Addressing ( Special function register (SFR 256 bytes ...
Page 115
Figure 3-9. Correspondence Between Data Memory and Addressing ( Special function register (SFR 256 bytes ...
Page 116
Processor Registers The 78K0R/Ix3 products incorporate the following processor registers. 3.2.1 Control registers The control registers control the program sequence, statuses and stack memory. The control registers consist of a program counter (PC), a program status word (PSW) and ...
Page 117
Auxiliary carry flag (AC) If the operation result has a carry from bit borrow at bit 3, this flag is set (1 reset (0) in all other cases. (e) In-service priority flags (ISP1, ISP0) ...
Page 118
Figure 3-13. Data to Be Saved to Stack Memory PUSH rp instruction SP←SP−2 ↑ Register pair lower SP−2 ↑ SP−1 Register pair higher ↑ → SP CALL, CALLT instructions (4-byte stack) SP←SP−4 ↑ PC7 to PC0 SP−4 ↑ SP−3 PC15 ...
Page 119
Figure 3-14. Configuration of General-Purpose Registers FFEFFH Register bank 0 FFEF8H Register bank 1 FFEF0H Register bank 2 FFEE8H Register bank 3 FFEE0H FFEFFH Register bank 0 FFEF8H Register bank 1 FFEF0H Register bank 2 FFEE8H Register bank 3 FFEE0H ...
Page 120
ES and CS registers The ES register is used for data access and the CS register is used to specify the higher address when a branch instruction is executed. The default value of the ES register after reset is ...
Page 121
Special function registers (SFRs) Unlike a general-purpose register, each SFR has a special function. SFRs are allocated to the FFF00H to FFFFFH area. SFRs can be manipulated like general-purpose registers, using operation, transfer, and bit manipulation instructions. The manipulable ...
Page 122
Address Special Function Register (SFR) Name FFF00H Port register 0 FFF01H Port register 1 FFF02H Port register 2 FFF03H Port register 3 FFF04H Port register 4 FFF05H Port register 5 FFF06H Port register 6 FFF07H Port register 7 FFF08H Port ...
Page 123
Address Special Function Register (SFR) Name FFF31H Analog input channel specification register FFF38H External interrupt rising edge enable register 0 FFF39H External interrupt falling edge enable register 0 FFF3CH Input switch control register FFF3EH Timer input select register 0 FFF42H ...
Page 124
Address Special Function Register (SFR) Name FFF90H Sub-count register FFF91H FFF92H Second count register FFF93H Minute count register FFF94H Hour count register FFF95H Week count register FFF96H Day count register FFF97H Month count register FFF98H Year count register FFF99H Watch ...
Page 125
Address Special Function Register (SFR) Name FFFB2H DMA RAM address register 0L DMA RAM address register 0H FFFB3H DMA RAM address register 1L FFFB4H FFFB5H DMA RAM address register 1H FFFB6H DMA byte count register 0L FFFB7H DMA byte count ...
Page 126
Address Special Function Register (SFR) Name FFFE4H Interrupt mask flag register 0L FFFE5H Interrupt mask flag register 0H FFFE6H Interrupt mask flag register 1L FFFE7H Interrupt mask flag register 1H FFFE8H Priority specification flag register 00L PR00L FFFE9H Priority specification ...
Page 127
Extended special function registers (2nd SFRs: 2nd Special Function Registers) Unlike a general-purpose register, each extended SFR (2nd SFR) has a special function. Extended SFRs are allocated to the F0000H to F07FFH area. SFRs other than those in the ...
Page 128
Address Special Function Register (SFR) Name F0017H A/D port configuration register F0030H Pull-up resistor option register 0 F0031H Pull-up resistor option register 1 F0033H Pull-up resistor option register 3 F0034H Pull-up resistor option register 4 F0035H Pull-up resistor option register ...
Page 129
Address Special Function Register (SFR) Name F0106H Serial status register 03 F0107H F0108H Serial flag clear trigger register 00 F0109H F010AH Serial flag clear trigger register 01 F010BH F010CH Serial flag clear trigger register 02 F010DH F010EH Serial flag clear ...
Page 130
Address Special Function Register (SFR) Name F012AH Serial output enable register 0 F012BH Serial output level register 0 F0134H F0135H F0180H Timer counter register 00 F0181H F0182H Timer counter register 01 F0183H F0184H Timer counter register 02 F0185H F0186H Timer ...
Page 131
Address Special Function Register (SFR) Name F01A0H Timer status register 00 F01A1H F01A2H Timer status register 01 F01A3H F01A4H Timer status register 02 F01A5H F01A6H Timer status register 03 F01A7H F01A8H Timer status register 04 F01A9H F01AAH Timer status register ...
Page 132
Address Special Function Register (SFR) Name F01C6H Timer counter register 11 F01C7H F01C8H Timer mode register 08 F01C9H F01CAH Timer mode register 09 F01CBH F01CCH Timer mode register 10 F01CDH F01CEH Timer mode register 11 F01CFH F01D0H Timer status register ...
Page 133
Address Special Function Register (SFR) Name F0230H IICA control register 0 F0231H IICA control register 1 F0232H IICA low-level width setting register IICWL F0233H IICA high-level width setting register F0234H Slave address register F0240H Programmable gain amplifier control register F0241H ...
Page 134
Instruction Address Addressing 3.3.1 Relative addressing [Function] Relative addressing stores in the program counter (PC) the result of adding a displacement value included in the instruction word (signed complement data: −128 to +127 or −32768 to +32767) to the ...
Page 135
Table indirect addressing [Function] Table indirect addressing specifies a table address in the CALLT table area (0080H to 00BFH) with the 5-bit immediate data in the instruction word, stores the contents at that table address and the next address ...
Page 136
Register direct addressing [Function] Register direct addressing stores in the program counter (PC) the contents of a general-purpose register pair (AX/BC/DE/HL) and CS register of the current register bank specified with the instruction word as 20-bit data, and specifies ...
Page 137
Addressing for Processing Data Addresses 3.4.1 Implied addressing [Function] Instructions for accessing registers (such as accumulators) that have special functions are directly specified with the instruction word, without using any register specification field in the instruction word. [Operand format] ...
Page 138
Direct addressing [Function] Direct addressing uses immediate data in the instruction word as an operand address to directly specify the target address. [Operand format] Identifier ADDR16 Label or 16-bit immediate data (only the space from F0000H to FFFFFH is ...
Page 139
Short direct addressing [Function] Short direct addressing directly specifies the target addresses using 8-bit data in the instruction word. This type of addressing is applied only to the space from FFE20H to FFF1FH. [Operand format] Identifier SADDR Label, FFE20H ...
Page 140
SFR addressing [Function] SFR addressing directly specifies the target SFR addresses using 8-bit data in the instruction word. This type of addressing is applied only to the space from FFF00H to FFFFFH. [Operand format] Identifier SFR SFR name SFRP ...
Page 141
Register indirect addressing [Function] Register indirect addressing directly specifies the target addresses using the contents of the register pair specified with the instruction word as an operand address. [Operand format] Identifier − [DE], [HL] (only the space from F0000H ...
Page 142
Based addressing [Function] Based addressing uses the contents of a register pair specified with the instruction word as a base address, and 8-bit immediate data or 16-bit immediate data as offset data. The sum of these values is used ...
Page 143
CHAPTER 3 CPU ARCHITECTURE Figure 3-30. Example of [HL + byte], [DE + byte] rp (HL/DE) OP code byte Figure 3-31. Example of word[B], word[C] r (B/C) OP code Low Addr. High Addr. Figure 3-32. Example of word[BC] rp (BC) ...
Page 144
Figure 3-33. Example of ES:[HL + byte], ES:[DE + byte] OP code byte Figure 3-34. Example of ES:word[B], ES:word[C] OP code Low Addr. High Addr. OP code Low Addr. High Addr. 142 CHAPTER 3 CPU ARCHITECTURE ES rp (HL/DE) Target ...
Page 145
Based indexed addressing [Function] Based indexed addressing uses the contents of a register pair specified with the instruction word as the base address, and the content of the B register or C register similarly specified with the instruction word ...
Page 146
Stack addressing [Function] The stack area is indirectly addressed with the stack pointer (SP) contents. This addressing is automatically employed when the PUSH, POP, subroutine call, and return instructions are executed or the register is saved/restored upon generation of ...
Page 147
Port Functions There are three types of pin I/O buffer power supplies: AV power supplies and the pins is shown below. Table 4-1. Pin I/O Buffer Power Supplies (78K0R/IB3) • 30-pin plastic SSOP (7.62 mm (300)) Power Supply AV ...
Page 148
The 78K0R/Ix3 products are provided with the digital I/O ports, which enable variety of control operations. The functions of each port are shown in Table 4-5. In addition to the function as digital I/O ports, these ports have several alternate ...
Page 149
Function Name √ √ − − − − P00 √ √ − − − − P01 √ √ √ √ √ √ P10 √ √ √ √ √ √ P11 √ √ √ √ √ √ P12 √ √ √ ...
Page 150
Function Name √ √ √ √ √ √ P30 √ √ √ √ √ √ P31 √ √ √ √ √ √ P32 − − − − − √ P33 √ √ √ √ √ √ Note P40 √ √ ...
Page 151
Function Name − − √ √ √ √ P70 − − √ √ √ √ P71 − √ √ √ √ √ P72 − √ √ √ √ √ P73 − − √ √ √ √ P74 − − √ ...
Page 152
Function Name √ √ √ √ √ √ P120 √ √ √ √ √ √ P121 √ √ √ √ √ √ P122 − √ √ √ √ √ P123 − √ √ √ √ √ P124 − − − ...
Page 153
Port Configuration Ports include the following hardware. Item • 78K0R/IB3 Control registers Port mode registers (PM1 to PM5, PM8, PM12) Port registers (P1 to P5, P8, P12) Pull-up resistor option registers (PU1, PU3 to PU5, PU12) Port input mode ...
Page 154
Item • 78K0R/IB3 Port Total: 23 (CMOS I/O: 21, CMOS input: 2) • 78K0R/IC3 (38-pin products) Total: 31 (CMOS I/O: 27, CMOS input: 4,) • 78K0R/IC3 (44-pin products) Total: 37 (CMOS I/O: 33, CMOS input: 4) • 78K0R/IC3 (48-pin products) ...
Page 155
Port 0 78K0R/IB3 − P00/TI00 − P01/TO00 Port 0 is I/O port with an output latch. Port 0 can be set to the input mode or output mode in 1-bit units using port mode register 0 (PM0). When the ...
Page 156
WR PU PU0 PU01 RD WR PORT P0 Output latch (P01 PM0 PM01 Alternate function P0: Port register 0 PU0: Pull-up resistor option register 0 PM0: Port mode register 0 RD: Read signal WRxx: Write signal Remark With ...
Page 157
Port 1 78K0R/IB3 √ P10/TI02/TO02/ P10/TI02/TO02 TxD0 √ P11/TI03/TO03/ P11/TI03/TO03 RxD0 √ P12/TI04/TO04 √ P13/TI05/TO05 − Note 2 P14/TI06/TO06 − Note 2 P15/TI07/TO07 − P16/TI08/TO08 − Note 3 P17/TI09/TO09 Port I/O port with an output latch. ...
Page 158
WR PU PU1 PU10 to PU17 Alternate function RD WR PORT P1 Output latch (P10 to P17 PM1 PM10 to PM17 Alternate function P1: Port register 1 PU1: Pull-up resistor option register 1 PM1: Port mode register 1 ...
Page 159
Port 2 78K0R/IB3 √ P20/ANI0 √ P21/ANI1 √ P22/ANI2 √ P23/ANI3 √ P24/ANI4 √ P25/ANI5 − P26/ANI6 − P27/ANI7 Port I/O port with an output latch. Port 2 can be set to the input mode or ...
Page 160
RD WR PORT P2 Output latch (P20 to P27 PM2 PM20 to PM27 P2: Port register 2 PM2: Port mode register 2 RD: Read signal WR××: Write signal 158 CHAPTER 4 PORT FUNCTIONS Figure 4-4. Block Diagram of ...
Page 161
Port 3 78K0R/IB3 √ P30/SO10/TxD1 /TO11 √ P31/SI10/RxD1/ SDA10/INTP1/ TI09 √ P32/SCK10/ SCL10/INTP2 − P33 Port 3 is I/O port with an output latch. Port 3 can be set to the input mode or output mode in 1-bit units ...
Page 162
WR PU PU3 PU30 RD WR PORT P3 Output latch (P30) WR POM POM3 POM30 WR PM PM3 PM30 Alternate function Alternate function P3: Port register 3 PU3: Pull-up resistor option register 3 POM3: Port output mode register 3 PM3: ...
Page 163
CHAPTER 4 PORT FUNCTIONS Figure 4-6. Block Diagram of P31 and P32 WR PIM PIM3 PIM31, PIM32 WR PU PU3 PU31, PU32 Alternate function RD WR PORT P3 Output latch (P31, P32) WR POM POM3 POM31, POM32 WR PM PM3 ...
Page 164
PORT Output latch WR PM P3: Port register 3 PU3: Pull-up resistor option register 3 PM3: Port mode register 3 RD: Read signal WR××: Write signal 162 CHAPTER 4 PORT FUNCTIONS Figure 4-7. Block Diagram of ...
Page 165
Port 4 78K0R/IB3 √ P40/TOOL0 √ P41/TOOL1 − P42 − P43 Port 4 is I/O port with an output latch. Port 4 can be set to the input mode or output mode in 1-bit units using port mode register ...
Page 166
Figure 4-8. Block Diagram of P40 and P41 WR PU PU4 PU40, PU41 Alternate function RD WR PORT P4 Output latch (P40, P41 PM4 PM40, PM41 Alternate function P4: Port register 4 PU4: Pull-up resistor option register 4 ...
Page 167
CHAPTER 4 PORT FUNCTIONS Figure 4-9. Block Diagram of P42 and P43 WR PU PU4 PU42, PU43 RD WR PORT P4 Output latch (P42, P43 PM4 PM42, PM43 P4: Port register 4 PU4: Pull-up resistor option register 4 ...
Page 168
Port 5 78K0R/IB3 √ P50/TI06/TO06 √ P51/TI07/TO07 − P52/SLTI/SLTO − P53 Port 4-bit I/O port with an output latch. Port 5 can be set to the input mode or output mode in 1-bit units using port ...
Page 169
WR PU PU50, PU51 RD WR PORT Output latch (P50, P51 PM50, PM51 (2) In products other than 78K0R/IE3 WR PU PU5 PU50, PU51 Alternate function RD WR PORT P5 Output latch (P50, P51 ...
Page 170
WR PU PU5 PU52 Channel 0 of TAUS Channel 1 of TAUS Channel 8 of TAUS Channel 9 of TAUS Channel 10 of TAUS Channel 11 of TAUS RD WR PORT P5 Output latch (P52 PM5 PM52 P5: ...
Page 171
CHAPTER 4 PORT FUNCTIONS Figure 4-12. Block Diagram of P53 WR PU PU5 PU53 RD WR PORT P5 Output latch (P53 PM5 PM53 P5: Port register 5 PU5: Pull-up resistor option register 5 PM5: Port mode register 5 ...
Page 172
Port 6 78K0R/IB3 − P60/SCL0 − P61/SDA0 Port I/O port with an output latch. Port 6 can be set to the input mode or output mode in 1-bit units using port mode register 6 (PM6). The ...
Page 173
Port 7 78K0R/IB3 − Note 1 P70/SO01/INTP4 − Note 1 P71/SI01/INTP5 − P72/SCK01/ P72/INTP6/RxD0 INTP6 − Note 2 P73/SO00/TxD0 P73/TxD0/TO10 /TO10 − Note 2 P74/SI00/RxD0/ TI10 − P75/SCK00/TI11 − P76 − P77 Port 7 is I/O port with an ...
Page 174
WR PU PU7 PU70 Alternate function RD WR PORT P7 Output latch (P70) WR POM POM7 POM70 WR PM PM7 PM70 Alternate function P7: Port register 7 PU7: Pull-up resistor option register 7 POM7: Port output mode register 7 PM7: ...
Page 175
CHAPTER 4 PORT FUNCTIONS Figure 4-15. Block Diagram of P71 and P74 WR PIM PIM7 PIM71, PIM74 WR PU PU7 PU71, PU74 Alternate function RD WR PORT P7 Output latch (P71, P74 PM7 PM71, PM74 P7: Port register ...
Page 176
WR PIM PIM7 PIM72 WR PU PU7 PU72 Alternate function RD WR PORT P7 Output latch (P72 PM7 PM72 P7: Port register 7 PU7: Pull-up resistor option register 7 PM7: Port mode register ...
Page 177
WR PIM PIM7 PIM72 WR PU PU7 PU72 Alternate function RD WR PORT P7 Output latch (P72) WR POM POM7 POM72 WR PM PM7 PM72 Alternate function P7: Port register 7 ...
Page 178
WR PU PU7 PU73 RD WR PORT P7 Output latch (P73) WR POM POM7 POM73 WR PM PM7 PM73 Alternate function Alternate function P7: Port register 7 PU7: Pull-up resistor option register 7 PM7: Port mode register 7 POM7: Port ...
Page 179
CHAPTER 4 PORT FUNCTIONS Figure 4-18. Block Diagram of P75 WR PIM PIM7 PIM75 WR PU PU7 PU75 Alternate function RD WR PORT P7 Output latch (P75) WR POM POM7 POM75 WR PM PM7 PM75 Alternate function P7: Port register ...
Page 180
Figure 4-19. Block Diagram of P76 and P77 WR PU PU7 PU76, PU77 RD WR PORT Output latch (P76, P77 PM7 PM76, PM77 P7: Port register 7 PU7: Pull-up resistor option register 7 PM7: Port mode register 7 ...
Page 181
Port 8 78K0R/IB3 √ P80/CMP0P/TM OFF0/INTP3/ PGAI √ P81/CMP0M − P82/CMP1P/ TMOFF1/INTP7 √ P83/CMP1M Port 8 is I/O port with an output latch. Port 8 can be set to the input mode or output mode in 1-bit units using ...
Page 182
Figure 4-21. Block Diagram of P81 and P83 WR PIM PIM8 PIM81, PIM83 RD WR PORT P8 Output latch (P81, P83 PM8 PM81, PM83 P8: Port register 8 PM8: Port mode register 8 PIM8: Port input mode register ...
Page 183
CHAPTER 4 PORT FUNCTIONS Figure 4-22. Block Diagram of P82 WR PIM PIM8 PIM82 Alternate function RD WR PORT P8 Output latch (P82 PM8 PM82 Comparator P8: Port register 8 PM8: Port mode register 8 PIM8: Port input ...
Page 184
Port 12 78K0R/IB3 √ P120/INTP0/ EXLVI √ P121/X1/INTP4 √ P122/X2/ EXCLK/INTP5 − P123/XT1 − P124/XT2 P120 is I/O port with an output latch. Port 12 can be set to the input mode or output mode in 1-bit units using ...
Page 185
CHAPTER 4 PORT FUNCTIONS Figure 4-23. Block Diagram of P120 WR PU PU12 PU120 Alternate function RD WR PORT P12 Output latch (P120 PM12 PM120 P12: Port register 12 PU12: Pull-up resistor option register 12 PM12: Port mode ...
Page 186
Figure 4-24. Block Diagram of P121 and P122 (1/2) (1) 78K0R/IB3 and 38-pin products of 78K0R/IC3 Alternate function RD Alternate function RD CMC: Clock operation mode control register RD: Read signal 184 CHAPTER 4 PORT FUNCTIONS CMC OSCSEL CMC EXCLK, ...
Page 187
Figure 4-24. Block Diagram of P121 and P122 (2/2) (1) 44-pin and 48-pin products of 78K0R/IC3, 78K0R/ID3, 78K0R/IE3 RD RD CMC: Clock operation mode control register RD: Read signal CHAPTER 4 PORT FUNCTIONS CMC OSCSEL CMC EXCLK, OSCSEL User’s Manual ...
Page 188
Figure 4-25. Block Diagram of P123 and P124 RD RD CMC: Clock operation mode control register RD: Read signal 186 CHAPTER 4 PORT FUNCTIONS CMC OSCSELS CMC OSCSELS User’s Manual U19678EJ1V1UD P124/XT2 P123/XT1 ...
Page 189
Port 14 78K0R/IB3 − P140/PCLBUZ0 − P141/PCLBUZ1 P140 is a output port with an output latch. P141 is I/O port with an output latch. P141 can be set to the input mode or output mode in 1-bit units using ...
Page 190
RD WR PORT P140 Output latch (P140) Alternate function P14: Port register 14 RD: Read signal WR××: Write signal Remark The P140 pin outputs a low level when it is used as a port function pin and a reset is ...
Page 191
CHAPTER 4 PORT FUNCTIONS Figure 4-27. Block Diagram of P141 WR PU PU14 PU141 RD WR PORT P14 Output latch (P141 PM14 PM141 Alternate function P14: Port register 14 PU14: Pull-up resistor option register 14 PM14: Port mode ...
Page 192
Port 15 78K0R/IB3 − P150/ANI8 − P151/ANI9 − P152/ANI10 − P153/ANI11 Port I/O port with an output latch. Port 15 can be set to the input mode or output mode in 1-bit units using port mode ...
Page 193
CHAPTER 4 PORT FUNCTIONS Figure 4-28. Block Diagram of P150 to P153 RD WR PORT P15 Output latch (P150 to P153 PM15 PM150 to PM153 A/D converter P15: Port register 15 PM15: Port mode register 15 RD: Read ...
Page 194
Registers Controlling Port Function Port functions are controlled by the following six types of registers. • Port mode registers (PMxx) • Port registers (Pxx) • Pull-up resistor option registers (PUxx) • Port input mode registers (PIM3, PIM7, PIM8) • ...
Page 195
Figure 4-29. Format of Port Mode Register (78K0R/IB3) Symbol PM1 PM2 1 1 PM25 PM3 PM4 PM5 PM8 PM12 ...
Page 196
Figure 4-30. Format of Port Mode Register (78K0R/IC3) Symbol PM1 PM2 PM27 PM26 PM25 PM3 PM4 PM5 Note1 PM6 PM7 1 1 ...
Page 197
Figure 4-31. Format of Port Mode Register (78K0R/ID3) Symbol PM0 PM1 PM2 PM27 PM26 PM25 PM3 PM4 PM5 PM6 ...
Page 198
Figure 4-32. Format of Port Mode Register (78K0R/IE3) Symbol PM0 PM1 PM17 PM16 PM15 PM2 PM27 PM26 PM25 PM3 PM4 PM5 PM6 ...
Page 199
Port registers (Pxx) These registers write the data that is output from the chip when data is output from a port. If the data is read in the input mode, the pin level is read read ...
Page 200
Figure 4-34. Format of Port Register (78K0R/IC3) Symbol P27 P26 P25 Note Note 2 P7 ...