
iVPeRiPheRaLMoDuLes2(tiMeRs):16-bittiMeRs(t16)
s1C33L17teChniCaLManuaL
ePson
iV-1-1
IV
T16
IV.1 16-Bit Timers (T16)
iV.1.1Configurationof16-bittimer
The S1C33L17 contains 4 systems of 16-bit programmable timers (timers 0 to 3). The following lists the main
functions of the 16-bit timers.
Programmable count clocks using the prescaler embedded in each 16-bit timer
Event counter function using external clocks
Interrupt generation function with programmable interrupt cycles using the compare data registers
PWM output using the compare data registers
Supports fine mode and DA16 mode suitable for high-quality audio output using PWM
note: Onthefollowingpages,eachtimerisidentifiedastimerx(x=0to3).Thefunctionsandcontrol
registerstructuresof16-bittimers0to3arethesame.Controlbitnamesareassignednumerals
‘0’to‘3’denotingtimernumbers.Sinceexplanationsarecommontoalltimers,timernumbersare
representedby‘x’unlessitisnecessarytospecifyatimernumber.
Figure IV.1.1.1 shows the structure of one channel of the 16-bit timer.
Databus
16-bitupcounter(TCx)
16-bitcomparisondataregisterB(CRxB)
ComparisonregisterBbuffer(CRBxB)
16-bitcomparisondataregisterA(CRxA)
ComparisonregisterAbuffer(CRBxA)
Timerxcontrolregister
Controlcircuit
Clockselectcircuit
Prescaler
CMU
Comparator
INCLx
Clockoutput
TMx
ComparisonA
interrupt
ComparisonB
interrupt
Comparison
matchB
Comparison
matchA
ComparisonA
ComparisonB
Timerx
Interrupt
controller
Externalclock
EXCLx
FigureIV.1.1.1Structureof16-bitTimer
In each timer, a 16-bit up-counter (TCx[15:0] (D[15:0]/0x300784 + 8x)), as well as two 16-bit comparison data
registers (CRxA[15:0] (D[15:0]/0x300780 + 8x), CRxB[15:0] (D[15:0]/0x300782 + 8x)) and their buffers (CRBxA,
CRBxB), are provided.
tCx[15:0]:16-bitTimerxCounterDataBitsinthe16-bitTimerxCounterDataRegister(D[15:0]/0x300784+8x)
CRxa[15:0]:16-bitTimerxComparisonDataABitsinthe16-bitTimerxComparisonDataASetupRegister
(D[15:0]/0x300780+8x)
CRxb[15:0]:16-bitTimerxComparisonDataBBitsinthe16-bitTimerxComparisonDataBSetupRegister
(D[15:0]/0x300782+8x)
The 16-bit counter can be reset to 0 by software and counts up using the prescaler output clock or an external signal
input from the I/O port. The counter value can be read by software.