📄 m7219tbl.lst
字号:
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 1
C51 COMPILER V6.02, COMPILATION OF MODULE M7219TBL
OBJECT MODULE PLACED IN D:\2005_09\M7219tbl.OBJ
COMPILER INVOKED BY: D:\C51\BIN\C51.EXE D:\2005_09\M7219tbl.c SMALL DB OE CO OT(SIZE)
stmt level source
1 /********************** 7 Segment Driver MAX7219 *************************************/
2 /* Definitions ****/
3 /* 1. Display type ****/
4 /* COMMON_ANODE ****/
5 /* LED arry ****/
6 /* L1(A PIN) L2(B) L3(C) L4(D) L5(E) ****/
7 /* XUNSHI ZHONJINLIULIANG DIWEI BAOJIN SHANGXIAN BAOJINXIAXIAN **/
8 /*************************************************************************************/
9
10
11 #include "math.h"
12 #include "reg52.h"
13 #include "typedef.h"
14 #include "function.h"
15 #include "define.h"
16 #include "varible.h"
17 //#define DISP_DECIMAL
18
19 /**************************************/
20 /**************************************/
21
22
23 void Moment_disp(void);
24 void P_count_disp(void);
25 void N_count_disp(void);
26 void Net_count_disp(void);
27 void Low_count_disp(void);
28 void Alarm_up_disp(void);
29 void Alarm_down_disp(void);
30 void Set_disp(void);
31 void Password_disp(void);
32 void Reset_count_disp(void);
33 void Range_disp(void);
34 void Pulse_disp(void);
35 void Filter_disp(void);
36 void Small_cut_disp(void);
37 void Ulimit_alarm_disp(void);
38 void Dlimit_alarm_disp(void);
39 void Sensor_k_disp(void);
40 void Set_4ma_refence(void);
41 void Set_zero_offset(void);
42 void Change_code_disp(void);
43 void Sys_mima_disp(void);
44 void Disp_prc( void );
45 void Led_prc(void);
46 void Dp_disp_set(unsigned char dp);
47 /**************************************/
48 /**************************************/
49
50
51 /**************************************/
52 /**************************************/
53 //extern void Get_dispdata(void);
54 //extern void Clear_disp_memory(void);
55 //extern void Conver_hnetdata(float temp_data);
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 2
56 //extern void Convert_lnetdata(float temp_data);
57 /**************************************/
58 /* disp data define */
59 /**************************************/
60
61
62 /*******************************/
63 /*******************************/
64
65 void (*const code para_disp[])(void)=
66 {
67 Moment_disp , //shun shi liu liang
68 P_count_disp, //zhen xiang lei ji
69 N_count_disp, //fan xiang lei ji
70 Net_count_disp , //jing lei ji
71 Low_count_disp , //di wei zhong liang
72 Alarm_up_disp , //bao jing shanxian
73 Alarm_down_disp, //bao jing xiaxian
74 Sys_mima_disp //disp system mima (1 2 3 4) only press left and mid key
75 };
76
77 /**************************************/
78 /**************************************/
79
80 void (*const code setpara_disp[])(void)=
81 {
82 Password_disp ,
83 Reset_count_disp,
84 Range_disp,
85 Pulse_disp,
86 Filter_disp,
87 Small_cut_disp,
88 Ulimit_alarm_disp,
89 Dlimit_alarm_disp,
90 Sensor_k_disp,
91 Set_4ma_refence,
92 Set_zero_offset,
93 Change_code_disp
94 };
95
96 /**************************************/
97 /**************************************/
98
99 void (*const *const code disp_tbl[])(void)=
100 {
101 para_disp,
102 setpara_disp
103 };
104 /**************************************/
105 /**************************************/
106
107 void Moment_disp(void)
108 {
109 1
110 1 if(disp_time != 0)
111 1 disp_time--;
112 1 else
113 1 {
114 2 disp_time = TM500MS;
115 2 Get_dispdata(moment_data);
116 2 if(liuxiang_F == REVERSE)
117 2 disp_memory[4] = 0x01; //disp_-
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 3
118 2 else
119 2 disp_memory[4] = disp_BLANK ;
120 2
121 2 disp_memory[5] = disp_A ;
122 2 }
123 1
124 1
125 1 return;
126 1 }
127 /**************************************/
128 /*zenxiang leiji */
129 /**************************************/
130
131 void P_count_disp(void)
132 {
133 1
134 1 if(disp_time != 0)
135 1 disp_time--;
136 1 else
137 1 {
138 2
139 2 if(disp_blink_time == 0)
140 2 {
141 3 disp_blink_time = TM4S;
142 3
143 3 }
144 2 if(disp_blink_time != 0)
145 2 disp_blink_time--;
146 2 if(disp_blink_time >= TM4S/2)
147 2 {
148 3 // high_p_count_data = Get_high_data(p_count_data);
149 3 // Convert_hdata(high_p_count_data);
150 3 Convert_hdata(Get_high_data(p_count_data));
151 3
152 3 // disp_memory[4] = disp_BLANK ;
153 3 disp_memory[5] = disp_C ;
154 3
155 3 }
156 2
157 2 else
158 2 {
159 3
160 3 // low_p_count_data = Get_low_data(p_count_data);
161 3 // Convert_ldata(low_p_count_data);
162 3 Convert_ldata(Get_low_data(p_count_data));
163 3 disp_memory[4] = disp_BLANK ;
164 3 disp_memory[5] = disp_BLANK ;
165 3 }
166 2 }
167 1 return;
168 1 }
169
170 /**************************************/
171 /**************************************/
172
173 void N_count_disp(void)
174 {
175 1 if(disp_time != 0)
176 1 disp_time--;
177 1 else
178 1 {
179 2
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 4
180 2 if(disp_blink_time == 0)
181 2 {
182 3 disp_blink_time = TM4S;
183 3
184 3
185 3 }
186 2 if(disp_blink_time != 0)
187 2 disp_blink_time--;
188 2 if(disp_blink_time >= TM4S/2)
189 2 {
190 3 // high_n_count_data = Get_high_data(n_count_data);
191 3 // Convert_hdata(high_n_count_data);
192 3 Convert_hdata(Get_high_data(n_count_data));
193 3
194 3 // disp_memory[4] = 0x01 ; //disp_-
195 3
196 3 disp_memory[5] = disp_E ;
197 3
198 3 }
199 2
200 2 else
201 2 {
202 3
203 3 // low_n_count_data = Get_low_data(n_count_data);
204 3 // Convert_ldata(low_n_count_data);
205 3 Convert_ldata(Get_low_data(n_count_data));
206 3 disp_memory[4] = disp_BLANK;
207 3 disp_memory[5] = disp_BLANK;
208 3 }
209 2
210 2 }
211 1 return;
212 1 }
213 /**************************************/
214 /**************************************/
215
216 void Net_count_disp(void)
217 {
218 1 if(disp_time != 0)
219 1 disp_time--;
220 1 else
221 1 {
222 2
223 2
224 2 if(disp_blink_time == 0)
225 2 {
226 3 disp_blink_time = TM4S;
227 3
228 3 }
229 2 if(disp_blink_time != 0)
230 2 disp_blink_time--;
231 2 if(disp_blink_time >= TM4S/2)
232 2 {
233 3 // high_net_count_data = Get_high_data(net_count_data);
234 3 // Convert_hdata(high_net_count_data);
235 3 Convert_hdata(Get_high_data(fabs(net_count_data)));
236 3 /* if( net_count_data< 0 )
237 3 disp_memory[4] = 0x01 ; //disp_-
238 3 else
239 3 disp_memory[4] = disp_BLANK ; */
240 3 disp_memory[5] = disp_H ;
241 3
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 5
242 3 }
243 2
244 2 else
245 2 {
246 3
247 3 // low_net_count_data = Get_low_data(net_count_data);
248 3 // Convert_ldata(low_net_count_data);
249 3
250 3 Convert_ldata(Get_low_data(fabs(net_count_data)));
251 3 if(net_count_data < 0)
252 3 disp_memory[4] = 0x01;
253 3 else
254 3 disp_memory[4] = disp_BLANK;
255 3 disp_memory[5] = disp_BLANK;
256 3 }
257 2 }
258 1 return;
259 1 }
260 /**************************************/
261 /**************************************/
262
263 void Low_count_disp(void)
264 {
265 1 if(disp_time != 0)
266 1 disp_time--;
267 1 else
268 1 {
269 2 disp_time = TM500MS ;
270 2
271 2 // low_net_count_data = Get_low_data(net_count_data);
272 2 // Convert_ldata(low_net_count_data);
273 2
274 2 Convert_ldata(Get_low_data(fabs(net_count_data)));
275 2 if(net_count_data < 0)
276 2 disp_memory[4] = 0x01 ;
277 2 else
278 2 disp_memory[4] = disp_BLANK;
279 2 disp_memory[5] = disp_F ;
280 2
281 2 }
282 1 return;
283 1 }
284 /**************************************/
285 /**************************************/
286
287 void Alarm_up_disp(void)
288 {
289 1 if(disp_time != 0)
290 1 disp_time--;
291 1 else
292 1 {
293 2 disp_time = TM500MS ;
294 2
295 2 #ifndef DISP_DECIMAL
296 2 disp_memory[5]=disp_P;
297 2 disp_memory[4]=disp_BLANK;
298 2
299 2 disp_memory[3]=disp_BLANK;
300 2 disp_memory[0]=disp_data[Read1B(0x12,0)];
301 2 disp_memory[1]=disp_data[Read1B(0x13,0)];
302 2 disp_memory[2]=disp_data[Read1B(0x14,0)];
303 2
C51 COMPILER V6.02 M7219TBL 09/10/2005 17:11:40 PAGE 6
304 2
305 2
306 2 #else
Get_dispdata(alarm_up_data);
disp_memory[3]= disp_BLANK;
disp_memory[4]=disp_BLANK;
disp_memory[5]=disp_P;
#endif
312 2 }
313 1 return;
314 1 }
315 /**************************************/
316 /**************************************/
317
318 void Alarm_down_disp(void)
319 {
320 1 if(disp_time != 0)
321 1 disp_time--;
322 1 else
323 1 {
324 2 disp_time = TM500MS;
325 2
326 2 #ifndef DISP_DECIMAL
327 2 disp_memory[5] = disp_U;
328 2 disp_memory[4] = disp_BLANK;
329 2
330 2 disp_memory[3] = disp_BLANK;
331 2 disp_memory[2] = disp_BLANK;
332 2 disp_memory[1] = disp_data[Read1B(0x16,0)];
333 2 disp_memory[0] = disp_data[Read1B(0x15,0)];
334 2
335 2 #else
Get_dispdata(alarm_dm_data);
disp_memory[5] = disp_U;
disp_memory[4] = disp_BLANK;
#endif
342 2 }
343 1 return;
344 1 }
345
346
347 /**************************************/
348 /**************************************/
349
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -