12 16-BiT PWM TiMeR (T16e)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
12-7
Control Register Details
12.9
9.1 List of T16E Registers
Table 12.
address
Register name
Function
0x5300
T16E_CA0
T16E Ch.0 Compare Data A Register
Sets compare data A.
0x5302
T16E_CB0
T16E Ch.0 Compare Data B Register
Sets compare data B.
0x5304
T16E_TC0
T16E Ch.0 Counter Data Register
Counter data
0x5306
T16E_CTL0
T16E Ch.0 Control Register
Sets the timer mode and starts/stops the timer.
0x5308
T16E_DF0
T16E Ch.0 Clock Division Ratio Select Register
Selects the count clock.
0x530a
T16E_IMSK0 T16E Ch.0 Interrupt Mask Register
Sets the interrupt mask.
0x530c
T16E_IFLG0
T16E Ch.0 Interrupt Flag Register
Indicates and reset interrupt occurrence status.
The T16E registers are described in detail below. These are 16-bit registers.
note: When data is written to the registers, the “Reserved” bits must always be written as 0 and not 1.
T16e Ch.
x
Compare Data a Register (T16e_Ca
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16e Ch.
x
Compare Data
a Register
(T16e_Ca
x
)
0x5300
(16 bits)
D15–0 Ca[15:0]
Compare data A
CA15 = MSB
CA0 = LSB
0x0 to 0xffff
0x0 R/W
D[15:0] Ca[15:0]: Compare Data a
Sets compare data A. (Default: 0x0)
When CBUFEN/T16E_CTL
x
register is set to 0, this register can be used to directly read from or di-
rectly write to the compare data A register.
When CBUFEN is set to 1, data is read from and written to these registers via the compare data A buf-
fer. The buffer contents are loaded into the compare data A register when the counter is reset.
The data set is compared against the counter data, and a cause of compare A interrupt is generated if
the contents match. The timer output waveform changes at the same time (rises when INVOUT/T16E_
CTL
x
register = 0 or falls when INVOUT = 1). These processes do not affect the counter data or count
operations.
T16e Ch.
x
Compare Data B Register (T16e_CB
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16e Ch.
x
Compare Data
B Register
(T16e_CB
x
)
0x5302
(16 bits)
D15–0 CB[15:0]
Compare data B
CB15 = MSB
CB0 = LSB
0x0 to 0xffff
0x0 R/W
D[15:0] CB[15:0]: Compare Data B
Sets compare data B. (Default: 0x0)
When CBUFEN/T16E_CTL
x
register is set to 0, this register can be used to directly read from or di-
rectly write to the compare data B register.
When CBUFEN is set to 1, data is read from and written to these registers via the compare data B buf-
fer. The buffer contents are loaded into the compare data B register when the counter is reset.
The data set is compared against the counter data, and a cause of compare B interrupt is generated if
the contents match. The timer output waveform changes at the same time (falls when INVOUT/T16E_
CTL
x
register = 0 or rises when INVOUT = 1) and the counter is reset.
T16e Ch.
x
Counter Data Register (T16e_TC
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16e Ch.
x
Counter Data
Register
(T16e_TC
x
)
0x5304
(16 bits)
D15–0 TC[15:0]
Counter data
TC15 = MSB
TC0 = LSB
0x0 to 0xffff
0x0 R/W
D[15:0] TC[15:0]: Counter Data
Counter data can be read out. (Default: 0x0)
The counter value can also be set by writing data to this register.