📄 shuiben.lst
字号:
C51 COMPILER V7.01 SHUIBEN 12/14/2006 14:38:31 PAGE 1
C51 COMPILER V7.01, COMPILATION OF MODULE SHUIBEN
OBJECT MODULE PLACED IN shuiben.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE shuiben.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <reg51.h>
2 #define uchar unsigned char
3 #define uint unsigned int
4 #define OFF 1
5 #define ON 0
6 #define high 0
7 #define low 1
8 #define A 1
9 #define B 0
10 #define OFF_delay 600
11 #define ON_delay 100
12 //////////水池1111/////////////
13 sbit OUT1_A=P3^3;
14 sbit OUT1_B=P3^2;
15 sbit H1=P3^7;
16 sbit M1=P3^6;
17 sbit L1=P2^0;
18
19 //////////水池2222/////////////
20 sbit OUT2_A=P1^7;
21 sbit OUT2_B=P1^6;
22 sbit H2=P2^1;
23 sbit M2=P2^2;
24 sbit L2=P2^3;
25
26 //////////水池3333/////////////
27 sbit OUT3_A=P1^5;
28 sbit OUT3_B=P1^4;
29 sbit H3=P2^4;
30 sbit M3=P2^5;
31 sbit L3=P2^6;
32
33 //////////水池4444/////////////
34 sbit OUT4_A=P1^3;
35 sbit OUT4_B=P1^2;
36 sbit H4=P2^7;
37 sbit M4=P0^7;
38 sbit L4=P0^6;
39
40 //////////水池5555/////////////
41 sbit OUT5_A=P1^1;
42 sbit OUT5_B=P1^0;
43 sbit H5=P0^5;
44 sbit M5=P0^4;
45 sbit L5=P0^3;
46
47 //////////水池6666/////////////
48 sbit OUT6_A=P3^4;
49 sbit OUT6_B=P3^5;
50 sbit H6=P0^2;
51 sbit M6=P0^1;
52 sbit L6=P0^0;
53
54 //uchar data1_H,data2_H,data3_H,data4_H,data5_H,data6_H;
55 //uchar data1_L,data2_L,data3_L,data4_L,data5_L,data6_L;
C51 COMPILER V7.01 SHUIBEN 12/14/2006 14:38:31 PAGE 2
56 uchar AB1,AB2,AB3,AB4,AB5,AB6;
57 uchar ERROR1,ERROR2,ERROR3,ERROR4,ERROR5,ERROR6;
58 uint time1,time2,time3,time4,time5,time6;
59 void interruptT1() interrupt 3
60 {
61 1 TH1=0x4C;
62 1 TL1=0x00;
63 1 if (ERROR1==ON)
64 1 {
65 2 time1++;
66 2 if (time1==ON_delay)
67 2 if(H1==high)
68 2 {
69 3 OUT1_A=ON;
70 3 OUT1_B=ON;
71 3 }
72 2 else
73 2 {
74 3 ERROR1=OFF;
75 3 time1=0;
76 3 }
77 2 if (time1>OFF_delay)
78 2 {
79 3 OUT1_A=OFF;
80 3 OUT1_B=OFF;
81 3 ERROR1=OFF;
82 3 time1=0;
83 3 }
84 2 }
85 1
86 1 if (ERROR2==ON)
87 1 {
88 2 time2++;
89 2 if (time2==ON_delay)
90 2 if(H2==high)
91 2 {
92 3 OUT2_A=ON;
93 3 OUT2_B=ON;
94 3 }
95 2 else
96 2 {
97 3 ERROR2=OFF;
98 3 time2=0;
99 3 }
100 2 if (time2>OFF_delay)
101 2 {
102 3 OUT2_A=OFF;
103 3 OUT2_B=OFF;
104 3 ERROR2=OFF;
105 3 time2=0;
106 3 }
107 2 }
108 1
109 1 if (ERROR3==ON)
110 1 {
111 2 time3++;
112 2 if (time3==ON_delay)
113 2 if(H3==high)
114 2 {
115 3 OUT3_A=ON;
116 3 OUT3_B=ON;
117 3 }
C51 COMPILER V7.01 SHUIBEN 12/14/2006 14:38:31 PAGE 3
118 2 else
119 2 {
120 3 ERROR3=OFF;
121 3 time3=0;
122 3 }
123 2 if (time3>OFF_delay)
124 2 {
125 3 OUT3_A=OFF;
126 3 OUT3_B=OFF;
127 3 ERROR3=OFF;
128 3 time3=0;
129 3 }
130 2 }
131 1
132 1
133 1 if (ERROR4==ON)
134 1 {
135 2 time4++;
136 2 if (time4==ON_delay)
137 2 if(H4==high)
138 2 {
139 3 OUT4_A=ON;
140 3 OUT4_B=ON;
141 3 }
142 2 else
143 2 {
144 3 ERROR4=OFF;
145 3 time4=0;
146 3 }
147 2 if (time4>OFF_delay)
148 2 {
149 3 OUT4_A=OFF;
150 3 OUT4_B=OFF;
151 3 ERROR4=OFF;
152 3 time4=0;
153 3 }
154 2 }
155 1
156 1
157 1 if (ERROR5==ON)
158 1 {
159 2 time5++;
160 2 if (time5==ON_delay)
161 2 if(H5==high)
162 2 {
163 3 OUT5_A=ON;
164 3 OUT5_B=ON;
165 3 }
166 2 else
167 2 {
168 3 ERROR5=OFF;
169 3 time5=0;
170 3 }
171 2 if (time5>OFF_delay)
172 2 {
173 3 OUT5_A=OFF;
174 3 OUT5_B=OFF;
175 3 ERROR5=OFF;
176 3 time5=0;
177 3 }
178 2 }
179 1
C51 COMPILER V7.01 SHUIBEN 12/14/2006 14:38:31 PAGE 4
180 1
181 1 if (ERROR6==ON)
182 1 {
183 2 time6++;
184 2 if (time6==ON_delay)
185 2 if(H6==high)
186 2 {
187 3 OUT6_A=ON;
188 3 OUT6_B=ON;
189 3 }
190 2 else
191 2 {
192 3 ERROR6=OFF;
193 3 time6=0;
194 3 }
195 2 if (time6>OFF_delay)
196 2 {
197 3 OUT6_A=OFF;
198 3 OUT6_B=OFF;
199 3 ERROR6=OFF;
200 3 time6=0;
201 3 }
202 2 }
203 1 }
204
205
206 void Initial (void)
207 {
208 1 P1=0XFF;
209 1 P2=0XFF;
210 1 P3=0XFF;
211 1 P0=0XFF;
212 1 AB1=A;
213 1 AB2=A;
214 1 AB3=A;
215 1 AB4=A;
216 1 AB5=A;
217 1 AB6=A;
218 1
219 1 ERROR1=OFF;
220 1 ERROR2=OFF;
221 1 ERROR3=OFF;
222 1 ERROR4=OFF;
223 1 ERROR5=OFF;
224 1 ERROR6=OFF;
225 1 time1=0;
226 1 time2=0;
227 1 time3=0;
228 1 time4=0;
229 1 time5=0;
230 1 time6=0;
231 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -