第一范文网 - 专业文章范例文档资料分享平台

电子体温计设计1.1 - 图文

来源:用户分享 时间:2025/6/17 9:45:15 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

电子体温计设计

a9=(unsigned int) (time_buf2[4]/16); a10=(unsigned int)(time_buf2[4]);//串口接收第5个16进制温度字节,并且把个位和十位分离,只取有效数据个位。 a11=(unsigned int)(time_buf2[5]/16); a12=(unsigned int)(time_buf2[5]);//串口接收第6个16进制温度字节,并且把个位和十位分离,只取有效数据个位。 a13=(unsigned int)(time_buf2[6]/16); a14=(unsigned int)(time_buf2[6]);//串口接收第7个16进制温度字节,并且把个位和十位分离,只取有效数据个位。 a15=(unsigned int)(time_buf2[7]/16); a16=(unsigned int)(time_buf2[7]);//串口接收第8个16进制温度字节,并且把个位和十位分离,只取有效数据个位。 Temperature=a2*1000+a4*100+a6*10+a8+0; //将分离开的温度数据组合成一个数据,OffSetValue是校准值 Temperature2=a10*1000+a12*100+a14*10+a16+0; //将分离开的温度数据组合成一个数据,OffSetValue是校准值 a=Temperature/1000; b=(Temperature00)/100; c=(Temperature0)/10; d= Temperature;

LCDDispString(0,1,\ if(a==9) { LCDDispString(7,1,\ } else { LCDDispNum(7,1,a); //液晶显示温度的百位 } LCDDispNum(8,1,b); //液晶显示温度的十位 LCDDispNum(9,1,c); //液晶显示温度的个位

-40-

电子体温计设计

LCDDispString(10,1,\ //液晶显示字符“.” LCDDispNum(11,1,d); //液晶显示温度小数点最后一位 LCDDispChar(12,1,0xdf); //液晶显示温度符合 示字符\ 一位 } } }

LCDDispString(13,1,\ //液晶显 e=Temperature2/1000; f=(Temperature200)/100; g=(Temperature20)/10; h= Temperature2; LCDDispString(0,2,\ if(e==9) { LCDDispString(7,2,\ } else { LCDDispNum(7,2,e); //液晶显示温度的百位 } LCDDispNum(8,2,f); //液晶显示温度的十位 LCDDispNum(9,2,g); //液晶显示温度的个位 LCDDispString(10,2,\ //液晶显示字符“.” LCDDispNum(11,2,h); //液晶显示温度小数点最后 LCDDispChar(12,2,0xdf); //液晶显示温度符合 LCDDispString(13,2,\ //液晶显示字符\ -41-

电子体温计设计

************************************************************************************************************************** $NOMOD51

;------------------------------------------------------------------------------ ; This file is part of the C51 Compiler package

; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc. ; Version 8.01 ;

; *** <<< Use Configuration Wizard in Context Menu >>> *** ;------------------------------------------------------------------------------ ; STARTUP.A51: This code is executed after processor reset. ;

; To translate this file use A51 with the following invocation: ;

; A51 STARTUP.A51

-42-

电子体温计设计

;

; To link the modified STARTUP.OBJ file to your application use the following ; Lx51 invocation: ;

; Lx51 your object file list, STARTUP.OBJ controls ;

;------------------------------------------------------------------------------ ;

; User-defined Power-On Initialization of Memory ;

; With the following EQU statements the initialization of memory ; at processor reset can be defined: ;

; IDATALEN: IDATA memory size <0x0-0x100>

; Note: The absolute start-address of IDATA memory is always 0

; The IDATA space overlaps physically the DATA and BIT areas. IDATALEN EQU 80H ;

; XDATASTART: XDATA memory start address <0x0-0xFFFF> ; The absolute start address of XDATA memory XDATASTART EQU 0 ;

; XDATALEN: XDATA memory size <0x0-0xFFFF> ; The length of XDATA memory in bytes. XDATALEN EQU 0 ;

; PDATASTART: PDATA memory start address <0x0-0xFFFF> ; The absolute start address of PDATA memory PDATASTART EQU 0H ;

; PDATALEN: PDATA memory size <0x0-0xFF> ; The length of PDATA memory in bytes. PDATALEN EQU 0H ; ;

;------------------------------------------------------------------------------ ;

-43-

搜索更多关于: 电子体温计设计1.1 - 图文 的文档
电子体温计设计1.1 - 图文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c4rqty3aot51cf865cb8o_12.html(转载请注明文章来源)
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top