16 SOUND GENERATOR (SNDA)
16-12
Seiko Epson Corporation
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)
Bit 14
MDRS
This bit selects the output type in melody mode from a note or a rest .
1 (R/W): Rest
0 (R/W): Note
When a rest is selected, the BZOUT pin goes low and the #BZOUT pin goes high during the output
duration. This bit is ignored in normal buzzer mode/one-shot buzzer mode.
Bits 13–8 SLEN[5:0]
These bits select a duration (when melody mode is selected) or a buzzer signal duty ratio (when nor-
mal buzzer mode/one-shot buzzer mode is selected).
Bits 7–0
SFRQ[7:0]
These bits select a scale (when melody mode is selected) or a buzzer signal frequency (when normal
buzzer mode/one-shot buzzer mode is selected).
Notes: • In normal buzzer mode/one-shot buzzer mode, only the low-order 6 bits (SNDDAT.SFRQ[5:0]
bits) are effective within the SNDDAT.SFRQ[7:0] bits. Always set the SNDDAT.SFRQ[7:6] bits
to 0x0.
• The SNDDAT register allows 16-bit data writing only. Data writings in 8-bit size will be ig-
nored.
SNDA Interrupt Flag Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
SNDINTF
15–9 –
0x00
–
R
–
8
SBSY
0
H0
R
7–2 –
0x00
–
R
1
EMIF
1
H0
R
Cleared by writing to the SNDDAT
register.
0
EDIF
0
H0
R/W Cleared by writing 1 or writing to the
SNDDAT register.
Bits 15–9 Reserved
Bit 8
SBSY
This bit indicates the sound output status. (See Figures 16.4.2.1, 16.4.3.1, and 16.4.4.1.)
1 (R):
Outputting
0 (R):
Idle
Bits 7–2
Reserved
Bit 1
EMIF
Bit 0
EDIF
These bits indicate the SNDA interrupt cause occurrence status.
1 (R):
Cause of interrupt occurred
0 (R):
No cause of interrupt occurred
1 (W):
Clear flag
0 (W):
Ineffective
The following shows the correspondence between the bit and interrupt:
SNDINTF.EMIF bit: Sound buffer empty interrupt
SNDINTF.EDIF bit: Sound output completion interrupt