📄 mxh.lst
字号:
C51 COMPILER V8.05a MXH 08/06/2008 18:24:57 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE MXH
OBJECT MODULE PLACED IN mxh.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE mxh.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include "DS18B20.h"
2 #include "display.h"
3
4 //extern unsigned char temp_value;
5
6 unsigned char tishi[]={"Temperature is:"};
7 unsigned char temp_buffer[7]; //存放液晶显示内容
8
9 unsigned char num;
10 unsigned char Integer=0,Decimal=0;
11
12 void temp_to_str()
13 {
14 1 temp_buffer[0]=Integer/10+'0';//十位
15 1 temp_buffer[1]=Integer%10+'0';//个位
16 1 temp_buffer[2]='.';
17 1 temp_buffer[3]=Decimal+'0';//小数
18 1 temp_buffer[4]=0xdf;//温度符号
19 1 temp_buffer[5]='C';
20 1 temp_buffer[6]='\0';
21 1 }
22
23 void main()
24 {
25 1 /*Init_DS18B20();
26 1 ReadTemp(); */
27 1
28 1
29 1 init_lcd();
30 1 delay(12);
31 1 dmsec(10);
32 1 tmstart();
33 1
34 1 while(1){
35 2 tmrtemp(); //读取温度值
36 2 temp_to_str();
37 2 Integer=Temp_Integer;
38 2 Decimal=Temp_Decimal;
39 2
40 2 write_com(0x80);//写命令,设置显示位置
41 2 for(num=0;num<20;num++)
42 2 {
43 3 write_data(tishi[num]); //写第一行数据
44 3 delay(10);
45 3 }
46 2
47 2
48 2 write_com(0x80+0x46); //改变数据指针,改变显示位置
49 2 for(num=0;num<7;num++)
50 2 {
51 3 write_data(temp_buffer[num]); //写第二行数据
52 3 delay(1000);
53 3 }
54 2
55 2
C51 COMPILER V8.05a MXH 08/06/2008 18:24:57 PAGE 2
56 2 delay(1000);
57 2 tmstart(); //重新启动温度转换
58 2
59 2 /* write_com(0x80);//写命令,设置显示位置
60 2 for(num=0;num<20;num++)
61 2 {
62 2 write_data(tishi[num]); //写第一行数据
63 2 delay(10);
64 2 }
65 2
66 2 write_com(0x80+0x46); //改变数据指针,改变显示位置
67 2 for(num=0;num<5;num++)
68 2 {
69 2 write_data(temp_buffer[num]); //写第二行数据
70 2 delay(10);
71 2 } */
72 2 }
73 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 538 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 29 2
IDATA SIZE = ---- ----
BIT SIZE = ---- 2
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -