新手上路
- 积分
- 20
- 金钱
- 20
- 注册时间
- 2017-7-16
- 在线时间
- 15 小时
|
5金钱
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;
}
|
|