13 16-BiT PWM TiMeRS (T16a2)
13-18
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
T16a Comparator/Capture Ch.
x
a Data Registers (T16a_CCa
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16a
Comparator/
Capture Ch.
x
a
Data Register
(T16a_CCa
x
)
0x5406
0x5426
(16 bits)
D15–0 CCa[15:0] Compare/capture A data
CCA15 = MSB
CCA0 = LSB
0x0 to 0xffff
0x0 R/W
D[15:0] CCa[15:0]: Compare/Capture a Data Bits
In comparator mode (CCAMD/ T16A_CCCTL
x
register = 0)
Sets a compare A data, which will be compared with the counter value, through this register.
The counter value comparison timing varies according to the CBUFEN/T16A_CTL
x
register value. For
more information, see “Comparator mode (CCAMD/CCBMD = 0, default)” in Section 13.4.1.
note: After the T16A_CCA
x
register has been set, wait for one or more T16A2 count clock cycles
and then run the counter.
In capture mode (CCAMD = 1)
When the counter value is captured at the external trigger signal (CAPA
x
) edge selected using
CAPATRG[1:0]/T16A_CCCTL
x
register, the captured value is loaded to this register. At the same time
a capture A interrupt can be generated, thus the captured counter value can be read out in the interrupt
handler.
T16a Comparator/Capture Ch.
x
B Data Registers (T16a_CCB
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16a
Comparator/
Capture Ch.
x
B
Data Register
(T16a_CCB
x
)
0x5408
0x5428
(16 bits)
D15–0 CCB[15:0] Compare/capture B data
CCB15 = MSB
CCB0 = LSB
0x0 to 0xffff
0x0 R/W
D[15:0] CCB[15:0]: Compare/Capture B Data Bits
In comparator mode (CCBMD/ T16A_CCCTL
x
register = 0)
Sets a compare B data, which will be compared with the counter value, through this register.
The counter value comparison timing varies according to the CBUFEN/T16A_CTL
x
register value. For
more information, see “Comparator mode (CCAMD/CCBMD = 0, default)” in Section 13.4.1.
note: After the T16A_CCB
x
register has been set, wait for one or more T16A2 count clock cycles
and then run the counter.
In capture mode (CCBMD = 1)
When the counter value is captured at the external trigger signal (CAPB
x
) edge selected using CAPB-
TRG[1:0]/T16A_CCCTL
x
register, the captured value is loaded to this register. At the same time a
capture B interrupt can be generated, thus the captured counter value can be read out in the interrupt
handler.
T16a Comparator/Capture Ch.
x
interrupt enable Registers (T16a_ien
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16a
Comparator/
Capture Ch.
x
interrupt enable
Register
(T16a_ien
x
)
0x540a
0x542a
(16 bits)
D15–6 –
reserved
–
–
–
0 when being read.
D5
CaPBOWie Capture B overwrite interrupt enable 1 Enable
0 Disable
0
R/W
D4
CaPaOWie Capture A overwrite interrupt enable 1 Enable
0 Disable
0
R/W
D3
CaPBie
Capture B interrupt enable
1 Enable
0 Disable
0
R/W
D2
CaPaie
Capture A interrupt enable
1 Enable
0 Disable
0
R/W
D1
CBie
Compare B interrupt enable
1 Enable
0 Disable
0
R/W
D0
Caie
Compare A interrupt enable
1 Enable
0 Disable
0
R/W
D[15:6] Reserved