
128
CHAPTER 6
16-BIT TIMER/EVENT COUNTER 0
User’s Manual U12790EJ2V0UD
(4) Prescaler mode register 0 (PRM0)
This register selects the count clock of 16-bit timer counter 0 (TM0) and the valid edges of the TI00 and TI01
input pins. PRM0 is set by an 8-bit memory manipulation instruction.
The value of this register is cleared to 00H after reset.
Figure 6-5. Format of Prescaler Mode Register 0 (PRM0)
ES11
ES10
Selection of valid edge of TI01
0
Falling edge
0
1
Rising edge
1
0
Setting prohibited
1
Both rising and falling edges
ES01
ES00
Selection of valid edge of TI00
0
Falling edge
0
1
Rising edge
1
0
Setting prohibited
1
Both rising and falling edges
PRM01 PRM00
Selection of count clock
00
fX/2 (3.15 MHz)
01
fX/22 (1.58 MHz)
10
fX/26 (98.4 kHz)
1
Valid edge of TI00
Cautions 1. Be sure to set data to PRM0 after stopping the timer operation.
2. When the valid edge of TI00 is set as the count clock, do not set the mode in which TM0
is cleared and started at the valid edge of TI00, and do not set T100 as the capture trigger.
3. The capture trigger must be a pulse wider than two pulses of the selected count clock
to ensure capturing. Similarly, the external clock must have a pulse wider than two
internal clocks (fX/23).
4. If the TI00 pin or TI01 pin goes high immediately after system reset, the rising edge is
detected immediately after TM0 has been enabled to operate. Keep this in mind when
the pin is pulled up. However, when TM0 is enabled to operate again after it has been
stopped, the rising edge is not detected.
Remarks 1. fX: System clock oscillation frequency
2. TI00, TI01: Input pins of 16-bit timer/event counter 0
3. ( ): fX = 6.3 MHz
76543
ES11 ES10 ES01
0
PRM01 RPM00
ES00
0
210
Symbol
PRM0
Address
FF7AH
After reset
00H
R/W