
116
EPSON
S1C88816 TECHNICAL MANUAL
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Melody Generator)
MCAD0–MCAD7: 00FF46H
Sets the play start address of the melody RAM data
(0–FFH).
The specified value is used as the low-order 8-bit
address for the note and scale RAMs.
Writing 00H specifies address 00D000H of the scale
RAM and address 00D100H of the note RAM.
Writing FFH specifies address 00D0FFH of the scale
RAM and address 00D1FFH of the note RAM.
Since the melody RAM data has no parameter that
specifies the beginning of a melody, any play start
position can be specified using this register.
At initial reset, this register is set to "00H".
MTT0–MTT3: 00FF47HD4–D7
Selects a tempo.
Table 5.13.5.2 Tempo selection
MTT3
1
0
MTT2
1
0
1
0
MTT1
1
0
1
0
1
0
1
0
MTT0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
Tempo
480
240
160 (Vivace)
120 (Allegro)
96
80
(Andantino)
68.6
60
(Adagio)
53.3 (Lento)
48
43.6 (Largo)
40
36.9
34.3
32
30
Division
ratio
1/1
1/2
1/3
1/4
1/5
1/6
1/7
1/8
1/9
1/10
1/11
1/12
1/13
1/14
1/15
1/16
=
The selected tempo will be set to the play control
circuit at the start of play. Therefore, the tempo
cannot be changed in the middle of play. When this
register is changed during play, the selected tempo
will be applied at the start of the next play.
At initial reset, this register is set to "0" (30).
MLEV: 00FF47HD3
Selects a play mode.
When "1" is written: One-shot play mode
When "0" is written: Level-hold play mode
Reading:
Valid
When "1" is written to MLEV, one-shot play mode
is selected. When "0" is written, level-hold play
mode is selected.
At initial reset, this register is set to "0" (level-hold
play mode).
MOSEL: 00FF47HD2
Selects an output signal from the MOUT and
MOUT terminals.
When "1" is written: Melody output
When "0" is written: Buzzer output
Reading:
Valid
When "1" is written to MOSEL, the MOUT and
MOUT terminals are configured as the melody
output only ports. When "0" is written to MOSEL,
the MOUT and MOUT terminals output the buzzer
signal generated by the sound generator.
When the MOSEL is set to "0" during a melody
play, the melody play sequence continues.
At initial reset, this register is set to "0" (buzzer
output).
MBUSY: 00FF47HD1
Indicates a melody play status.
When "1" is written: During play
When "0" is written: Stopped
Reading:
Invalid
MBUSY goes "1" while a melody is playing. The
melody RAM cannot be rewritten in this period.
MBUSY maintains "1" until the last note has
finished even if MTC is set to "0". MBUSY is reset to
"0" when play stops completely
At initial reset, MBUSY is set to "0" (stopped).
MTC: 00FF47HD0
Controls play (melody output).
When "1" is written: Start
When "0" is written: Stop
Reading:
Invalid
In the level-hold play mode, writing "1" to the MTC
register starts playing and writing "0" stops
playing. The melody output continues until MTC is
set to "0" even if the melody is changed while MTC
is "1". (The play sequence returns to the beginning
of the melody if the END bit has been set in the
note RAM.) Accessing across the melody RAM end
address returns the sequence to the melody RAM
start address to continue playing.
In the one-shot play mode, writing "1" to the MTC
register starts playing and the play is stopped at the
end of the melody (when the END bit is set to "1" in
the note RAM). When "0" is written to the MTC
register in the middle of a melody, the play stops
immediately. Note that the END bit stops play but
it does not reset the MTC register to "0". Therefore,
write "0" to MTC after the END bit finishes play.
At initial reset, this register is set to "0" (stop).