?? measure_f.lst
字號:
C51 COMPILER V8.08 MEASURE_F 09/23/2008 07:30:53 PAGE 1
C51 COMPILER V8.08, COMPILATION OF MODULE MEASURE_F
OBJECT MODULE PLACED IN measure_F.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE measure_F.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include<reg52.h>
2 #include<lcd1602.h>
3 #include<counter.h>
4 #include<measure_F.h>
5 #include<write164.h>
6 #include <delay.h>
7
8 void measure_F()
9 {
10 1 uchar dotwei;
11 1 uchar Mflag;
12 1 unsigned long freq;
13 1 gotoxy(2,1);
14 1 write_LCD_data('=');
15 1 dotwei=0;
16 1
17 1 while(1)
18 1 {
19 2 Mflag=1;
20 2 write164(Fen200_MF); /*選通200分頻,測200k--10M的信號*/
21 2 while(Mflag)
22 2 {
23 3 freq=counter(1);
24 3 if(freq>50000)
25 3 {
26 4 gotoxy(2,3);
27 4 write_LCD_data('E');
28 4 }
29 3
30 3 else if((freq<=50000)&&(freq>1000))
31 3 { freq=freq*200;
32 4 gotoxy(2,3);
33 4 display_LCD_number(freq,dotwei);
34 4 }
35 3 else Mflag=0;
36 3 if(freq==0) {goto reti;}
37 3 }
38 2
39 2 Mflag=1;
40 2 write164(Fen100_MF);/*選通100分頻,測10k--200k的信號*/
41 2 while(Mflag)
42 2 {
43 3 freq=counter(1);
44 3 if((freq>1000)&&(freq<=2000))
45 3 { freq=freq*100;
46 4 gotoxy(2,3);
47 4 display_LCD_number(freq,dotwei);
48 4 }
49 3 else
50 3 {if((freq<=1000)&&(freq>100))
51 4 {
52 5 freq=counter(5);
53 5 freq=freq*20;
54 5 gotoxy(2,3);
55 5 display_LCD_number(freq,dotwei);
C51 COMPILER V8.08 MEASURE_F 09/23/2008 07:30:53 PAGE 2
56 5 }
57 4 else Mflag=0;
58 4 }
59 3 if(freq==0) {goto reti;}
60 3 }
61 2
62 2
63 2 Mflag=1;
64 2 write164(Direct_MF);/*選通直通分頻,測500--10k的信號*/
65 2 while(Mflag)
66 2 {
67 3 freq=counter(2);
68 3 if(freq>1000)
69 3 { freq=freq*5;
70 4 dotwei=1;
71 4 gotoxy(2,3);
72 4 display_LCD_number(freq,dotwei);
73 4 }
74 3 else Mflag=0;
75 3 if(freq==0) {goto reti;}
76 3 }
77 2
78 2 Mflag=1;
79 2 write164(Direct_MF); /*選通直通分頻,測1--500的信號*/
80 2 while(Mflag)
81 2 {
82 3 freq=counter(10);
83 3
84 3 if(freq>=10)
85 3 {
86 4 dotwei=1;
87 4 gotoxy(2,3);
88 4 display_LCD_number(freq,dotwei);
89 4 }
90 3 else
91 3 {
92 4 freq=counter(100);
93 4 if(freq>100)
94 4 { dotwei=2;
95 5 gotoxy(2,3);
96 5 display_LCD_number(freq,dotwei); ///freq=freq/10;/*想辦法顯示小數部分*/
97 5 }
98 4 else Mflag=0;
99 4 }
100 3 if(freq==0) {goto reti;}
101 3 }
102 2
103 2 /* Mflag=1;
104 2 // write164(Direct_MF);
105 2 while(Mflag)
106 2 {P1=0x00;
107 2 delay(1);
108 2 P1=0xff;
109 2 freq=counter(1);
110 2 if(freq>0)
111 2 {dotwei=3;
112 2 gotoxy(2,3);
113 2
114 2 display_LCD_number(freq,dotwei);
115 2 }
116 2 else Mflag=0;
117 2 if(freq==0) {goto reti;}
C51 COMPILER V8.08 MEASURE_F 09/23/2008 07:30:53 PAGE 3
118 2 }*/
119 2
120 2 }
121 1 reti:;
122 1 }
123
124
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 663 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 6
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -