
R01UH0336EJ0102 Rev.1.02
Page 478 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.14.5
TAUBnTTINm Input Signal Width Judgment Function
(1)
Overview
Summary
This function outputs the result of a comparison between the count value
(TAUBnCNTm) and the value in the channel data register (TAUBnCDRm)
when a valid stop edge of a TAUBnTTINm input signal is detected. An interrupt
signal INTTAUBnIm is generated if the result of the comparison is true.
Prerequisites
• The operating mode should be set to judge and one-count mode. (See Table
13-45, TAUBnCMORm Settings for TAUBnTTINm Input Signal Width
Judgment Function.)
• TAUBnTTOUTm is not used with this function.
Description
The counter is started by setting the channel trigger bit
(TAUBnTS.TAUBnTSm) to 1. This in turn sets TAUBnTE.TAUBnTEm = 1,
enabling count operation. When a valid TAUBnTTINm input start edge is
detected, the current value of TAUBnCDRm is loaded into TAUBnCNTm and
the counter starts to count down from this value.
When a TAUBnTTINm valid stop edge is detected, the function compares the
current values of TAUBnCNTm and TAUBnCDRm. An interrupt signal
INTTAUBnIm is generated if the result of the comparison is true. The counter
TAUBnCNTm retains its value until the next valid TAUBnTTINm start edge is
detected, regardless of the result of the comparison.
If the counter reaches 0000
H
before a valid TAUBnTTINm stop edge is
detected, TAUBnCNTm underflows and is set to FFFF
H
. The counter then
continues to count down.
The value of TAUBnCDRm can be rewritten at any time, and the changed
value of TAUBnCDRm is applied the next time the counter starts to count
down.
Conditions
• The TAUBnCMORm.TAUBnMD0 bit specifies the type of comparison:
– If TAUBnCMORm.TAUBnMD0 = 0, INTTAUBnIm is generated when
TAUBnCNTm
TAUBnCDRm.
– If TAUBnCMORm.TAUBnMD0 = 1, INTTAUBnIm is generated when
TAUBnCNTm > TAUBnCDRm.
• The TAUBnCMURm.TAUBnTIS[1:0] bits specify a type of width
measurement:
– For high width measurement (TAUBnCMURm.TAUBnTIS[1:0] = 11
B
),
TAUBnTTINm rising edge is used as a start edge and TAUBnTTINm
falling edge as a stop edge.
– For low width measurement (TAUBnCMURm.TAUBnTIS[1:0] = 10
B
),
TAUBnTTINm falling edge is used as a start edge and TAUBnTTINm
rising edge as a stop edge.
• This function cannot make a forced restart.