322
MC97F60128
ABOV Semiconductor Co., Ltd.
11.17.5 Voice Prompt Play
The FADPCM decoder decodes the encoding data of FADPCM format every sampling frequency. The encoding data
can be read from a serial flash memory through auto-interface function up to 16M-bytes. The decoding data can be
played by the D/A converter. Of cource, the output of D/A converter should be connected to an external power amp.
How to play voice prompt with auto-interface by SPI2 and FADPCM decoder:
1.
Write
“xxxx1010b”/“10xxxxxxb” to P3FSRH/P3FSRL registers for the serial interface pins, repectively. If the
MCU VDD = 5V and the serial flash VCC = 3V, Set the SPI2_3V bit (the P3FSRH.7) to
“1b” for reading 3V
output of the serial flash.
2.
Set the DBDLR register to the value which is used for encoding by FADPCM encoder
3.
Set the DECDR register and the DCLKS[1:0] bits to the value for sampling frequency
4.
Set the PGSR register to
“00000101b” for 0dB gain and clear the DACDRH/L registers to 0x0000
•
To remove a pop noise when a speaker turns on
5.
Write the DACCR register to
“x0111011b”
•
Automatically D/AC data increment/decrement mode
•
Enable to fetch data from FADPCM decoder block
•
FADPCM decoder match signal selection for data update
•
Enable D/A converter and clear the buffer register of D/A converter
6.
Write the DECCR register to
“000011xxb”
•
Disable decoder FIFO empty and match interrupts
•
Disable decoder block and initialize decoder block and enable decoder counting operation
7.
Set the PGSR register to appropriate value for volume after waiting until the DACIFR bit is set to
‘1’
8.
Read voice prompt table data with a serial flash auto-interface
•
Refer to the previous page
9.
Set the DIVS bit to
‘1’ for initialization of the decoder block
10. Set the nCS pin of the serial flash to low level for reading voice prompt play data
11. Set the VPCR register to
“xx101111b” and clear the VPEDIFR bit to ‘0’
•
Transfer SPI2DR to decoder block every interface
•
Voice prompt size register is decreased by
‘1’ every interface
•
Start of voice prompt play by the DECEN bit set to
‘1’
12. Stop auto-interface as the nCS pin of the serial flash set to high level after waiting until the VPTBLIFR bit is
set to
‘1’
13. Hold current voice prompt play by the DECEN bit set to
‘0’
14. Decide the followings
•
Jump to
“the clause h” for the next voice prompt play
•
Go to
“the clause o” to finish voice prompt play
15. Clear the VPCR register to
“0x00” to stop auto-interface
16. Set the PGSR register to
“00000101b” for 0dB gain to remove a pop noise when the speaker turns off
17. Write the DACCR register to
“x0100010b” for D/AC disable
18. Finish voice prompt play by clearing DACCR/DECCR registers to
“0x00” after the DACIFR bit is set to ‘1’
Содержание MC97F60128
Страница 17: ...17 MC97F60128 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 100 pin LQFP 1414 Package...
Страница 18: ...18 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 2 80 Pin LQFP 1212 Package...
Страница 19: ...19 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 3 80 Pin LQFP 1414 Package...
Страница 20: ...20 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 4 64 Pin LQFP 1414 Package...