
III PERIPHERAL BLOCK: 16-BIT PROGRAMMABLE TIMERS
B-III-4-8
EPSON
S1C33T01 FUNCTION PART
Starting clock output
To output the TMx clock, write "1" to the clock output control bit PTMx. Clock output is stopped by writing
"0" to PTMx and goes to the off level according to the OUTINVx setting (low when OUTINVx = "0" or high
when OUTINVx = "1").
Timer 0 clock output control: PTM0 (D2) / 16-bit timer 0 control register (0x48186)
Timer 1 clock output control: PTM1 (D2) / 16-bit timer 1 control register (0x4818E)
Timer 2 clock output control: PTM2 (D2) / 16-bit timer 2 control register (0x48196)
Timer 3 clock output control: PTM3 (D2) / 16-bit timer 3 control register (0x4819E)
Timer 4 clock output control: PTM4 (D2) / 16-bit timer 4 control register (0x481A6)
Timer 5 clock output control: PTM5 (D2) / 16-bit timer 5 control register (0x481AE)
Timer 6 clock output control: PTM6 (D2) / 16-bit timer 6 control register (0x481B6)
Timer 7 clock output control: PTM7 (D2) / 16-bit timer 7 control register (0x481BE)
Timer 8 clock output control: PTM8 (D2) / 16-bit timer 8 control register (0x481C6)
Timer 9 clock output control: PTM9 (D2) / 16-bit timer 9 control register (0x481CE)
Figure 4.3 shows the waveform of the output signal.
Input clock
PRUNx
CRxA
CRxB
Counter value
Comparison match A signal
Comparison match B signal
PTMx
TMx output (when OUTINVx = "0")
TMx output (when OUTINVx = "1")
3
5
0
1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1
Figure 4.3
Waveform of 16-Bit Programmable Timer Output
When OUTINVx = "0" (active high):
The timer outputs a low level until the counter becomes equal to the comparison data A set in the CRxA
register. When the counter is incremented to the next value from the comparison data A, the output pin goes
high and a comparison A interrupt occurs. When the counter becomes equal to the comparison data B set in the
CRxB register, the counter is reset and the output pin goes low. At the same time a comparison B interrupt
occurs.
When OUTINVx = "1" (active low):
The timer outputs a high level until the counter becomes equal to the comparison data A set in the CRxA
register. When the counter is incremented to the next value from the comparison data A, the output pin goes
low and a comparison A interrupt occurs. When the counter becomes equal to the comparison data B set in the
CRxB register, the counter is reset and the output pin goes high. At the same time a comparison B interrupt
occurs.
Setting clock output fine mode
By default (after an initial reset), the clock output signal changes at the rising edge of the input clock when
CRxA[15:0] becomes equal to TCx[15:0].
In fine mode, the output signal changes according to CRxA[0] when CRxA[15:1] becomes equal to TCx[14:0].
When CRxA[0] is "0", the output signal changes at the rising edge of the input clock.
When CRxA[0] is "1", the output signal changes at the falling edge of the input clock a half cycle from the
default setting.
Example) CRxA = 3, CRxB = 5