isd_play();
while(ISD_INT==1);
isd_stop();
}
else
{
isd_setplay(pp[21],0x00);
isd_play();
while(ISD_INT==1);
isd_stop();
}
}
isd_pd();
}
/********************************************/
void jisuan1()
{
uchar i;
for(i=0;i<7;i++)
{
if(i==3)
{
results[6-i]='.';
continue;
}
results[6-i]=count%10+'0';
count/=10;
}
count=0;
}
void jisuan2()
{
uchar i;
uint temp;
count=TH0*256+TL0-15540;
temp=10000000/count;
for(i=0;i<5;i++)
{
if(i==1)
{
results[4-i]='.';
continue;
}
results[4-i]=temp%10+'0';
temp=temp/10;
}
temp=count;
count=10000000%count;
count*=10;
for(i=0;i<2;i++)
{
results[5+i]=count/temp+'0';
count=(count%temp)*10;
}
count=0;
}
/*****************************************/
void time0_over() interrupt 1 using 0
{
EA=0;
TH0=0x3c;
TL0=0xaf;
if(ncount==19)
{
ncount=0;
if(count>=1000)
{
jisuan1();
LCD12864_string(4,4,results);
LCD12864_string(8,4,"KH");
}
else
{flag=1;}
}
else
ncount++;
EA=1;
}
/*******************************************/
void counter0() interrupt 0
{
if(flag==0)
count++;
else
{
if(counter==2)
{
EA=0;
flag=0;
count=TH0*256+TL0-15540;
jisuan2();
ncount=counter=0;
LCD12864_string(4,4,results);
LCD12864_string(8,4,"Hz");
TH0=0x3c;
TL0=0xaf;





