16 SOUND GENERATOR (SNDA)
16-8
Seiko Epson Corporation
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)
Internal trigger signal
Sound buffer
(SNDDAT register)
Sound register
SNDINTF.SBSY
SNDINTF.EMIF
SNDINTF.EDIF
BZOUT/#BZOUT pin
(Melody waveform output)
Note 1
Note 2
Note 3
Note n-1
Note n
Note n
Note 1
Note 2
Note n-1
Note n-2
Note 1
Note 2
Note n-1
Note n
Note n-2
Writing to the SNDDAT register
Software operation
(When SNDSEL.SINV bit = 0)
Figure 16.4.4.1 Melody Mode Operation Timing Chart
Melody output waveform configuration
Note/rest (duration) specification
Notes and rests can be specified using the SNDDAT.MDRS and SNDDAT.SLEN[5:0] bits.
Table 16.4.4.1 Note/Rest Specification (when f
CLK_SNDA
= 32,768 Hz)
SNDDAT.SLEN[5:0] bits
SNDDAT.MDRS bit
0: Note
1: Rest
0x0f
Half note
Half rest
0x0b
Dotted quarter note
Dotted quarter rest
0x07
Quarter note
Quarter rest
0x05
Dotted eighth note
Dotted eighth rest
0x03
Eighth note
Eighth rest
0x01
Sixteenth note
Sixteenth rest
0x00
Thirty-second note
Thirty-second rest
Other
Setting prohibited
Tie/slur specification
A tie or slur takes effect by setting the SNDDAT.MDTI bit to 1 and the previous note and the current note
are played continuously.
Note
SNDDAT.MDTI
0
0
0
1
Tie
(
0
1
(
Slur
Figure 16.4.4.2 Tie and Slur
Scale specification
Scales can be specified using the SNDDAT.SFRQ[7:0] bits.
Table 16.4.4.2 Scale Specification (when f
CLK_SNDA
= 32,768 Hz)
SNDDAT.SFRQ[7:0] bits
Scale
Frequency [Hz]
0xf8
C3
131.60
0xea
C#3
139.44
0xdd
D3
147.60
0xd1
D#3
156.04
0xc5
E3
165.49
0xba
F3
175.23
0xaf
F#3
186.18
0xa5
G3
197.40
0x9c
G#3
208.71
0x93
A3
221.41
0x8b
A#3
234.06