![](http://datasheet.mmic.net.cn/Renesas-Electronics-America/UPD78F9212CS-CAB-A_datasheet_99863/UPD78F9212CS-CAB-A_11.png)
User’s Manual U16994EJ6V0UD
9
3.4 Operand Address Addressing .................................................................................................... 50
3.4.1 Direct addressing .............................................................................................................................. 50
3.4.2 Short direct addressing ..................................................................................................................... 51
3.4.3 Special function register (SFR) addressing ....................................................................................... 52
3.4.4 Register addressing .......................................................................................................................... 53
3.4.5 Register indirect addressing.............................................................................................................. 54
3.4.6 Based addressing ............................................................................................................................. 55
3.4.7 Stack addressing............................................................................................................................... 56
CHAPTER 4 PORT FUNCTIONS........................................................................................................... 57
4.1 Functions of Ports........................................................................................................................ 57
4.2 Port Configuration........................................................................................................................ 58
4.2.1 Port 2 ................................................................................................................................................ 58
4.2.2 Port 3 ................................................................................................................................................ 65
4.2.3 Port 4 ................................................................................................................................................ 66
4.3 Registers Controlling Port Functions ........................................................................................ 67
4.4 Operation of Port Function.......................................................................................................... 72
4.4.1 Writing to I/O port .............................................................................................................................. 72
4.4.2 Reading from I/O port........................................................................................................................ 72
4.4.3 Operations on I/O port....................................................................................................................... 72
CHAPTER 5 CLOCK GENERATORS................................................................................................... 73
5.1 Functions of Clock Generators................................................................................................... 73
5.1.1 System clock oscillators .................................................................................................................... 73
5.1.2 Clock oscillator for interval time generation....................................................................................... 73
5.2 Configuration of Clock Generators ............................................................................................ 74
5.3 Registers Controlling Clock Generators.................................................................................... 76
5.4 System Clock Oscillators ............................................................................................................ 79
5.4.1 High-speed internal oscillator ............................................................................................................ 79
5.4.2 Crystal/ceramic oscillator .................................................................................................................. 79
5.4.3 External clock input circuit................................................................................................................. 81
5.4.4 Prescaler ........................................................................................................................................... 81
5.5 Operation of CPU Clock Generator ............................................................................................ 82
5.6 Operation of Clock Generator Supplying Clock to Peripheral Hardware............................... 88
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00............................................................................. 90
6.1 Functions of 16-bit Timer/Event Counter 00.............................................................................. 90
6.2 Configuration of 16-bit Timer/Event Counter 00 ....................................................................... 91
6.3 Registers to Control 16-bit Timer/Event Counter 00 ................................................................ 95
6.4 Operation of 16-bit Timer/Event Counter 00............................................................................ 101
6.4.1 Interval timer operation ................................................................................................................... 101
6.4.2 External event counter operation .................................................................................................... 103
6.4.3 Pulse width measurement operations ............................................................................................. 106
6.4.4 Square-wave output operation ........................................................................................................ 114
6.4.5 PPG output operations .................................................................................................................... 116