
R01UH0336EJ0102 Rev.1.02
Page 468 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.14.3
TAUBnTTINm Input Period Count Detection Function
(1)
Overview
Summary
This function measures the cumulative width of a TAUBnTTINm input signal.
Prerequisites
• The operating mode should be set to capture and gate count mode. (See
Table 13-37, TAUBnCMORm Settings for TAUBnTTINm Input Period Count
Detection Function
)
• TAUBnTTOUTm is not used with this function.
Description
The counter is enabled by setting the channel trigger bit
(TAUBnTS.TAUBnTSm) to 1. This in turn sets TAUBnTE.TAUBnTEm = 1,
enabling count operation. The counter awaits a valid TAUBnTTINm input edge.
When a valid TAUBnTTINm input start edge is detected, the counter starts to
count from 0000
H
.
When a valid TAUBnTTINm input stop edge is detected, the current
TAUBnCNTm value is loaded into TAUBnCDRm and an interrupt
(INTTAUBnIm) is generated. The counter stops and retains its value until the
next valid TAUBnTTINm input start edge is detected.
When the next valid TAUBnTTINm input start edge is detected, the counter
restarts to count from the value retained when stopped.
If the counter reaches FFFF
H
, the counter restarts to count from 0000
H
.
Note
TAUBnTTINm input signal is sampled at the frequency of a sampling clock set
by the TAUBnCMORm.TAUBnCKS[1:0] bits.
Conditions
The valid start and stop edges are specified by the
TAUBnCMURm.TAUBnTIS[1:0] bits:
• If TAUBnCMURm.TAUBnTIS[1:0] = 10
B
, the TAUBnTTINm input low period
is measured. The start trigger is a falling edge and the stop trigger is a rising
edge.
• If TAUBnCMURm.TAUBnTIS[1:0] = 11
B
, the TAUBnTTINm input high period
is measured. The start trigger is a rising edge and the stop trigger is a falling
edge.
(2)
Equations
Cumulative TAUBnTTINm input width = count clock cycle × (TAUBnCDRm
capture value + 1)