BAT32G1x9 user manual | Chapter 7 Timer A
246 / 1149
Rev.1.02
7.4.3
Pulse output mode
In this mode, the count is decremented through the TCK0~TCK2 bit selected count source of the TAMR0
register, and whenever an underflow occurs, the output level of the TAIO pin and the TAO pin is inverted.
In pulse output mode, the count value is decremented by 1 whenever the count source is entered, and if
the count value becomes "0000H" and the next count source is entered, an underflow occurs, and an
interrupt request is generated.
Pulses can be output from the TAIO pin and TAO pin, and the output level is inverted whenever
underflow occurs. The pulse output of the TAO pin can be stopped through the TOENA bit of the TAIOC0
register.
In addition, the output level can be selected by the TEDGSEL bit of the TAIOC0 register. An example of the
pulse output mode is shown in Figure 7-1.
Fig. 7-11 Example of operation of pulse output mode
TSTART bit of
TACR0 register
TA0 register
Counter of TIMER A
TEDGSEL bit of TAIOC0
register
corresponding bit of port mode
register (PMxx) used for TAIO
functional multiplexing.
TUNDF bit of TACR0 register
TAO pin output
TAIO pin output
INTTMA interrupt flag bit
write "0004H" to TA
register via program
write "0002H" to TA
register via program
write "1" to TSTART bit of TACR0
register via program
write "1" into corresponding bit of
port mode register (PMxx) used for
TAIO functional multiplexing.
NOTE 1: configure to high impedance state via port output enable control of the selected TAIO function.
counting source
reload register
accept interrupt request
high impedance state
(NOTE 1)
set "0" via program