![Seiko Epson S1C17153 Скачать руководство пользователя страница 90](http://html1.mh-extra.com/html/seiko-epson/s1c17153/s1c17153_technical-manual_1235939090.webp)
11 16-BiT PWM TiMeR (T16a2)
S1C17153 TeChniCal Manual
Seiko epson Corporation
11-11
(Rev. 1.0)
notes
: • Reset the interrupt flag before enabling interrupts with the interrupt enable bit to prevent oc-
currence of unwanted interrupt. The interrupt flag is reset by writing 1.
• After an interrupt occurs, the interrupt flag in the T16A2 module must be reset in the interrupt
handler routine.
Control Register Details
11.8
8.1 List of T16A2 Registers
Table 11.
address
Register name
Function
0x5068
T16A_CLK0
T16A Clock Control Register Ch.0
Controls the T16A2 Ch.0 clock.
0x5400
T16A_CTL0
T16A Counter Ch.0 Control Register
Controls the counter.
0x5402
T16A_TC0
T16A Counter Ch.0 Data Register
Counter data
0x5404
T16A_CCCTL0 T16A Comparator/Capture Ch.0 Control Register
Controls the comparator/capture block and TOUT.
0x5406
T16A_CCA0
T16A Compare/Capture Ch.0 A Data Register
Compare A/capture A data
0x5408
T16A_CCB0
T16A Compare/Capture Ch.0 B Data Register
Compare B/capture B data
0x540a
T16A_IEN0
T16A Compare/Capture Ch.0 Interrupt Enable Register Enables/disables interrupts.
0x540c
T16A_IFLG0
T16A Compare/Capture Ch.0 Interrupt Flag Register
Displays/sets interrupt occurrence status.
The T16A2 registers are described in detail below.
note
: When data is written to the registers, the “Reserved” bits must always be written as 0 and not 1.
T16a Clock Control Register Ch.
x
(T16a_ClK
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T16a Clock
Control Register
Ch.
x
(T16a_ClK
x
)
0x5068
(8 bits)
D7–4
T16aClKD
[3:0]
Clock division ratio select
T16ACLKD
[3:0]
Division ratio
0x0 R/W
OSC3B OSC1A
0xf
0xe
0xd
0xc
0xb
0xa
0x9
0x8
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
–
1/16384
1/8192
1/4096
1/2048
1/1024
1/512
1/256
1/128
1/64
1/32
1/16
1/8
1/4
1/2
1/1
–
–
–
–
–
–
–
1/256
1/128
1/64
1/32
1/16
1/8
1/4
1/2
1/1
D3–2
T16aClK
SRC[1:0]
Clock source select
T16ACLKSRC
[1:0]
Clock source
0x0 R/W
0x3
0x2
0x1
0x0
External clock
reserved
OSC1A
OSC3B
D1
–
reserved
–
–
–
0 when being read.
D0
T16aClKe
Count clock enable
1 Enable
0 Disable
0
R/W
D[7:4]
T16aClKD[3:0]: Clock Division Ratio Select Bits
Selects the division ratio for generating the count clock when an internal clock (OSC3B or OSC1A) is
used.