16 16-BIT AUDIO PWM TIMER (T16P)
16-4
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Output
clock
generator
High-order bits
PWM_H output
PWM_L output
AH match
Compare A register
Low-order bits
AL match
16-bit up counter
Counter[15:0]
3.3.1 Split Mode
Figure 16.
When normal mode is selected (SPLTMD[1:0] = 0x0), 16-bit PCM (compare A) data is compared with the 16-
bit counter data and the PWM signal generated is output from the PWM_H pin. If PWM_L output function is
enabled, the PWM_L pin is fixed at the initial output level. If this mode and 16-bit PCM data resolution are
selected, compare A interrupts can be generated when the counter reaches the compare A data.
Note: When using T16P as a 16-bit timer, set SPLTMD[1:0] to 0x0 (16 bits normal mode).
When using T16P for audio output, set SPLTMD[1:0] to 0x1 (8 bits + 8 bits), 0x2 (9 bits + 7 bits),
or 0x3 (10 bits + 6 bits) split mode according to the audio sampling rate.
Fine mode
Normally, compare A data is compared with the counter data at the rising edge of the count clock. When T16P
is set to fine mode, the comparisons are performed at both rising and falling edges of the count clock. At this
time the compare A data is halved when compared.
Count clock (PCLK1)
Counter
PWM_H output in normal comparison mode
PWM_H output in fine mode
(Compare A data = 3, Compare B data = 5)
1
2
3
4
5
0
0
1
2
3
4
5
0
1
3.3.2 Fine Mode
Figure 16.
The fine mode improves the precision of the pulse width. Note, however, that the PCLK1/1 clock can only be
used as the count clock in this mode. CLKSEL and CLKDIV[3:0] settings are ineffective.
Set SELFM/T16P_CTL register to 1 to set T16P to fine mode.
The fine mode does not affect the pulse period that is determined with compare B data.
Note: When using A match interrupts while T16P is placed into fine mode, the maximum value of
CMPB[15:0] is limited to 2
15
- 1 (= 32,767) and the CMPA[15:0] programmable range is limited to
0 to (2
×
CMPB[15:0] - 1).
However, there is no such limitation when T16P is used only for generating PWM pulses with A
match interrupt disabled.
PWM Output Condition Settings
16.3.4
Initial output level
The PWM_H and PWM_L output pins go to the initial output level when the pin function is switched for T16P
before starting T16P or when T16P is stopped or reset. Use INITOL/T16P_CTL register to select the initial out-
put level.
When INITOL is 0 (default), the initial output level is low. When INITOL is set to 1, the initial output level is
set to high.
Note: Before the pin function is switched for T16P, be sure to set INITOL and then reset the T16P (set
PRESET to 1).