📄 main_stop1.lst
字号:
C51 COMPILER V7.06 MAIN_STOP1 09/02/2005 14:08:54 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE MAIN_STOP1
OBJECT MODULE PLACED IN E:\NEWMAC~1\050808\MAIN\MAIN_STOP1.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE E:\NEWMAC~1\050808\MAIN\MAIN_STOP1.C DB SB OE
stmt level source
1 #pragma la
2 #include <main.h>
3 #define uchar unsigned char
4 #define uint unsigned int
5 sbit stop=P3^5;
6
7 /**********err information**********/
8 /*
9 err=0 正常
10 err=1 急停
11 err=2 通讯出错
12 err=3 引弧失败
13 err=4 电源出错
14 err=5 过温
15 err=6 缺水
16 err=7 缺气1
17 err=8 缺气2
18 err=9 旋转过流
19 err=10 送丝过流
20 err=11 旋转限位
21 err=12 横摆左限位
22 err=13 横摆右限位
23 err=14 横摆过流
24 err=15 弧长上限位
25 err=16 弧长下限位
26 err=17 弧长过流
27 err=18 弧长短路
28 */
29 /**********err information**********/
30
31 xdata unsigned char sbuffer[7],rbuffer[64],sbuffer1[55];
32 unsigned char S_ANSW,R_ANSW,POINTER0,POINTER1,work,Rn,Wn,OA,RSUM,SSUM,sw,PRG,
33 err,toPRG,temp_PRG,p_name,s_byte_nums,r_byte_nums,
34 times,p_sec,c_ex1,delt_state,c_c_t1;
35 unsigned int *point,n_n11,n_t21,n_t31,n_t13,n_t32,n_t33,n_t41,n_t43,n_t51,n_t52,
36 n_t01,n_t02,n_t03,n_t04,n_t12,n_t17,n_t34,c_flow,c_sum,c_current,
37 c_end,temp_GET,general_param,mainDDR,secondDDR,nums,nums1,delt,c_t1
38 ;
39 unsigned char COMM,SLA,FF,GET;
40 bit ignit_ok,lift_ok,auto_return,editing,readEEPbyte,readEEPpage,
41 writeEEPpage,writeEEPword,writeEEPbyte,edit_finish,copy,change_prg,
42 overtime,getPRG,in_sector,send,current_ok,rw_ok,oa_ok,rc_ok,p_absent,
43 t31OK,t41OK,t51OK,resend,param,ans,s_p,rc_demand,wire_stoped,avc_stoped,
44 savePRG,noans_ok,calling,current_absent,rw_absent,oa_absent,main_err,current_err,rw_err,oa_err,
45 osc_absent,avc_absent,rc_err,delt_switch,p_out,p_send,temp_edit_finish,enter;
46
47 bit p_absent,rc_absent,change_sec_num,urgent_stop,p_forbid,rc_forbid,p_active,rc_active,wait_ans,send_p_ok
-;
48
49 xdata uchar start _at_ 0x0800;
50 xdata uchar start_again _at_ 0x0801;
51 xdata uchar decrease _at_ 0x0802;
52 //xdata uchar urgent_stop _at_ 0x0804;
53 xdata uchar YOUHU _at_ 0x0806;
54 xdata uchar WIRE _at_ 0x0808;
C51 COMPILER V7.06 MAIN_STOP1 09/02/2005 14:08:54 PAGE 2
55 xdata uchar decrease_ok _at_ 0x080A;
56 xdata uchar weld_switch _at_ 0x080C;
57 xdata uchar wire_switch _at_ 0x080E;
58 xdata uchar current_add _at_ 0x0810;
59 xdata uchar current_dec _at_ 0x0812;
60 xdata uchar rot_front _at_ 0x0814;
61 xdata uchar rot_reverse _at_ 0x0816;
62 xdata uchar wire_add _at_ 0x0818;
63 xdata uchar wire_dec _at_ 0x081A;
64 xdata uchar osc_l _at_ 0x081C;
65 xdata uchar osc_r _at_ 0x081E;
66 xdata uchar breadth_add _at_ 0x0820;
67 xdata uchar breadth_dec _at_ 0x0822;
68 xdata uchar avc_up _at_ 0x0824;
69 xdata uchar avc_down _at_ 0x0826;
70 xdata uchar motor_stop _at_ 0x0828;
71 //xdata uchar lift_ok _at_ 0x082A;
72 xdata uchar return_ok _at_ 0x082C;
73 xdata uchar nonce_sec _at_ 0X082E;
74 xdata uint FINISH _at_ 0X0830;
75 xdata uint CURRENT _at_ 0X0832;
76 xdata uint VOLTAGE _at_ 0X0834;
77 xdata uint AVC _at_ 0X0836;
78 //xdata uchar pc_ok _at_ 0x0838;
79 xdata uchar new_switch11 _at_ 0x0839;
80 xdata uchar new_switch22 _at_ 0x083A;
81 xdata uchar p_forbided _at_ 0x083B;
82 xdata uchar rc_forbided _at_ 0x083C;
83 xdata uchar p_actived _at_ 0x083D;
84 xdata uchar rc_actived _at_ 0x083E;
85 xdata uint last_FINISH _at_ 0x0840;
86 //xdata uint reset _at_ 0x0842;
87 void delay(unsigned int num)
88 {
89 1 data unsigned int i,ii;
90 1 for(i=0;i<num;i++)
91 1 {
92 2 for(ii=0;ii<255;ii++);
93 2 }
94 1 }
95
96 void start_i2()
97 {
98 1 data unsigned int time;
99 1 P1_6=1; //SCL
100 1 P1_7=1; //SDA
101 1 S1CON=0x47; //ENS1=1 STA=0 STO=0 SI=0 AA=1
102 1 PS1=1;FF=0;
103 1 EA=1;
104 1 ES1=1;
105 1 STA=1;
106 1 time=0;
107 1 do
108 1 {
109 2 time++;
110 2 if(time>10000)
111 2 {
112 3 FF=1;
113 3 }
114 2 }while(FF==0);
115 1 FF=0;
116 1 ES1=0;
C51 COMPILER V7.06 MAIN_STOP1 09/02/2005 14:08:54 PAGE 3
117 1 }
118
119 void ini_sbuf(unsigned char a,b,c,d,e,f,g)
120 {
121 1 sbuffer[0]=a;
122 1 sbuffer[1]=b;
123 1 sbuffer[2]=c;
124 1 sbuffer[3]=d;
125 1 sbuffer[4]=e;
126 1 sbuffer[5]=f;
127 1 sbuffer[6]=g;
128 1 }
129
130 unsigned char get_byte_nums(unsigned char type)
131 {
132 1 unsigned char numbers;
133 1 switch(type)
134 1 {
135 2 // case infor_sec:
136 2 case command:
137 2 case program:
138 2 case answer: numbers=4;
139 2 break;
140 2 case err_infor:
141 2 case parameter1: numbers=5;
142 2 break;
143 2 case parameter:
144 2 case infor: numbers=6;
145 2 break;
146 2 case parameter2: numbers=7;
147 2 break;
148 2 case call_result: numbers=9;
149 2 break;
150 2 case p_out_sec: numbers=55;
151 2 break;
152 2 case p_in_sec: numbers=24;
153 2 break;
154 2 case edit_sec: numbers=64;
155 2 break;
156 2 case p_section:
157 2 case p_edit_finish: numbers=8;
158 2 break;
159 2 default: break;
160 2 }
161 1 return numbers;
162 1 }
163
164 void start_i2a()
165 {
166 1 P1_6=1; //SCL
167 1 P1_7=1; //SDA
168 1 S1CON=0x47; //ENS1=1 STA=0 STO=0 SI=0 AA=1
169 1 PS1=1;
170 1 EA=1;
171 1 ES1=1;
172 1 STA=1;
173 1 }
174
175 void get_SLA()
176 {
177 1
178 1 if(PRG<50)
C51 COMPILER V7.06 MAIN_STOP1 09/02/2005 14:08:54 PAGE 4
179 1 {
180 2 SLA=0xA0;
181 2 temp_PRG=PRG;
182 2 }
183 1 else
184 1 {
185 2 if(PRG<100)
186 2 {
187 3 SLA=0XA2;
188 3 temp_PRG=PRG-50;
189 3 }
190 2 }
191 1 mainDDR=temp_PRG*768;
192 1 }
193
194 void get_SLA1()
195 {
196 1 if(PRG<50)
197 1 {
198 2 SLA=0XA0;
199 2 temp_PRG=PRG;
200 2 }
201 1 else
202 1 {
203 2 if(PRG<100)
204 2 {
205 3 SLA=0XA2;
206 3 temp_PRG=PRG-50;
207 3 }
208 2 else
209 2 {
210 3 if(PRG<150)
211 3 {
212 4 SLA=0XA4;
213 4 temp_PRG=PRG-100;
214 4 }
215 3 else
216 3 {
217 4 SLA=0XA6;
218 4 temp_PRG=PRG-150;
219 4 }
220 3 }
221 2 }
222 1 mainDDR=temp_PRG*768;
223 1 }
224
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -