欢迎来到天天文库
浏览记录
ID:47355949
大小:47.00 KB
页数:10页
时间:2019-08-06
《基于stm32的语音模块isd1760程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Isd.h文件/**************本函数为语音播放模块。用到函数名是PLAY_NUM(u8i);其中i即为想要播放的那一段。注意:初始化时,要初始化两个函数:ISD1760_config();ISD_Init();另外,在函数PLAY_NUM(u8i);里面,要根据具体录制修改i的值。用到的端口:PE0(接语音芯片4脚)PE1(接语音芯片5脚)PE2(接语音芯片6脚)PE3(接语音芯片7脚)***************************************************************/#
2、ifndef__ISD1760_H__#define__ISD1760_H__#include"stm32f10x_gpio.h"externuint8_tSR0_L;externuint8_tSR0_H;externuint8_tSR1;externuint8_tID;externuint8_tAPCL;externuint8_tAPCH;#defineRCC_GPIO_ISD1760RCC_APB2Periph_GPIOE#defineMISOGPIO_Pin_0//CPU(IN)#defineMOSIGPIO_Pin_1/
3、/ISD1760(OUT)#defineSCLKGPIO_Pin_2#definenSSGPIO_Pin_3//语音管脚定义//????SS????,SCLK????,MOSI????#defineSCLK_1GPIO_SetBits(GPIO_ISD1760,SCLK)#defineSCLK_0GPIO_ResetBits(GPIO_ISD1760,SCLK)#definenSS_1GPIO_SetBits(GPIO_ISD1760,nSS)#definenSS_0GPIO_ResetBits(GPIO_ISD1760,nSS
4、)#defineMOSI_1GPIO_SetBits(GPIO_ISD1760,MOSI)#defineMOSI_0GPIO_ResetBits(GPIO_ISD1760,MOSI)//?????#definePU0x01//Powerup????#defineSTOP0x02//??????#defineRESET0x03//??#defineCLI_INT0x04//?????EOM?#defineRD_STATUS0x05//???????????#defineRD_PLAY_PTR0x06//??????????????
5、??#definePD0x07//Powerdown??#defineRD_REC_PTR0x08//????????????????#defineDEVID0x09//????ID#definePLAY0x40//??????#defineREC0x41//?????????#defineERASE0x42//??????#defineG_ERASE0x43//???????????#defineRD_APC0x44//????????????APC???;APC--?????????#defineWR_APC10x45//?
6、?????APC1???,??VOL?????#defineWR_APC20x65//??????APC2???,???????#defineWR_NVCFG0x46//?APC?????NVCFG;???????#defineLD_NVCFG0x47//?NVCFG?????APC#defineFWD0x48//???#defineCHK_MEM0x49//???????????#defineEXTCLK0x4A//????????#defineSET_PLAY0x80//?7、0:S0>????,???EOM#defineSET_REC0x81//?????,??#defineSET_ERASE0x82//??????#defineNOP_nop_()voiddelayus(void);//15us???voidDelay(uint16_tz);//??:??MS????,Z????MS?uint8_tSPISendData(uint8_tBUF_ISD);//??:SPI????(????)???voidRdStatus8、(void);//??:????voidClrInt(void);//??:????voidISD_WR_NVCFG(void);//??:???????voidISD_WR_APC2(void);//??:??APC2voidRdAPC(void);//??:
7、0:S0>????,???EOM#defineSET_REC0x81//?????,??#defineSET_ERASE0x82//??????#defineNOP_nop_()voiddelayus(void);//15us???voidDelay(uint16_tz);//??:??MS????,Z????MS?uint8_tSPISendData(uint8_tBUF_ISD);//??:SPI????(????)???voidRdStatus
8、(void);//??:????voidClrInt(void);//??:????voidISD_WR_NVCFG(void);//??:???????voidISD_WR_APC2(void);//??:??APC2voidRdAPC(void);//??:
此文档下载收益归作者所有