16 16-BIT AUDIO PWM TIMER (T16P)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
16-11
T16P Compare B Buffer Register (T16P_B)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
T16P Compare
B Buffer
Register
(T16P_B)
0x301202
(16 bits)
D15–0 CMPB[15:0] Compare B data
CMPB15 = MSB
CMPB0 = LSB
0x0 to 0xffff
X
R/W
D[15:0] CMPB[15:0]: Compare B Data Bits
Sets compare B data to be converted to a pulse period. (Default: undefined)
The buffer data is loaded to the compare B register and is compared with the counter value. The output
signal level is inverted when the counter reaches the compare data stored in the compare B register (B
match). When a B match occurs the counter is reset to 0x0 to start the next pulse period. This operation
generates a pulse period according to the compare B data specified.
When the counter reaches the compare data B, the B match interrupt flag (INTBF/T16P_INT register)
is set to 1 and an interrupt occurs if B match interrupts are enabled.
When a B match occurs the number of times (BCNT[3:0] + 1), the compare A and B buffer data are
loaded into the compare A and B registers to start new sampling period.
The pulse period set by compare B data is as follows:
Output pulse period = (CMPB[15:0] + 1)
×
Count clock cycle
Sampling period
=
(CMPB[15:0] + 1)
×
Count clock cycle
×
(BCNT[3:0] + 1)
T16P Counter Data Register (T16P_CNT_DATA)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
T16P Counter
Data Register
(T16P_CNT_
DATA)
0x301204
(16 bits)
D15–0 CNT_DATA
[15:0]
Counter data
CNT_DATA15 = MSB
CNT_DATA0 = LSB
0x0 to 0xffff
X
R/W
D[15:0] CNT_DATA[15:0]: Counter Data Bits
The counter data can be read from this register. (Default: undefined)
Furthermore, data can be set to the counter by writing it to this register.
The counter is reset to 0x0 when a B match occurs or when T16P is reset by setting PRESET/T16P_
CTL register to 1.
T16P Volume Control Register (T16P_VOL_CTL)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
T16P Volume
Control Register
(T16P_VOL_
CTL)
0x301206
(16 bits)
D15–8 –
reserved
–
–
–
0 when being read.
D7
VOLBPS
Volume control enable
1 Disable
0 Enable
1
R/W Effective only for
16-bit data
D6–0 VOLSEL
[6:0]
Volume level select
VOLSEL[6:0]
Volume level 0x40 R/W
0x7f
0x7e
:
0x40
:
0x2
0x1
0x0
×
127/64
×
126/64
:
×
64/64
:
×
2/64
×
1/64
×
0 (mute)
D[15:8] Reserved
D7
VOLBPS: Volume Control Enable Bit
Enables or disables the volume control function.
1 (R/W): Disabled (bypassed) (default)
0 (R/W): Enabled
When VOLBPS is set to 0, the volume control unit multiplies the PCM data stored in the compare A
buffer by the specified volume level set using VOLSEL[6:0] before loading to the compare A register.
If no volume control is required, set VOLBPS to 1.
Note: When 8-bit PCM data is used, the volume control unit should be bypassed by setting VOLBPS
to 1.