User’s Manual U18172EJ2V0UD
9
3.4.6 Based addressing ............................................................................................................................. 49
3.4.7 Stack addressing............................................................................................................................... 50
CHAPTER 4 PORT FUNCTIONS........................................................................................................... 51
4.1
Functions of Ports........................................................................................................................ 51
4.2
Port Configuration........................................................................................................................ 52
4.2.1
Port 2 ................................................................................................................................................ 52
4.2.2
Port 3 ................................................................................................................................................ 56
4.2.3
Port 4 ................................................................................................................................................ 57
4.3
Registers Controlling Port Functions ........................................................................................ 58
4.4
Operation of Port Function.......................................................................................................... 63
4.4.1
Writing to I/O port .............................................................................................................................. 63
4.4.2
Reading from I/O port........................................................................................................................ 63
4.4.3
Operations on I/O port....................................................................................................................... 63
CHAPTER 5 CLOCK GENERATORS................................................................................................... 64
5.1
Functions of Clock Generators................................................................................................... 64
5.1.1 System clock oscillators .................................................................................................................... 64
5.1.2 Clock oscillator for interval time generation....................................................................................... 64
5.2
Configuration of Clock Generators ............................................................................................ 65
5.3
Registers Controlling Clock Generators.................................................................................... 67
5.4
System Clock Oscillators ............................................................................................................ 70
5.4.1 High-speed internal oscillator ............................................................................................................ 70
5.4.2 Crystal/ceramic oscillator .................................................................................................................. 70
5.4.3 External clock input circuit................................................................................................................. 72
5.4.4 Prescaler ........................................................................................................................................... 72
5.5 Operation of CPU Clock Generator ............................................................................................ 73
5.6 Operation of Clock Generator Supplying Clock to Peripheral Hardware............................... 79
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00............................................................................. 81
6.1 Functions of 16-Bit Timer/Event Counter 00 ............................................................................. 81
6.2 Configuration of 16-Bit Timer/Event Counter 00....................................................................... 82
6.3 Registers to Control 16-Bit Timer/Event Counter 00 ................................................................ 86
6.4 Operation of 16-Bit Timer/Event Counter 00 ............................................................................. 92
6.4.1 Interval timer operation ..................................................................................................................... 92
6.4.2 External event counter operation ...................................................................................................... 94
6.4.3 Pulse width measurement operations ............................................................................................... 97
6.4.4 Square-wave output operation ........................................................................................................ 105
6.4.5 PPG output operations .................................................................................................................... 107
6.4.6 One-shot pulse output operation ..................................................................................................... 110
6.5 Cautions Related to 16-Bit Timer/Event Counter 00 ............................................................... 115
CHAPTER 7 8-BIT TIMER H1 ............................................................................................................. 122
7.1 Functions of 8-Bit Timer H1 ...................................................................................................... 122