智能车制作
标题:
谁能帮忙看一下下面的程序啊?
[打印本页]
作者:
三水亦是哥
时间:
2013-3-24 17:50
标题:
谁能帮忙看一下下面的程序啊?
void Sci0_measure_process(unsigned char measure_dat)
{
unsigned int measure_temp_dat;
unsigned char measure_temp_dat_hi;
unsigned char measure_temp_dat_low;
unsigned char measure_dat_third;
unsigned char measure_dat_second;
unsigned char measure_dat_first;
/*数据处理*/
measure_temp_dat_hi = measure_dat&0xF0;
measure_temp_dat_hi = measure_dat>>4;
measure_temp_dat_low = measure_dat&0x0F;
measure_temp_dat = measure_temp_dat_hi*16+measure_temp_dat_low;
measure_temp_dat = measure_temp_dat*2;
measure_dat_third =(unsigned char) measure_temp_dat/100;
measure_dat_second = (measure_temp_dat%100)/10;
measure_dat_first= measure_temp_dat%10;
Sci0_send_data(measure_dat_third+0x30); //通过串口显示相应的数字
Sci0_send_strings_dot(); //通过串口显示小数点
Sci0_send_data(measure_dat_second+0x30); //通过串口显示相应的数字
Sci0_send_data(measure_dat_first+0x30); //通过串口显示相应的数字
Sci0_send_strings_V(); //通过V字符标识
}
/****************************************
measure_temp_dat_hi = measure_dat&0xF0; measure_temp_dat_hi = measure_dat>>4; measure_temp_dat_low = measure_dat&0x0F; measure_temp_dat = measure_temp_dat_hi*16+measure_temp_dat_low; measure_temp_dat = measure_temp_dat*2;****************************************/这段不知道是什么意思!
作者:
Say_Love-You
时间:
2013-3-24 17:52
soft,,,,,,,,
作者:
三水亦是哥
时间:
2013-3-25 20:12
Say_Love-You 发表于 2013-3-24 17:52
soft,,,,,,,,
什么意思?
欢迎光临 智能车制作 (http://dns.znczz.com/)
Powered by Discuz! X3.2