管腿,变量等其他.H程序
sbit sbnISD_SS = P1^0; // ISD1760的slave select
sbit sbISD_SCLK = P1^1; // ISD1760的SPI接口时钟
sbit sbISD_MOSI = P1^2; // ISD1760的SPI接口数据输入端口
sbit sbISD_MISO = P1^3; // ISD1760的SPI接口的串行输出
sbit sbnINT_1760 = P3^2; // ISD1760的INT管脚//未使用//外部中断可用此脚
sbit sbSRT_1760 = P3^3; // ISD1760的RESET管脚//未使用
// ----- ISD1760 SPI命令 -----
#define CMD_1760_PU 0x01 //上电
#define CMD_1760_STOP 0x02
#define CMD_1760_RESET 0x03 //复位
#define CMD_1760_CLI_INT 0x04 //清中断
#define CMD_1760_RD_STATUS 0x05 //读状态
#define CMD_1760_RD_PLAY_PTR 0x06
#define CMD_1760_PD 0x07 //掉电
#define CMD_1760_RD_REC_PTR 0x08
#define CMD_1760_RD_DEVID 0x09 //读取芯片ID
#define CMD_1760_G_ERASE 0x43
#define CMD_1760_RD_APC 0x44 //读APC
#define CMD_1760_WR_APC1 0x45
#define CMD_1760_WR_APC2 0x65 //SPI模式下写APC寄存器
#define CMD_1760_WR_NVCFG 0x46 //永久写入寄存器
#define CMD_1760_CHK_MEM 0x49 //检查环状存储器
#define CMD_1760_SET_PLAY 0x80 //设置播放
#define CMD_1760_SET_REC 0x81
#define CMD_1760_SET_ERASE 0x82
unsigned char bdata SR0_L;
sbit bINT_1760 =SR0_L^4;
sbit bEOM =SR0_L^3;
sbit bPU_1760 =SR0_L^2;
sbit bFULL =SR0_L^1;
sbit bCMD_ERR =SR0_L^0;
unsigned char bdata SR0_H;
unsigned char bdata SR1;
sbit bREC_1760 =SR1^3;
sbit bPLAY_1760 =SR1^2;
sbit bERASE_1760 =SR1^1;
sbit bRDY =SR1^0;
unsigned char ID,APCL=0,APCH=0;
WORD code aSpeech_Addr[90]
={0x0010,0x0013,0x0014,0x0017,0x0018,0x 001C,0x001D,0x0020,0x0021,0x0024,0x0025,0x0028,0x0029,0x002D,0x002E,0x0032,0x0033,0x0037,0x0038,0x003C,0x003D,0x0042,0x0043,0x0047,0x0048,0x004C,0x004D,0x0051,0x0052,0x0059,0x005A,0x0061,0x0062,0x0069,0x006A,0x0071,0x0072,0x0079,0x007A,0x0081,0x0082,0x008A,0x008B,0x0092,0x0093,0x009A,0x009B,0x00A0,0x00A1,0x00A7,0x00A8,0x00AE,0x00AF,0x00B8,0x00B9,0x00C2,0x00C3,0x00CB,0x00CC,0x00D1,0x00D2,0x00DA,0x00DB,0x00E0,0x00E1,0x00EA,0x00EB,0x00F5,0x00F6,0x00FE,0x00FF,0x0104,0x0105,0x0117,0x0118,0x0127,0x0128,0x0133,0x0134,0x0140,0x0141,0x0147,0x0148,0x0154,0x0155,0x0158,0x0159,0x016E,0x016F,0x0170};
void DelayX1ms(WORD count);
//ISD1760
BYTE ISD_SendByte(BYTE BUF_ISD);
void ISD_Reset(void);
void ISD_PU(void);
void ISD_Rd_Status(void);
void ISD_ClrInt(void);
void ISD_CHK_MEM(void);
void ISD_WR_APC2(BYTE voiceValue);
void ISD_WR_NVCFG(void);
void ISD_RDAPC(void);
void ISD_PD(void);
BYTE ISD_RDDevID(void);
void ISD_Init(void);
void ISD_GetToneAdd(BYTE cNum, WORD * ipStartAdd, WORD * ipEndAdd);
// 取出当前语音的首末地址
void ISD_SetPLAY(BYTE cNum);
用户405041 2009-6-10 16:25
用户187311 2009-5-25 22:26