📄 sed1520.lst
字号:
C51 COMPILER V7.07 SED1520 04/09/2004 23:25:03 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE SED1520
OBJECT MODULE PLACED IN SED1520.OBJ
COMPILER INVOKED BY: C:\keil7.07\addon\IMAGE\C51\C51\BIN\C51.EXE SED1520.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <stdio.h>
2 #include <..\ATMEL\AT89X51.H>
3 #include <stdlib.h>
4 #include <intrins.h>
5 #include <string.h>
6 #include <math.h>
7 #include "AD.H"
8 //unsigned int val;
9 unsigned char key0,key,key1,key2,key3,key4,key5;
10 bit flag=0;
11 int count=0;
12 unsigned char sig=3,out=3;
13
14
15 void delay(long time)/////////int time////500//////
16 {
17 1
18 1 long i=time,j;
19 1 if(i==0){return;}
20 1 else
21 1 {
22 2 while(i)
23 2 {
24 3 j=5;
25 3 while(j){j--;}
26 3 i--;
27 3 }
28 2 }
29 1 }
30 unsigned char Square(unsigned char x)
31 {
32 1 unsigned char i,y=1;
33 1 for(i=1;i<=x;i++)
34 1 {y=y*2;}
35 1 return y;
36 1 }
37
38 void zhi(unsigned char cc)
39 {
40 1 while(cc!=0)
41 1 {cc=cc-1;
42 2 P1_7=0;P1_6=0;P1_5=0;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//zhishi
43 2 }
44 1 }
45 /*
46 void zhiup(unsigned char ee)
47 {
48 while(ee!=0)
49 {ee=ee-1;
50 P1_7=0;P1_6=0;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;//zhishi
51 }
52 }
53 */
54 void back(unsigned char dd)
55 {
C51 COMPILER V7.07 SED1520 04/09/2004 23:25:03 PAGE 2
56 1 while(dd!=0)
57 1 {dd=dd-1;
58 2 P1_7=0;P1_6=1;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//zhishi
59 2 }
60 1 }
61
62 void hello(unsigned char aa)
63 {
64 1 switch(aa)
65 1 {case 1:
66 2
67 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
68 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
69 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
70 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
71 2 break;
72 2 case 2:
73 2
74 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
75 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
76 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
77 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
78 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
79 2 break;
80 2 case 3:
81 2
82 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
83 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
84 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
85 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
86 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
87 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
88 2 break;
89 2 case 4:
90 2
91 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
92 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
93 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
94 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
95 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
96 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
97 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
98 2 break;
99 2 case 5:
100 2
101 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
102 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
103 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
104 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
105 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
106 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
107 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
108 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
109 2 break;
110 2 case 6:
111 2
112 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
113 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
114 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
115 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
116 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
117 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
C51 COMPILER V7.07 SED1520 04/09/2004 23:25:03 PAGE 3
118 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
119 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
120 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;//ok
121 2 break;
122 2 case 7:
123 2
124 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
125 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
126 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
127 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
128 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
129 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
130 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
131 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
132 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
133 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
134 2 break;
135 2 case 8:
136 2
137 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
138 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
139 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
140 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
141 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
142 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
143 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
144 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
145 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
146 2 P1_7=0;P1_6=0;P1_5=1;P1_4=1;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//down
147 2 P1_7=0;P1_6=1;P1_5=1;P1_4=0;delay(10000);P1_7=1;P1_6=1;P1_5=1;P1_4=1;delay(10000);//ok
148 2
149 2 break;
150 2
151 2 }
152 1 }
153
154
155 unsigned char pre_Key_Scan()
156 {
157 1 unsigned char Key;
158 1
159 1
160 1 P2_5=0;
161 1 P2_6=1;
162 1
163 1
164 1 if (P2_4==0)
165 1 { Key=0x30&0xf0; return Key;}
166 1 else if(P2_3==0)
167 1 { Key=0x20&0xf0; return Key;}
168 1 else if(P2_2==0)
169 1 { Key=0x10&0xf0; return Key;}
170 1 else if(P2_1==0)
171 1 { Key=0x40&0xf0; return Key;}
172 1
173 1
174 1 P2_6=0;
175 1 P2_5=1;
176 1
177 1 if( P2_4== 0 )
178 1 { Key=0x60&0xf0; return Key;}
179 1 else if (P2_3== 0 )
C51 COMPILER V7.07 SED1520 04/09/2004 23:25:03 PAGE 4
180 1 { Key=0x70&0xf0; return Key;}
181 1 else if (P2_2== 0 )
182 1 { Key=0x080&0xf0; return Key;}
183 1 else if (P2_1== 0 )
184 1 { Key=0x40&0xf0; return Key;}
185 1
186 1
187 1
188 1 else {return 0;}
189 1
190 1 }
191 unsigned char Key_Scan()
192 {
193 1 unsigned char Key,prekey,prekey1;
194 1
195 1
196 1 P2_5=0;
197 1 P2_6=1;
198 1
199 1
200 1 if (P2_4==0)
201 1 { Key=0x30; delay(10); prekey=pre_Key_Scan();delay(10);prekey1=pre_Key_Scan();delay(10);
202 2 if( (Key=prekey)&&(Key=prekey1) ){while(P2_4==0) ;} count=0;return Key&0xf0;}
203 1 else if(P2_3==0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -