if(t==10||key==KEY0_PRES||key==WKUP_PRES) //WKUP/KEY1°´ÏÂÁË,»òÕ߶¨Ê±Ê±¼äµ½ÁË
{
adcx=DAC_GetDataOutputValue(DAC_Channel_1);//??????DAC??
LCD_ShowxNum(124,150,adcx,4,16,0); //ÏÔʾDAC¼Ä´æÆ÷Öµ
temp=(float)adcx*(3.3/4096); //µÃµ½DACµçѹֵ
adcx=temp;
LCD_ShowxNum(124,170,temp,1,16,0); //ÏÔʾµçѹֵÕûÊý²¿·Ö
temp-=adcx;
temp*=1000;
LCD_ShowxNum(140,170,temp,3,16,0X80); //ÏÔʾµçѹֵµÄСÊý²¿·Ö
adcx=Get_Adc_Average(ADC_Channel_1,10); //µÃµ½ADCת»»Öµ
temp=(float)adcx*(3.3/4096); //µÃµ½ADCµçѹֵ
adcx=temp;
LCD_ShowxNum(124,190,temp,1,16,0); //ÏÔʾµçѹֵÕûÊý²¿·Ö
temp-=adcx;
temp*=1000;
LCD_ShowxNum(140,190,temp,3,16,0X80); //ÏÔʾµçѹֵµÄСÊý²¿·Ö
LED0=!LED0;
t=0;
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
if(t==10||key==KEY0_PRES||key==WKUP_PRES) //WKUP/KEY1°´ÏÂÁË,»òÕ߶¨Ê±Ê±¼äµ½ÁË
这块不就是按键程序嘛
一周热门 更多>