spi_send(adh); //發(fā)送錄音起始地址高位
SS=1;
}
void isd_rec(void)
{
spi_send(0xb0);
SS=1; //該芯片有效
}
void isd_setplay(unsigned char adl,unsigned char adh)
{
spi_send(adl); //發(fā)送放音起始地址低位
adh=adh|0xe0;
spi_send(adh); //發(fā)送放音起始地址高位
SS=1;
}
void isd_play(void)
{
spi_send(0xf0);
SS=1;
}
void isdplay(void)
{
isd_pu();
isd_pu();
isd_pu();
ys=0;
if(results[0]==48) ys=1;
if(results[0]==48&&results[1]==48) ys=2;
for(;ys<7;ys++)
{
if(ys==0)
{
results[ys]-=48;
adress=results[ys];
isd_setplay(pp[adress],0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
isd_setplay(pp[11],0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
continue;
}
if(ys==1&&results[ys]==48&&results[2]==48) continue;
if(ys==1)
{
results[ys]-=48;
adress=results[ys]*10;
isd_setplay(adress,0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
if(results[1]!=0)
{
isd_setplay(pp[10],0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
}
continue;
}
if(ys==2&&results[ys]==48) continue;
if(ys==3)
{
isd_setplay(pp[13],0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
continue;
}





