BAT32G1x9 user manual | Chapter 7 Timer A
238 / 1149
Rev.1.02
7.3.4
Timer A controls register 0 (TACR0).
The TACR0 register is the register that controls the count and stop of register A and the state of timer A.
Set the TARR0 register via the 8-bit memory operation instruction.
After generating a reset signal, the value of the TACR0 register changes to "00H".
Figure 7-5 Timer A controls the format of register 0 (TACR0).
Address: 40042After 240H
reset:
00H R/W
Symbol
76543210
TACR0
TUNDF
Underflow flag for timer A
0
No underflow occurred.
1
Underflow occurs.
[condition for
"0"].
• When this bit is written
"0" through the program
[condition for
"1"].
•When the counter underflows
TEDGF
Detection flag for a valid edge
0
There are no valid edges.
1
There are valid edges.
[condition for
"0"].
• When this bit is written
"0" through the program
[condition for
"1"].
• End of effective width measurement with external input (TAIO) in pulse width measurement mode
• When entering the setting edge of the external input (TAIO) in pulse period measurement mode
TSTOP
The count of timer A
forces the stop
note
1
If you write "1" to this bit, you force the count to stop. The read value is
"0".
TCSTF
The count status flag for
timer A
is noted
2
0
Stop count.
1
Counting.
[condition for
"0"].
• When writing "0" to the TSTART bit (which becomes "0" synchronously with the count source).
• When writing "1" to the TSTOP bit
[condition for
"1"].
• When the
TSTART
bit is written
"1"
(which becomes "1" synchronously with the count source).
TSTART
The count of timer A starts
with
Note
2
0
Stop count.
1
Start counting.
Start counting by writing "1" to the TSTART bit; Stop counting by writing "0" to the TSTART bit. If you place
the TSTART position "1" (start counting), the TCSTF bit changes to "1" (counting) synchronously with the
counting source. Also, after writing "0" to the TSTART bit, the TCSTF bit changes to "0" (stop counting)
synchronously with the counting source. For details, please refer to "Start and Stop Control of 7.5.1 Count".
Note: 1
If you write
"1"
(force stop count)
to the
TSTOP
bit
, both
the TSTART
bit and
the TSTF
bit are initialized at the same time,
and the pulse output level is initialized.
0
0
TUNDF
TEDGF
0
TSTOP
TCSTF
TSTART