User’s Manual U16898EJ3V0UD
10
3.4.6 Based
addressing........................................................................................................................46
3.4.7 Stack
addressing .........................................................................................................................47
CHAPTER 4 PORT FUNCTIONS ...........................................................................................................48
4.1
Functions of Ports .....................................................................................................................48
4.2
Port Configuration .....................................................................................................................49
4.2.1
Port 2...........................................................................................................................................50
4.2.2
Port 3...........................................................................................................................................51
4.2.3
Port 4...........................................................................................................................................53
4.2.4
Port 12.........................................................................................................................................58
4.2.5
Port 13.........................................................................................................................................60
4.3
Registers Controlling Port Functions ......................................................................................60
4.4
Operation of Port Function .......................................................................................................65
4.4.1
Writing to I/O port ........................................................................................................................65
4.4.2
Reading from I/O port ..................................................................................................................65
4.4.3
Operations on I/O port .................................................................................................................65
CHAPTER 5 CLOCK GENERATORS...................................................................................................66
5.1
Functions of Clock Generators ................................................................................................66
5.1.1
System clock oscillators...............................................................................................................66
5.1.2
Clock oscillator for interval time generation .................................................................................66
5.2
Configuration of Clock Generators ..........................................................................................67
5.3
Registers Controlling Clock Generators .................................................................................69
5.4
System Clock Oscillators ..........................................................................................................72
5.4.1
High-speed internal oscillator ......................................................................................................72
5.4.2
Crystal/ceramic oscillator.............................................................................................................72
5.4.3
External clock input circuit ...........................................................................................................74
5.4.4
Prescaler .....................................................................................................................................74
5.5
Operation of CPU Clock Generator ..........................................................................................75
5.6
Operation of Clock Generator Supplying Clock to Peripheral Hardware.............................80
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00.............................................................................82
6.1
Functions of 16-Bit Timer/Event Counter 00 ...........................................................................82
6.2
Configuration of 16-Bit Timer/Event Counter 00.....................................................................83
6.3
Registers to Control 16-Bit Timer/Event Counter 00..............................................................87
6.4
Operation of 16-Bit Timer/Event Counter 00 ...........................................................................93
6.4.1
Interval timer operation................................................................................................................93
6.4.2
External event counter operation.................................................................................................95
6.4.3
Pulse width measurement operations..........................................................................................98
6.4.4
Square-wave output operation...................................................................................................106
6.4.5
PPG output operations ..............................................................................................................108
6.4.6
One-shot pulse output operation ...............................................................................................111
6.5
Cautions Related to 16-Bit Timer/Event Counter 00.............................................................116
CHAPTER 7 8-BIT TIMER 80 ..............................................................................................................122
7.1
Function of 8-Bit Timer 80.......................................................................................................122
7.2
Configuration of 8-Bit Timer 80 ..............................................................................................123
7.3
Register Controlling 8-Bit Timer 80........................................................................................125