Epson Arm S1C31 Series Technical Manual page 315

Cmos 32-bit single chip microcontroller
Table of Contents

Advertisement

22 HW Processor (HWP) and Sound Output (SDAC2)
3. Configure the following sound play register bits:
- Set the COMMAND_n.COMMAND[7:0] bits to 0x01.
- Set the COMMAND_n.OPTION[7:0] bits.
- SENTENCE_n.SENTENCE_NO[15:0] bits
- VOLUME_n.VOLUME[15:0] bits
- REPEAT_n.REPEAT[15:0] bits
- SPEED_0.SPEED[15:0] bits
- PITCH_0.PITCH[15:0] bits
4. Write 1 to the HWPCMDTRG.HWP0TRG bit.
5. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
The HWP starts sound data output of the specified sentence number from this point.
6. Confirm that the STATE_n.STATE[15:0] bits = 0x0002 (sp_state_play) as necessary.
7. Write 0 to the HWPINTF.HWP0IF bit.
:
Playback is in progress.
:
8. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
9. Confirm that the STATE_n.STATE[15:0] bits = 0x0001 (sp_state_idle) as necessary.
When the sound data ends, playback output is automatically terminated and the Sound Play function tran-
sits to sp_state_idle state.
Note: The volume level can be adjusted by rewriting the VOLUME_n.VOLUME[15:0] bits even while
playback is in progress. The playback speed and pitch cannot be changed while playback is in
progress.
2-channel mix output start procedure
The HWP can output sound by mixing two channels, for instance, Ch.0 is used for voice and Ch.1 is used
for BGM. To do this, the channels should be controlled continuously to start playback as shown below.
Ch.1 (BGM) output start procedure
1. Confirm that the STATE_1.STATE[15:0] bits = 0x0001 (sp_state_idle).
2. Confirm that the STATUS.READY bit = 1.
3. Configure the following sound play register bits:
- Set the COMMAND_1.COMMAND[7:0] bits to 0x01.
- SENTENCE_1.SENTENCE_NO[15:0] bits
- VOLUME_1.VOLUME[15:0] bits
- REPEAT_1.REPEAT[15:0] bits
4. Write 1 to the HWPCMDTRG.HWP0TRG bit.
5. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
The HWP starts BGM data output of the specified sentence number from this point.
6. Confirm that the STATE_1.STATE[15:0] bits = 0x0002 (sp_state_play) as necessary.
7. Write 0 to the HWPINTF.HWP0IF bit.
Ch.0 (voice) output start procedure
8. Confirm that the STATE_0.STATE[15:0] bits = 0x0001 (sp_state_idle).
9. Confirm that the STATUS.READY bit = 1.
10. Configure the following sound play register bits:
- Set the COMMAND_0.COMMAND[7:0] bits to 0x01.
- SENTENCE_0.SENTENCE_NO[15:0] bits
- VOLUME_0.VOLUME[15:0] bits
- REPEAT_0.REPEAT[15:0] bits
- SPEED_0.SPEED[15:0] bits
- PITCH_0.PITCH[15:0] bits
22-8
Seiko Epson Corporation
(Select Sound Start command)
(Select gapless play option)
(Specify sentence number)
(Specify volume level)
(Specify repeat count)
(Specify playback speed, Ch.0 only)
(Specify playback pitch, Ch.0 only)
(Trigger to issue command)
(Occurrence of state transition)
(Clear interrupt flag)
(Occurrence of state transition)
(Command acceptable)
(Select Sound Start command)
(Specify sentence number)
(Specify volume level)
(Specify repeat count)
(Trigger to issue command)
(Occurrence of state transition)
(Clear interrupt flag)
(Command acceptable)
(Select Sound Start command)
(Specify sentence number)
(Specify volume level)
(Specify repeat count)
(Specify playback speed)
(Specify playback pitch)
S1C31D41 TECHNICAL MANUAL
(Rev. 1.1)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Arm s1c31d41

Table of Contents