
iVPeRiPheRaLMoDuLes2(tiMeRs):16-bittiMeRs(t16)
iV-1-12
ePson
s1C33L17teChniCaLManuaL
settingclockoutputfinemode
By default (after an initial reset), the clock output signal changes at the rising edge of the input clock when
CRxA[15:0] (D[15:0]/0x300780 + 8x) becomes equal to TCx[15:0] (D[15:0]/0x300784 + 8x).
tCx[15:0]:16-bitTimerxCounterDataBitsinthe16-bitTimerxCounterDataRegister(D[15:0]/0x300784+8x)
In fine mode, the output signal changes according to CRxA0 (D0/0x300780 + 8x) when CRxA[15:1] (D[15:1]/
0x300780 + 8x) becomes equal to TCx[14:0] (D[14:0]/0x300784 + 8x).
When CRxA0 is 0, the output signal changes at the rising edge of the input clock.
When CRxA0 is 1, the output signal changes at the falling edge of the MCLK, a half mclk cycle from the
default setting.
mclk
Inputclock(mclk/4)
CounterValue
CRxA
CRxB
ComparisonmatchAsignal
ComparisonmatchBsignal
TMxoutput(OUTINVx=0)
TMxoutput(OUTINVx=1)
1
2
3
4
5
0
1
2
3
4
5
0
2
5
FigureIV.1.6.3ClockOutputinFineMode
As shown in the figure above, in fine mode the output clock duty ratio can be adjusted in the half cycle of the
MCLK. However, when CRxA[15:0] value is 0, the timer outputs a pulse with a 1-cycle width as the input
clock, the same as the default setting.
In fine mode, the maximum value of CRxB[15:0] is 215 - 1 = 32,767 and the range of CRxA[15:0] that can be
set is 0 to (2
× CRxB[15:0] - 1).
The fine mode is set using SELFMx (D6/0x300786 + 8x).
seLFMx:16-bitTimerxFineModeSelectBitinthe16-bitTimerxControlRegister(D6/0x300786+8x)
When 1 is written to SELFMx (D6/0x300786 + 8x), fine mode is set. At initial reset, the fine mode is disabled.
Precautions
(1) If a same value is set to the comparison data A and B registers, a hazard may be generated in the output
signal. Therefore, do not set the comparison registers as A = B.
There is no problem when the interrupt function only is used.
(2) When using the output clock, set the comparison data registers as A
≥ 0 and B ≥ 1. The minimum settings
are A = 0 and B = 1. In this case, the timer output clock cycle is the input clock
× 1/2.
(3) When the comparison data registers are set as A
> B, no comparison A signal is generated. In this case, the
output signal is fixed at the off level.