Datasheet

Section 13 Timer Connection
Rev. 3.00 Mar 21, 2006 page 329 of 788
REJ09B0300-0300
13.4 Operation
13.4.1 PWM Decoding (PDC Signal Generation)
The timer connection facility and TMR_X can be used to decode a PWM signal in which 0 and 1
are represented by the pulse width. To do this, a signal in which a rising edge is generated at
regular intervals must be selected as the IHI signal.
The timer counter (TCNT) in TMR_X is set to count the internal clock pulses and to be cleared on
the rising edge of the external reset signal (IHI signal). The value to be used as the threshold for
deciding the pulse width is written in TCORB. The PWM decoder contains a delay latch which
uses the IHI signal as data and compare-match signal B (CMB) as a clock, and the state of the IHI
signal (the result of the pulse width decision) at the first compare-match signal B timing after
TCNT is reset by the rise of the IHI signal is output as the PDC signal.
The pulse width setting using TICRR and TICRF of TMR_X can be used to determine the pulse
width decision threshold. Examples of TCR and TCORB settings of TMR_X are shown in tables
13.4 and 13.5, and the PWM decoding timing chart is shown in figure 13.2.
Table 13.4 Examples of TCR Settings
Bit Abbreviation Contents Description
7CMIEB 0
6CMIEA 0
5OVIE 0
Interrupts due to compare-match and overflow
are disabled
4 and 3 CCLR1 and CCLR0 11 TCNT is cleared by the rising edge of the
external reset signal (IHI signal)
2 to 0 CKS2 to CKS0 001 Incremented on internal clock (φ)
Table 13.5 Examples of TCORB (Pulse Width Threshold) Settings
φ
φφ
φ: 10 MHz φ
φφ
φ: 12 MHz φ
φφ
φ: 16 MHz φ
φφ
φ: 20 MHz
H'07 0.8 µs 0.67 µs 0.5 µs 0.4 µs
H'0F 1.6 µs 1.33 µs 1 µs 0.8 µs
H'1F 3.2 µs 2.67 µs 2 µs 1.6 µs
H'3F 6.4 µs 5.33 µs 4 µs 3.2 µs
H'7F 12.8 µs 10.67 µs 8 µs 6.4 µs