智能车制作

 找回密码
 注册

扫一扫,访问微社区

查看: 1118|回复: 2
打印 上一主题 下一主题

[咨询] 谁能帮忙看一下下面的程序啊?

[复制链接]

7

主题

29

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2109
威望
696
贡献
431
兑换币
350
注册时间
2012-10-12
在线时间
491 小时
毕业学校
惠州学院
跳转到指定楼层
1#
发表于 2013-3-24 17:50:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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;****************************************/这段不知道是什么意思!

0

主题

78

帖子

0

精华

高级会员

Rank: 4

积分
868
威望
460
贡献
262
兑换币
226
注册时间
2012-8-29
在线时间
73 小时
2#
发表于 2013-3-24 17:52:28 | 只看该作者
soft,,,,,,,,
回复 支持 反对

使用道具 举报

7

主题

29

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2109
威望
696
贡献
431
兑换币
350
注册时间
2012-10-12
在线时间
491 小时
毕业学校
惠州学院
3#
 楼主| 发表于 2013-3-25 20:12:33 | 只看该作者
Say_Love-You 发表于 2013-3-24 17:52
soft,,,,,,,,

什么意思?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关于我们|联系我们|小黑屋|智能车制作 ( 黑ICP备2022002344号

GMT+8, 2024-9-22 12:40 , Processed in 0.065085 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表