FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
17
Copyright © Bridgetek Limited
1.
Drive the PD_N pin high
2.
Wait for at least 20ms
3.
Execute ”Initialization Sequence during the Boot UP” from steps 1 to 9
Initialization Sequence from Sleep Mode:
1.
Send Host command “ACTIVE” to enable clock to FT800
2.
Wait for at least 20ms
3.
Execute “Initialization Sequence during Boot Up” from steps 5 to 8
Initialization sequence from standby mode:
Execute all the steps mentioned in “Initialization Sequence from Sleep Mode”
except waiting for at least 20ms in step 2.
Note: Refer to FT800 data sheet for information on power modes. Follow section 2.3 for
audio management during power down and reset operations.
2.3
Sound Synthesizer
Sample code to play C8 on the xylophone:
wr8
(
REG_VOL_SOUND
,
0xFF
);
//set the volume to maximum
wr16
(
REG_SOUND
,
(
0x6C
<<
8
)
|
0x41
);
// C8 MIDI note on xylophone
wr8
(
REG_PLAY
,
1
);
// play the sound
Code snippet 2 sound synthesizer play C8 on the xylophone
Sample code to check the status of sound play:
Sound_status
=
rd8
(
REG_PLAY
);
//1-play is going on, 0-play has finished
Code snippet 3 sound synthesizer check the status of sound playing
Sample code to stop sound play:
wr16
(
REG_SOUND
,
0x0
);
//configure silence as sound to be played
wr8
(
REG_PLAY
,
1
);
//play sound
Sound_status
=
rd8
(
REG_PLAY
);
//1-play is going on, 0-play has finished
Code snippet 4 sound synthesizer stop playing sound
To avoid an audio pop sound on reset or power state change, trigger a "mute" sound,
and wait for it to complete (completion of sound play is when REG_PLAY contains a value
of 0). This sets the output value to 0 level. On reboot, the audio engine plays back the
"unmute" sound to drive the output to the half way level.
Note: Refer to FT800 data sheet for more information on sound synthesizer and audio
playback.