TIMER B
8.4 Event counter mode
8.4.1 Count source
For timer B2 in the event counter mode, a count source (an external signal into the TB2IN pin, or fX32) can
be selected by using the timer B2 clock source select bit. (See Figure 8.4.2.) Timers B0 and B1 count the
external signals input to the TB0IN and TB1IN pins, respectively.
When fX32 is selected as the count source, the TB2IN pin serves as a programmable I/O port pin or as I/
O pins of other internal peripheral devices, which are multiplexed.
b7 b6 b5 b4 b3 b2 b1 b0
Particular function select register 1 (Address 6316
)
0
0
Bit
0
Bit name
Function
At reset R/W
STP-instruction-execution
status bit
0 : Normal operation.
1 : During execution of STP instruction
(Note 1) RW
(Note 2)
WIT-instruction-execution
status bit
0 : Normal operation.
1 : During execution of WIT instruction
1
(Note 1) RW
(Note 2)
Fix this bit to “0.”
0
0
2
3
RW
System clock stop select bit
at WIT
0 : In the wait mode, system clock fsys is active.
1 : In the wait mode, system clock fsys is inactive.
RW
(Note 3)
Fix this bit to “0.”
0
0
0
RW
—
4
5
6
The value is “0” at reading.
Timer B2 clock source select bit
(Valid in event counter mode.)
0 : External signal input to the TB2IN pin is counted.
1 : fX32 is counted.
RW
The value is “0” at reading.
—
7
0
Notes 1: At power-on reset, this bit becomes “0.” At hardware reset or software reset, this bit retains the value just before reset.
2: Even when “1” is written, the bit status will not change.
3: Setting this bit to “1” must be performed just before execution of the WIT instruction. Also, after the wait state is termi-
nated, this bit must be cleared to “0” immediately.
Fig. 8.4.2 Structure of particular function select register 1
7906 Group User’s Manual Rev.2.0
8-15