📄 sifu_xyokbak.lst
字号:
C51 COMPILER V7.01 SIFU_XYOKBAK 11/21/2007 20:20:06 PAGE 1
C51 COMPILER V7.01, COMPILATION OF MODULE SIFU_XYOKBAK
OBJECT MODULE PLACED IN sifu_xyokbak.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE sifu_xyokbak.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /****************************************************************/
2 /*Module: New technic
3 /*Creator: lianghaodang
4 /*Date: 11/19/2007
5 /*Description: creat a pulse
6 /****************************************************************/
7 #include<AT892051.h>
8 #include<stdio.h>
9 #include<math.h>
10 #include<intrins.h>
11
12 sbit Sig_x = P3^4;
13 sbit Sig_y = P3^2;
14 sbit KEY = P3^7;
15 sbit PULS_x = P3^5;
16 sbit PULS_y = P3^3;
17 unsigned int Counter_x,Counter_y;
18 void Delayms(unsigned char ms);
19
20 //----------------------------------------
21 void time0(void) interrupt 1
22 { PULS_x = ~PULS_x;
23 1 Counter_x++;
24 1 TH0 = 0xFE;
25 1 TL0 = 0x18;
26 1 }
27
28 void time1(void) interrupt 3
29 {
30 1 PULS_y = ~PULS_y;
31 1 Counter_y++;
32 1 TH1 = 0xFE;
33 1 TL1 = 0x18;
34 1 }
35
36 //----------------------------------------
37 void main(void)
38 {
39 1 // bit Flag;
40 1 P1 = 0XFF;
41 1 P3 = 0XFF;
42 1 PULS_x = 0;
43 1 PULS_y = 0;
44 1 TMOD = 0x11;
45 1 IT0 = 1;
46 1 PCON=0X00;
47 1 ET0 = 1;
48 1 ET1 = 1;
49 1
50 1 TH0 = 0xFE;
51 1 TL0 = 0x18;
52 1 TH1 = 0xFE;
53 1 TL1 = 0x18;
54 1
55 1 TR0 = 0;
C51 COMPILER V7.01 SIFU_XYOKBAK 11/21/2007 20:20:06 PAGE 2
56 1 TR1 = 0;
57 1 EA = 1;
58 1
59 1 while(1)
60 1 {
61 2 Sig_x = 0;
62 2
63 2 /****************/
64 2 KEY = 1;
65 2 while(1)
66 2 {while(KEY!=0);
67 3 Delayms(5);
68 3 if(KEY==0) break;
69 3 }
70 2 while(KEY==0);
71 2 /***************/
72 2 do //x action 1
73 2 {
74 3 TR0 = 1;
75 3 }while(Counter_x<12636);
76 2 TR0 = 0;
77 2 Counter_x = 0;
78 2
79 2
80 2 /**************************************************/
81 2 Sig_y = 1;
82 2 /***************/
83 2 do //y action 1
84 2 {
85 3 TR1 = 1;
86 3 }while(Counter_y<1000);
87 2 TR1 = 0;
88 2 Counter_y = 0;
89 2
90 2
91 2 /***************/
92 2 do //y action 2
93 2 {
94 3 TR1 = 1;
95 3 }while(Counter_y<1000);
96 2 TR1 = 0;
97 2 Counter_y = 0;
98 2
99 2 /***************/
100 2 do //y action 3
101 2 {
102 3 TR1 = 1;
103 3 }while(Counter_y<1000);
104 2 TR1 = 0;
105 2 Counter_y = 0;
106 2
107 2 /***************/
108 2 do //y action 4
109 2 {
110 3 TR1 = 1;
111 3 }while(Counter_y<1500);
112 2 TR1 = 0;
113 2 Counter_y = 0;
114 2 /*********************************************/
115 2
116 2
117 2
C51 COMPILER V7.01 SIFU_XYOKBAK 11/21/2007 20:20:06 PAGE 3
118 2 /****************/
119 2 KEY = 1;
120 2 while(1)
121 2 {while(KEY!=0);
122 3 Delayms(5);
123 3 if(KEY==0) break;
124 3 }
125 2 while(KEY==0);
126 2 /***************/
127 2 do //x action 2
128 2 {//TR1 = 1;
129 3 TR0 = 1;
130 3 }while(Counter_x<454);
131 2 //TR1 = 0;
132 2 TR0 = 0;
133 2 Counter_x = 0;
134 2 /********************************************/
135 2 Sig_y = 1;
136 2 /***************/
137 2 do //y action 5
138 2 {
139 3 TR1 = 1;
140 3 }while(Counter_y<1500);
141 2 TR1 = 0;
142 2 Counter_y = 0;
143 2 /********************************************/
144 2
145 2 /****************/
146 2 KEY = 1;
147 2 while(1)
148 2 {while(KEY!=0);
149 3 Delayms(5);
150 3 if(KEY==0) break;
151 3 }
152 2 while(KEY==0);
153 2 /***************/
154 2 do //x action 3
155 2 {//TR1 = 1;
156 3 TR0 = 1;
157 3 }while(Counter_x<1364);
158 2 //TR1 = 0;
159 2 TR0 = 0;
160 2 Counter_x = 0;
161 2 /********************************************/
162 2 Sig_y = 1;
163 2 /***************/
164 2 do //y action 6
165 2 {
166 3 TR1 = 1;
167 3 }while(Counter_y<1500);
168 2 TR1 = 0;
169 2 Counter_y = 0;
170 2 /********************************************/
171 2
172 2 Sig_x = 1;
173 2 /****************/
174 2 KEY = 1;
175 2 while(1)
176 2 {while(KEY!=0);
177 3 Delayms(5);
178 3 if(KEY==0) break;
179 3 }
C51 COMPILER V7.01 SIFU_XYOKBAK 11/21/2007 20:20:06 PAGE 4
180 2 while(KEY==0);
181 2 /***************/
182 2 do //x action 4
183 2 {//TR1 = 1;
184 3 TR0 = 1;
185 3 }while(Counter_x<1364);
186 2
187 2 TR0 = 0;
188 2 Counter_x = 0;
189 2 /********************************************/
190 2 Sig_y = 0;
191 2 /***************/
192 2 do //y action 7
193 2 {
194 3 TR1 = 1;
195 3 }while(Counter_y<1500);
196 2 TR1 = 0;
197 2 Counter_y = 0;
198 2 /********************************************/
199 2 /****************/
200 2 KEY = 1;
201 2 while(1)
202 2 {while(KEY!=0);
203 3 Delayms(5);
204 3 if(KEY==0) break;
205 3 }
206 2 while(KEY==0);
207 2 /***************/
208 2 do //x action 5
209 2 {//TR1 = 1;
210 3 TR0 = 1;
211 3 }while(Counter_x<1546);
212 2 //TR1 = 0;
213 2 TR0 = 0;
214 2 Counter_x = 0;
215 2 /********************************************/
216 2 Sig_y = 1;
217 2 /***************/
218 2 do //y action 8
219 2 {
220 3 TR1 = 1;
221 3 }while(Counter_y<1500);
222 2 TR1 = 0;
223 2 Counter_y = 0;
224 2 /********************************************/
225 2 /****************/
226 2 KEY = 1;
227 2 while(1)
228 2 {while(KEY!=0);
229 3 Delayms(5);
230 3 if(KEY==0) break;
231 3 }
232 2 while(KEY==0);
233 2 /***************/
234 2 do //x action 6
235 2 {//TR1 = 1;
236 3 TR0 = 1;
237 3 }while(Counter_x<1456);
238 2 //TR1 = 0;
239 2 TR0 = 0;
240 2 Counter_x = 0;
241 2 /********************************************/
C51 COMPILER V7.01 SIFU_XYOKBAK 11/21/2007 20:20:06 PAGE 5
242 2 Sig_y = 0;
243 2 /***************/
244 2 do //y action 9
245 2 {
246 3 TR1 = 1;
247 3 }while(Counter_y<1500);
248 2 TR1 = 0;
249 2 Counter_y = 0;
250 2
251 2 /********************************************/
252 2 /********************************************/
253 2 Sig_y = 0;
254 2 /***************/
255 2 do //y action 10
256 2 {
257 3 TR1 = 1;
258 3 }while(Counter_y<1000);
259 2 TR1 = 0;
260 2 Counter_y = 0;
261 2
262 2 /********************************************/
263 2 /********************************************/
264 2 Sig_y = 0;
265 2 /***************/
266 2 do //y action 11
267 2 {
268 3 TR1 = 1;
269 3 }while(Counter_y<1000);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -