例如某气体传感器MQ精度需达到某ppm,通过AD转换到单片机。这个转换后精度怎么表示的?(例如标准气体浓度是0.09)需要怎么表示?
void Display_1602(yushe_wendu,yushe_yanwu,wen,yan)
{
//显示预设温度
LCD_Write_Char(0,6,yushe_wendu,2) ; //0行 6列 预设温度 2位
//显示预设烟雾
LCD_Write_Char(0,11,yushe_yanwu/100,1);
LCD_Write_Char(0,13,yushe_yanwu,2) ;
write_data('%');
// LCD_Write_Char(0,13,yushe_yanwu/10,1);
// write_data('.');
// LCD_Write_Char(0,15,yushe_yanwu%10,1) ;
//时时温度
LCD_Write_Char(1,6,wen/10,2) ;
LCD_Write_Char(1,9,wen%10,0) ;
//时时烟雾
LCD_Write_Char(1,11,yan/100,1);
LCD_Write_Char(1,13,yan,2);
write_data('%');
// LCD_Write_Char(1,13,yan/10,1);
// LCD_Write_Char(1,14,yan%10,1) ;
// write_data('%');
}
|