BAT32G1x9 user manual | Chapter 8 Timer B
278 / 1149
Rev.1.02
8.4.2 Timer mode (input capture function)
Capable of passing the value of tb registers to TBGRA registers and TBGRBs after detecting the input
edge of the input capture/output comparison pins (TBIO0, TBIO1). Register. Detection edges can be selected
from rising, falling, and bilateral edges. Pulse width and pulse period can be measured by using the input
capture function.
The specifications of the input capture function are shown in Table 8-9.
Table 8-9
Specifications for input capture function
project
specification
Count the sources
f
CLK
, f
CLK
/2, f
CLK
/4, f
CLK
/8, f
CLK
/32
External input signals
from the TBCLK0 and TBCLK1 pins (valid edges are selected
programmatically
).
count
Increment the count
Count cycles
When the TBCLR
bits
1 and TBCCLR0
bits
of
the TBBCR
register
are
"00B"
(free
running
).
1/fk
65536fk: The frequency of the count source
Count start criteria
Write "1" (start counting) to the TBSTART bit of the TBBR register.
Count stop conditions
Write "0" (stop count) to the TBSTART bit of the TBMR register.
Timing of the generation of
interrupt requests
• Input capture (effective edges of TBIO0 pin and TBIO1 pin inputs).
• Overflow of TB registers
TBIO0 pin and
TBIO1
The function of the pin
I/O ports or inputs captured by pins
TBCLK0 pin and
Features of the TBCLK1
pin
I/O port or external clock input
Read timer
If you read the TB register, you can read the count value.
Write timer
Can write TB registers.
Select Features
• Input capture of the selection of input pins
1 or 2 of the TBIO0 pins and TBIO1 pins
• Input snaps the selection of valid edges of input
Rising edge, falling edge, or bilateral edge
• Set the TB register to the "0000H" timing
Spillage or input capture
•Buffer operation (see "8.4.1(2) Buffer Operation").
• Digital filters (see "8.4.1(3) Digital Filters").
• Input capture operation via EVENTC's event input signal (input capture).