BAT32G1x9 user manual | Chapter 7 Timer A
247 / 1149
Rev.1.02
7.4.4
Event counter pattern
This is a mode of decrementing counting via an external event signal (count source) input by the TAIO pin.
I can pass tiPF0 of the TAIOC0 register through the TIOGT0 to TIOGT1 bit and TAISR0 registers for various
settings during event counting and can pass the TIPF0 of the TAIOC0 register The ~TIPF1 bit specifies the filter
function of the TAIO input.
Alternating outputs can be performed even in the TAO pin in event counter mode. To use the event counter
mode, refer to the "Setup Steps for 7.5.5 TAO Pins and TAIO Pins". Example 1 of the operation of the event counter
pattern is shown in Figure 7-12.
Figure 7-12 Example of running the event counter pattern 1
TAIO pin event
input
Counter of TIMER A
INTTMA interrupt
flag bit
TUNDF bit of
TACR0 register
TMOD2~TMOD0 bit
of TAMR0 register
TSTART bit of
TACR0 register
control bit of
TAIOC0 register
accept interrupt request
set "0" via program
event input ends
start event input
configure intial value of counter
counting Events at rising edge
enter into event counter mode
An example of a specified time count in event counter mode (TlOGT1 bits for the TAIOC0 register and
"01B" or "10B" for TlOGT0 bits for the TAIOC0 registers) is shown in the figure 7-13.