Browse Source

修改注释

master
htujun 3 years ago
parent
commit
8824235d1b
  1. 830
      main.LST
  2. BIN
      main.OBJ
  3. 207
      main.c
  4. BIN
      pro
  5. 1781
      pro.M51
  6. 11
      pro.build_log.htm
  7. 606
      pro.hex
  8. 62
      pro.uvgui.QY

830
main.LST

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 1
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE MAIN
@ -62,22 +62,21 @@ line level source @@ -62,22 +62,21 @@ line level source
53 };
54
55 struct UserInfo userInfo;
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 2
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 2
56
57 void LcdDisplay();
58 void LcdDisplay1();
59 void Delay10ms(void);
60
61 #define SlaveAddress 0x46 //¶¨ÒåÆ÷¼þÔÚIIC×ÜÏßÖеĴӵØÖ·,¸ù¾ÝALT ADDRESSµ
-ØÖ·Òý½Å²»Í¬ÐÞ¸Ä
62 //ALT ADDRESSÒý½Å½ÓµØʱµØַΪ0x46£¬½ÓµçԴʱµØÖ
-·Îª0xB8
61 #define SlaveAddress 0x46 //定义器件在IIC总线中的从地å<EFBFBD>€,æ ¹æ<EFBFBD>®ALT ADDRESS地å<EFBFBD>€å¼•è„šä¸<EFBFBD>å
-<EFBFBD>Œä¿®æ”¹
62 //ALT ADDRESS引脚接地时地å<EFBFBD>€ä¸º0x46,接电æº<EFBFBD>时地å<EFBFBD>€ä¸º0xB8
63 typedef unsigned char BYTE;
64 typedef unsigned short WORD;
65
66 BYTE BUF[8]; //½ÓÊÕÊý¾Ý»º´æÇø
67 int dis_data; //±äÁ¿
66 BYTE BUF[8]; //接收数æ<EFBFBD>®ç¼“存区
67 int dis_data; //å<EFBFBD>˜é‡<EFBFBD>
68
69 void delay_nms(unsigned int k);
70 void InitLcd();
@ -88,22 +87,21 @@ line level source @@ -88,22 +87,21 @@ line level source
75 void DisplayOneChar(uchar X,uchar Y,uchar DData);
76 void conversion(uint temp_data);
77
78 void Single_Write_BH1750(uchar REG_Address); //µ¥¸öдÈëÊý¾Ý
79 uchar Single_Read_BH1750(uchar REG_Address); //µ¥¸ö¶ÁÈ¡ÄÚ²¿¼Ä´æÆ÷Êý¾Ý
80 void Multiple_Read_BH1750(); //Á¬ÐøµÄ¶ÁÈ¡ÄÚ²¿¼Ä´æÆ÷Êý
-¾Ý
78 void Single_Write_BH1750(uchar REG_Address); //å<EFBFBD>•ä¸ªå†™å…¥æ•°æ<EFBFBD>®
79 uchar Single_Read_BH1750(uchar REG_Address); //å<EFBFBD>•ä¸ªè¯»å<EFBFBD>–内部寄存器数æ<EFBFBD>®
80 void Multiple_Read_BH1750(); //连续的读å<EFBFBD>–内部寄存器数æ<EFBFBD>®
81 //------------------------------------
82 void Delay5us();
83 void Delay5ms();
84 void BH1750_Start(); //ÆðʼÐźÅ
85 void BH1750_Stop(); //Í£Ö¹ÐźÅ
86 void BH1750_SendACK(bit ack); //Ó¦´ðACK
87 bit BH1750_RecvACK(); //¶Áack
88 void BH1750_SendByte(BYTE dat); //IICµ¥¸ö×Ö½Úд
89 BYTE BH1750_RecvByte(); //IICµ¥¸ö×Ö½Ú¶Á
84 void BH1750_Start(); //起始信å<EFBFBD>·
85 void BH1750_Stop(); //å<EFBFBD>œæ­¢ä¿¡å<EFBFBD>·
86 void BH1750_SendACK(bit ack); //应ç­ACK
87 bit BH1750_RecvACK(); //读ack
88 void BH1750_SendByte(BYTE dat); //IICå<EFBFBD>•ä¸ªå­—节写
89 BYTE BH1750_RecvByte(); //IICå<EFBFBD>•ä¸ªå­—节读
90
91
92 //ºÁÃëÑÓʱ**************************
92 //毫秒延时**************************
93 void delay_nms(unsigned int k)
94 {
95 1 unsigned int i,j;
@ -126,100 +124,100 @@ line level source @@ -126,100 +124,100 @@ line level source
112 1 WORD n = 560;
113 1
114 1 while (n--);
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 3
115 1 }
116
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 3
117 /**************************************
118 ÆðʼÐźÅ
118 起始信å<EFBFBD>·
119 **************************************/
120 void BH1750_Start()
121 {
122 1 SDA1 = 1; //À­¸ßÊý¾ÝÏß
123 1 SCL1 = 1; //À­¸ßʱÖÓÏß
124 1 Delay5us(); //ÑÓʱ
125 1 SDA1 = 0; //²úÉúϽµÑØ
126 1 Delay5us(); //ÑÓʱ
127 1 SCL1 = 0; //À­µÍʱÖÓÏß
122 1 SDA1 = 1; //拉高数æ<EFBFBD>®çº¿
123 1 SCL1 = 1; //拉高时钟线
124 1 Delay5us(); //延时
125 1 SDA1 = 0; //产生下é™<EFBFBD>沿
126 1 Delay5us(); //延时
127 1 SCL1 = 0; //拉低时钟线
128 1 }
129
130 /**************************************
131 Í£Ö¹ÐźÅ
131 å<EFBFBD>œæ­¢ä¿¡å<EFBFBD>·
132 **************************************/
133 void BH1750_Stop()
134 {
135 1 SDA1 = 0; //À­µÍÊý¾ÝÏß
136 1 SCL1 = 1; //À­¸ßʱÖÓÏß
137 1 Delay5us(); //ÑÓʱ
138 1 SDA1 = 1; //²úÉúÉÏÉýÑØ
139 1 Delay5us(); //ÑÓʱ
135 1 SDA1 = 0; //拉低数æ<EFBFBD>®çº¿
136 1 SCL1 = 1; //拉高时钟线
137 1 Delay5us(); //延时
138 1 SDA1 = 1; //产生上å<EFBFBD>‡æ²¿
139 1 Delay5us(); //延时
140 1 }
141
142 /**************************************
143 ·¢ËÍÓ¦´ðÐźÅ
144 Èë¿Ú²ÎÊý:ack (0:ACK 1:NAK)
143 å<EFBFBD>‘é€<EFBFBD>应答信å<EFBFBD>·
144 å…¥å<EFBFBD>£å<EFBFBD>‚æ•°:ack (0:ACK 1:NAK)
145 **************************************/
146 void BH1750_SendACK(bit ack)
147 {
148 1 SDA1 = ack; //дӦ´ðÐźÅ
149 1 SCL1 = 1; //À­¸ßʱÖÓÏß
150 1 Delay5us(); //ÑÓʱ
151 1 SCL1 = 0; //À­µÍʱÖÓÏß
152 1 Delay5us(); //ÑÓʱ
148 1 SDA = ack; //写应答信å<EFBFBD>·
149 1 SCL = 1; //拉高时钟线
150 1 Delay5us(); //延时
151 1 SCL = 0; //拉低时钟线
152 1 Delay5us(); //延时
153 1 }
154
155 /**************************************
156 ½ÓÊÕÓ¦´ðÐźÅ
156 接收应答信å<EFBFBD>·
157 **************************************/
158 bit BH1750_RecvACK()
159 {
160 1 SCL1 = 1; //À­¸ßʱÖÓÏß
161 1 Delay5us(); //ÑÓʱ
162 1 CY = SDA1; //¶ÁÓ¦´ðÐźÅ
163 1 SCL1 = 0; //À­µÍʱÖÓÏß
164 1 Delay5us(); //ÑÓʱ
160 1 SCL = 1; //拉高时钟线
161 1 Delay5us(); //延时
162 1 CY = SDA; //读应答信å<EFBFBD>·
163 1 SCL = 0; //拉低时钟线
164 1 Delay5us(); //延时
165 1
166 1 return CY;
167 1 }
168
169 /**************************************
170 ÏòIIC×ÜÏß·¢ËÍÒ»¸ö×Ö½ÚÊý¾Ý
170 å<EFBFBD>‘IIC总线å<EFBFBD>‘é€<EFBFBD>一个字节数æ<EFBFBD>®
171 **************************************/
172 void BH1750_SendByte(BYTE dat)
173 {
174 1 BYTE i;
175 1
176 1 for (i=0; i<8; i++) //8λ¼ÆÊýÆ÷
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 4
176 1 for (i=0; i<8; i++) //8ä½<EFBFBD>计数器
177 1 {
178 2 dat <<= 1; //ÒƳöÊý¾ÝµÄ×î¸ßλ
179 2 SDA1 = CY; //ËÍÊý¾Ý¿Ú
180 2 SCL1 = 1; //À­¸ßʱÖÓÏß
181 2 Delay5us(); //ÑÓʱ
182 2 SCL1 = 0; //À­µÍʱÖÓÏß
183 2 Delay5us(); //ÑÓʱ
178 2 dat <<= 1; //移出数æ<EFBFBD>®çš„最高ä½<EFBFBD>
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 4
179 2 SDA = CY; //é€<EFBFBD>æ•°æ<EFBFBD>®å<EFBFBD>£
180 2 SCL = 1; //拉高时钟线
181 2 Delay5us(); //延时
182 2 SCL = 0; //拉低时钟线
183 2 Delay5us(); //延时
184 2 }
185 1 BH1750_RecvACK();
186 1 }
187
188 /**************************************
189 ´ÓIIC×ÜÏß½ÓÊÕÒ»¸ö×Ö½ÚÊý¾Ý
189 从IIC总线接收一个字节数æ<EFBFBD>®
190 **************************************/
191 BYTE BH1750_RecvByte()
192 {
193 1 BYTE i;
194 1 BYTE dat = 0;
195 1
196 1 SDA1 = 1; //ʹÄÜÄÚ²¿ÉÏÀ­,×¼±¸¶ÁÈ¡Êý¾Ý,
197 1 for (i=0; i<8; i++) //8λ¼ÆÊýÆ÷
196 1 SDA = 1; //使能内部上拉,准备读å<EFBFBD>–æ•°æ<EFBFBD>®,
197 1 for (i=0; i<8; i++) //8ä½<EFBFBD>计数器
198 1 {
199 2 dat <<= 1;
200 2 SCL1 = 1; //À­¸ßʱÖÓÏß
201 2 Delay5us(); //ÑÓʱ
202 2 dat |= SDA1; //¶ÁÊý¾Ý
203 2 SCL1 = 0; //À­µÍʱÖÓÏß
204 2 Delay5us(); //ÑÓʱ
200 2 SCL = 1; //拉高时钟线
201 2 Delay5us(); //延时
202 2 dat |= SDA; //读数æ<EFBFBD>®
203 2 SCL = 0; //拉低时钟线
204 2 Delay5us(); //延时
205 2 }
206 1 return dat;
207 1 }
@ -228,390 +226,390 @@ line level source @@ -228,390 +226,390 @@ line level source
210
211 void Single_Write_BH1750(uchar REG_Address)
212 {
213 1 BH1750_Start(); //ÆðʼÐźÅ
214 1 BH1750_SendByte(SlaveAddress); //·¢ËÍÉ豸µØÖ·+дÐźÅ
215 1 BH1750_SendByte(REG_Address); //ÄÚ²¿¼Ä´æÆ÷µØÖ·£¬
216 1 // BH1750_SendByte(REG_data); //ÄÚ²¿¼Ä´æÆ÷Êý¾Ý£¬
217 1 BH1750_Stop(); //·¢ËÍÍ£Ö¹ÐźÅ
213 1 BH1750_Start(); //起始信å<EFBFBD>·
214 1 BH1750_SendByte(SlaveAddress); //å<EFBFBD>‘é€<EFBFBD>设备地å<EFBFBD>€+写信å<EFBFBD>·
215 1 BH1750_SendByte(REG_Address); //内部寄存器地å<EFBFBD>€ï¼Œ
216 1 // BH1750_SendByte(REG_data); //内部寄存器数æ<EFBFBD>®ï¼Œ
217 1 BH1750_Stop(); //å<EFBFBD>‘é€<EFBFBD>å<EFBFBD>œæ­¢ä¿¡å<EFBFBD>·
218 1 }
219
220 //********µ¥×Ö½Ú¶ÁÈ¡*****************************************
221 /*
222 uchar Single_Read_BH1750(uchar REG_Address)
223 { uchar REG_data;
224 BH1750_Start(); //ÆðʼÐźÅ
225 BH1750_SendByte(SlaveAddress); //·¢ËÍÉ豸µØÖ·+дÐźÅ
226 BH1750_SendByte(REG_Address); //·¢ËÍ´æ´¢µ¥ÔªµØÖ·£¬´Ó0¿ªÊ¼
227 BH1750_Start(); //ÆðʼÐźÅ
228 BH1750_SendByte(SlaveAddress+1); //·¢ËÍÉ豸µØÖ·+¶ÁÐźÅ
229 REG_data=BH1750_RecvByte(); //¶Á³ö¼Ä´æÆ÷Êý¾Ý
230 BH1750_SendACK(1);
231 BH1750_Stop(); //Í£Ö¹ÐźÅ
232 return REG_data;
233 }
234 */
235 //*********************************************************
236 //
237 //Á¬Ðø¶Á³öBH1750ÄÚ²¿Êý¾Ý
238 //
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 5
220
221
222 //*********************************************************
223 //
224 //连续读出BH1750内部数æ<EFBFBD>®
225 //
226 //*********************************************************
227 void Multiple_read_BH1750(void)
228
229 { uchar i;
230 1 BH1750_Start(); //起始信å<EFBFBD>·
231 1 BH1750_SendByte(SlaveAddress+1); //å<EFBFBD>‘é€<EFBFBD>设备地å<EFBFBD>€+读信å<EFBFBD>·
232 1
233 1 for (i=0; i<3; i++) //连续读å<EFBFBD>–2个地å<EFBFBD>€æ•°æ<EFBFBD>®ï¼Œå­˜å‚¨ä¸­BUF
234 1 {
235 2 BUF[i] = BH1750_RecvByte(); //BUF[0]存储0x32地å<EFBFBD>€ä¸­çš„æ•°æ<EFBFBD>®
236 2 if (i == 3)
237 2 {
238 3
239 3 BH1750_SendACK(1); //最å<EFBFBD>Žä¸€ä¸ªæ•°æ<EFBFBD>®éœ€è¦<EFBFBD>回NOACK
240 3 }
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 5
239 //*********************************************************
240 void Multiple_read_BH1750(void)
241
242 { uchar i;
243 1 BH1750_Start(); //ÆðʼÐźÅ
244 1 BH1750_SendByte(SlaveAddress+1); //·¢ËÍÉ豸µØÖ·+¶ÁÐźÅ
245 1
246 1 for (i=0; i<3; i++) //Á¬Ðø¶ÁÈ¡2¸öµØÖ·Êý¾Ý£¬´æ´¢ÖÐBUF
247 1 {
248 2 BUF[i] = BH1750_RecvByte(); //BUF[0]´æ´¢0x32µØÖ·ÖеÄÊý¾Ý
249 2 if (i == 3)
250 2 {
251 3
252 3 BH1750_SendACK(1); //×îºóÒ»¸öÊý¾ÝÐèÒª»ØNOACK
253 3 }
254 2 else
255 2 {
256 3 BH1750_SendACK(0); //»ØÓ¦ACK
257 3 }
258 2 }
259 1
260 1 BH1750_Stop(); //Í£Ö¹ÐźÅ
261 1 Delay5ms();
262 1 }
263
264
265 //³õʼ»¯BH1750£¬¸ù¾ÝÐèÒªÇë²Î¿¼pdf½øÐÐÐÞ¸Ä****
266 void Init_BH1750()
267 {
268 1 Single_Write_BH1750(0x01);
269 1
241 2 else
242 2 {
243 3 BH1750_SendACK(0); //回应ACK
244 3 }
245 2 }
246 1
247 1 BH1750_Stop(); //å<EFBFBD>œæ­¢ä¿¡å<EFBFBD>·
248 1 Delay5ms();
249 1 }
250
251
252 //åˆ<EFBFBD>始化BH1750
253 void Init_BH1750()
254 {
255 1 Single_Write_BH1750(0x01);
256 1
257 1 }
258
259 // 串å<EFBFBD>£åˆ<EFBFBD>始化
260 void Uart_Init()
261 {
262 1 TMOD = 0x20 | 0x01;
263 1 SCON = 0x50;
264 1 TH1 = 0xFD;
265 1 TL1 = TH1;
266 1 PCON = 0x00;
267 1 EA = 1;
268 1 ES = 1;
269 1 TR1 = 1;
270 1 }
271
272 void Uart_Init()
272 void us_delay(uchar t)
273 {
274 1 TMOD = 0x20 | 0x01;
275 1 SCON = 0x50;
276 1 TH1 = 0xFD;
277 1 TL1 = TH1;
278 1 PCON = 0x00;
279 1 EA = 1;
280 1 ES = 1;
281 1 TR1 = 1;
282 1 }
283
284 void us_delay(uchar t)
285 {
286 1 while(t--);
287 1 }
288
289 void Send_Uart(uchar value)
290 {
291 1 ES=0;
292 1 TI=0;
293 1 SBUF=value;
294 1 while(TI==0);
295 1 TI=0;
296 1 ES=1;
297 1 }
298
299 void Bluetooth_Set(uchar *puf)
274 1 while(t--);
275 1 }
276
277 void Send_Uart(uchar value)
278 {
279 1 ES=0;
280 1 TI=0;
281 1 SBUF=value;
282 1 while(TI==0);
283 1 TI=0;
284 1 ES=1;
285 1 }
286
287 void Bluetooth_Set(uchar *puf)
288 {
289 1 while(*puf!='\0')
290 1 {
291 2 Send_Uart(*puf);
292 2 us_delay(5);
293 2 puf++;
294 2 }
295 1 }
296
297
298 // 获å<EFBFBD>–æ•°æ<EFBFBD>®
299 void Detection()
300 {
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 6
301 1 static int num = 0;
302 1 int i = 0;
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 6
301 1 while(*puf!='\0')
302 1 {
303 2 Send_Uart(*puf);
304 2 us_delay(5);
305 2 puf++;
306 2 }
307 1 }
308
309 void Detection()
310 {
311 1 static int num = 0;
312 1 int i = 0;
313 1 Single_Write_BH1750(0x01);
314 1 Single_Write_BH1750(0x10);
315 1 delay_nms(180);
316 1 Multiple_Read_BH1750();
317 1 dis_data=BUF[0];
318 1 dis_data=(dis_data<<8)+BUF[1];
319 1 userInfo.Light = (float)dis_data/1.2;
320 1
321 1 userInfo.temp = Temper_change();
322 1 userInfo.temp /= 100;
323 1 if(key1==0)
324 1 {
325 2 Delay10ms();
326 2 if(key1==0){
327 3 if(userInfo.set == 0){
328 4 if(userInfo.model == 0) userInfo.model = 1;
329 4 else userInfo.model = 0;
330 4 if(userInfo.model == 1) LED4 = 1, LED5 = 0;
331 4 else LED4 = 0, LED5 = 1;
332 4 }
333 3 }
334 2 while((i<50)&&(key1==0)){
335 3 Delay10ms();
336 3 i++;
337 3 }
338 2 i=0;
339 2 }
340 1
341 1 if(key2==0)
342 1 {
343 2 Delay10ms();
344 2 if(key2==0){
345 3 if(userInfo.model){
346 4 led_num++;
347 4 if(led_num >= 5) led_num = 0;
348 4 }else{
349 4 if(userInfo.set == 0) userInfo.set = 1;
350 4 else userInfo.set = 0;
351 4 cut = 0;
352 4 }
353 3 LcdWriteCom(0x01); //清屏
354 3 }
355 2 while((i<50)&&(key2==0)){
356 3 Delay10ms();
357 3 i++;
358 3 }
359 2 i=0;
360 2 }
361 1
362 1 if(IN==0)
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 7
303 1 Single_Write_BH1750(0x01);
304 1 Single_Write_BH1750(0x10);
305 1 delay_nms(180);
306 1 Multiple_Read_BH1750();
307 1 dis_data=BUF[0];
308 1 dis_data=(dis_data<<8)+BUF[1];
309 1 userInfo.Light = (float)dis_data/1.2; // 获å<EFBFBD>–光照值
310 1
311 1 userInfo.temp = Temper_change();
312 1 userInfo.temp /= 100; // 获å<EFBFBD>–温度,去除å°<EFBFBD>数部分
313 1
314 1 // 按键一
315 1 if(key1==0)
316 1 {
317 2 Delay10ms();
318 2 if(key1==0){
319 3 if(userInfo.set == 0){
320 4 if(userInfo.model == 0) userInfo.model = 1;
321 4 else userInfo.model = 0;
322 4 if(userInfo.model == 1) LED4 = 1, LED5 = 0;
323 4 else LED4 = 0, LED5 = 1;
324 4 }
325 3 }
326 2 while((i<50)&&(key1==0)){
327 3 Delay10ms();
328 3 i++;
329 3 }
330 2 i=0;
331 2 }
332 1
333 1 // 按键二
334 1 if(key2==0)
335 1 {
336 2 Delay10ms();
337 2 if(key2==0){
338 3 if(userInfo.model){
339 4 led_num++;
340 4 if(led_num >= 5) led_num = 0;
341 4 }else{
342 4 if(userInfo.set == 0) userInfo.set = 1;
343 4 else userInfo.set = 0;
344 4 cut = 0;
345 4 }
346 3 LcdWriteCom(0x01); //清å±<EFBFBD>
347 3 }
348 2 while((i<50)&&(key2==0)){
349 3 Delay10ms();
350 3 i++;
351 3 }
352 2 i=0;
353 2 }
354 1
355 1 if(IN==0) // 光电门 进
356 1 {
357 2 Delay10ms();
358 2 if(IN==0){ // 去抖
359 3 userInfo.num++;
360 3 if(userInfo.num > 99) userInfo.num = 99;
361 3 }
362 2 while((i<50)&&(IN==0)){
363 3 Delay10ms();
364 3 i++;
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 7
363 1 {
364 2 Delay10ms();
365 2 if(IN==0){
366 3 userInfo.num++;
367 3 if(userInfo.num > 99) userInfo.num = 99;
368 3 }
369 2 while((i<50)&&(IN==0)){
370 3 Delay10ms();
371 3 i++;
372 3 }
373 2 i=0;
374 2 }
375 1
376 1 if(OUT==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
377 1 {
378 2 Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
379 2 if(OUT==0){
380 3 userInfo.num--;
381 3 if(userInfo.num < 0) userInfo.num = 0;
382 3 }
383 2 while((i<50)&&(OUT==0)){
384 3 Delay10ms();
385 3 i++;
386 3 }
387 2 i=0;
388 2 }
389 1
390 1 if(key3==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
391 1 {
392 2 Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
393 2 if(key3==0){
394 3 cut++;
395 3 if(cut >= 4) cut = 0;
396 3 }
397 2 while((i<50)&&(key3==0)){
398 3 Delay10ms();
399 3 i++;
400 3 }
401 2 i=0;
402 2 }
403 1
404 1 if(key4==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
405 1 {
406 2 Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
407 2 if(key4==0){
408 3 if(cut == 0){
409 4 userInfo.time[0].hour++;
410 4 if(userInfo.time[0].hour >= 24) userInfo.time[0].hour = 0;
411 4 }else if(cut == 1){
412 4 userInfo.time[0].min++;
413 4 if(userInfo.time[0].min >= 59) userInfo.time[0].min = 0;
414 4 }else if(cut == 2){
415 4 userInfo.time[1].hour++;
416 4 if(userInfo.time[1].hour >= 24) userInfo.time[1].hour = 0;
417 4 }else if(cut == 3){
418 4 userInfo.time[1].min++;
419 4 if(userInfo.time[1].min >= 59) userInfo.time[1].min = 0;
420 4 }
421 3 while((i<50)&&(key4==0)){
422 4 Delay10ms();
423 4 i++;
424 4 }
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 8
365 3 }
366 2 i=0;
367 2 }
368 1
369 1
370 1 if(OUT==0) // 光电门 出
371 1 {
372 2 Delay10ms();
373 2 if(OUT==0){ // 去抖
374 3 userInfo.num--;
375 3 if(userInfo.num < 0) userInfo.num = 0;
376 3 }
377 2 while((i<50)&&(OUT==0)){
378 3 Delay10ms();
379 3 i++;
380 3 }
381 2 i=0;
382 2 }
383 1
384 1
385 1 if(key3==0) // 按键3
386 1 {
387 2 Delay10ms();
388 2 if(key3==0){
389 3 cut++;
390 3 if(cut >= 4) cut = 0; // 切æ<EFBFBD>¢ä¿®æ”¹çš„对象
391 3 }
392 2 while((i<50)&&(key3==0)){
393 3 Delay10ms();
394 3 i++;
395 3 }
396 2 i=0;
397 2 }
398 1
399 1 // 按键四
400 1 if(key4==0)
401 1 {
402 2 Delay10ms();
403 2 if(key4==0){
404 3 // æ ¹æ<EFBFBD>®cut的值,修改ä¸<EFBFBD>å<EFBFBD>Œçš„对象
405 3 if(cut == 0){
406 4 userInfo.time[0].hour++;
407 4 if(userInfo.time[0].hour >= 24) userInfo.time[0].hour = 0;
408 4 }else if(cut == 1){
409 4 userInfo.time[0].min++;
410 4 if(userInfo.time[0].min >= 59) userInfo.time[0].min = 0;
411 4 }else if(cut == 2){
412 4 userInfo.time[1].hour++;
413 4 if(userInfo.time[1].hour >= 24) userInfo.time[1].hour = 0;
414 4 }else if(cut == 3){
415 4 userInfo.time[1].min++;
416 4 if(userInfo.time[1].min >= 59) userInfo.time[1].min = 0;
417 4 }
418 3 while((i<50)&&(key4==0)){
419 4 Delay10ms();
420 4 i++;
421 4 }
422 3 i=0;
423 3 }
424 2 }
425 1 }
*** WARNING C280 IN LINE 301 OF main.c: 'num': unreferenced local variable
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 8
425 3 i=0;
426 3 }
427 2 }
428 1 }
*** WARNING C280 IN LINE 311 OF main.c: 'num': unreferenced local variable
429
430
431 int getTimeResult()
432 {
433 1 int result = 1;
434 1 struct Time Nowtime;
435 1
436 1 Nowtime.hour = TIME[2]/16 * 10 + (TIME[2]&0x0f);
437 1 Nowtime.min = TIME[1]/16 * 10 + (TIME[1]&0x0f);
438 1
439 1 if(Nowtime.hour < userInfo.time[0].hour || Nowtime.hour > userInfo.time[1].hour) return 0;
440 1 if(Nowtime.hour == userInfo.time[0].hour && Nowtime.min < userInfo.time[0].min) return 0;
441 1 if(Nowtime.hour == userInfo.time[1].hour && Nowtime.min > userInfo.time[1].min) return 0;
442 1
443 1 return result;
444 1 }
445
446
447 void Dispose()
448 {
449 1
450 1 if(userInfo.model == 0){
451 2 if(getTimeResult() && userInfo.Light < 100){
452 3 if(userInfo.num < 10 && userInfo.num > 0) LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 1;
453 3 else if(userInfo.num >= 10 && userInfo.num < 20) LED0 = 0, LED1 = 0, LED2 = 1 ,LED3 = 1;
454 3 else if(userInfo.num >= 20 && userInfo.num < 30) LED0 = 0, LED1 = 1, LED2 = 1 ,LED3 = 1;
455 3 else if(userInfo.num >= 30) LED0 = 1, LED1 = 1, LED2 = 1 ,LED3 = 1;
456 3 else LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
457 3 }else{
458 3 LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
459 3 }
460 2 }else{
461 2 if(led_num){
462 3 if(led_num == 1) LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 1;
463 3 else if(led_num == 2) LED0 = 0, LED1 = 0, LED2 = 1 ,LED3 = 1;
464 3 else if(led_num == 3) LED0 = 0, LED1 = 1, LED2 = 1 ,LED3 = 1;
465 3 else if(led_num == 4) LED0 = 1, LED1 = 1, LED2 = 1 ,LED3 = 1;
466 3 }else{
467 3 LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
468 3 }
469 2 }
470 1 LED4 = userInfo.model;
471 1 }
472
426
427
428 // 获å<EFBFBD>–时间是å<EFBFBD>¦è¾¾åˆ° 返回1为定时时间到
429 int getTimeResult()
430 {
431 1 int result = 1;
432 1 struct Time Nowtime;
433 1
434 1 Nowtime.hour = TIME[2]/16 * 10 + (TIME[2]&0x0f);
435 1 Nowtime.min = TIME[1]/16 * 10 + (TIME[1]&0x0f);
436 1
437 1 if(Nowtime.hour < userInfo.time[0].hour || Nowtime.hour > userInfo.time[1].hour) return 0;
438 1 if(Nowtime.hour == userInfo.time[0].hour && Nowtime.min < userInfo.time[0].min) return 0;
439 1 if(Nowtime.hour == userInfo.time[1].hour && Nowtime.min > userInfo.time[1].min) return 0;
440 1
441 1 return result;
442 1 }
443
444
445 // 点ç<EFBFBD>¯
446 void Dispose()
447 {
448 1
449 1 if(userInfo.model == 0){
450 2 if(getTimeResult() && userInfo.Light < 100){
451 3 if(userInfo.num < 10 && userInfo.num > 0) LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 1;
452 3 else if(userInfo.num >= 10 && userInfo.num < 20) LED0 = 0, LED1 = 0, LED2 = 1 ,LED3 = 1;
453 3 else if(userInfo.num >= 20 && userInfo.num < 30) LED0 = 0, LED1 = 1, LED2 = 1 ,LED3 = 1;
454 3 else if(userInfo.num >= 30) LED0 = 1, LED1 = 1, LED2 = 1 ,LED3 = 1;
455 3 else LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
456 3 }else{
457 3 LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
458 3 }
459 2 }else{
460 2 if(led_num){
461 3 if(led_num == 1) LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 1;
462 3 else if(led_num == 2) LED0 = 0, LED1 = 0, LED2 = 1 ,LED3 = 1;
463 3 else if(led_num == 3) LED0 = 0, LED1 = 1, LED2 = 1 ,LED3 = 1;
464 3 else if(led_num == 4) LED0 = 1, LED1 = 1, LED2 = 1 ,LED3 = 1;
465 3 }else{
466 3 LED0 = 0, LED1 = 0, LED2 = 0 ,LED3 = 0;
467 3 }
468 2 }
469 1 LED4 = userInfo.model;
470 1 }
471
472 // main
473 void main()
474 {
475 1 int i = 0;
476 1 uchar str[10];
477 1 Ds1302Init();
477 1 Ds1302Init(); // 时钟åˆ<EFBFBD>始化
478 1 Uart_Init();
479 1 LcdInit();
479 1 LcdInit(); // lcdåˆ<EFBFBD>始化
480 1
481 1 userInfo.time[0].hour = 18;
482 1 userInfo.time[0].min = 0;
483 1 userInfo.time[0].sec = 0;
484 1
485 1 userInfo.time[1].hour = 23;
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 9
486 1 userInfo.time[1].min = 30;
487 1 userInfo.time[1].sec = 0;
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 9
488 1
489 1 while(1)
490 1 {
491 2 Ds1302ReadTime();
491 2 Ds1302ReadTime(); // 读å<EFBFBD>–时间
492 2 LcdDisplay();
493 2 Detection();
494 2 Dispose();
495 2 sprintf(str, "%d\r\n", userInfo.temp);
496 2 Bluetooth_Set(str);
497 2 }
498 1 }
499
500 void LcdDisplay()
501 {
502 1 uint temp_data;
503 1 if(userInfo.set == 0){
504 2 // TODO 显示时间
505 2 LcdWriteCom(0x80);
506 2 LcdWriteData('0'+TIME[4]/16); //月
507 2 LcdWriteData('0'+(TIME[4]&0x0f));
508 2 LcdWriteData('-');
509 2 LcdWriteData('0'+TIME[3]/16); //日
510 2 LcdWriteData('0'+(TIME[3]&0x0f));
511 2 LcdWriteData(' ');
512 2
513 2 LcdWriteData('0'+TIME[2]/16); //时
514 2 LcdWriteData('0'+(TIME[2]&0x0f));
515 2 LcdWriteData(':');
516 2 LcdWriteData('0'+TIME[1]/16); //分
517 2 LcdWriteData('0'+(TIME[1]&0x0f));
518 2 LcdWriteData(':');
519 2 LcdWriteData('0'+TIME[0]/16); //秒
520 2 LcdWriteData('0'+(TIME[0]&0x0f));
521 2
522 2 LcdWriteData(' ');
523 2 LcdWriteData('0'+(TIME[5]&0x0f));
524 2
525 2 LcdWriteCom(0x80 + 0x40);
526 2 temp_data = userInfo.Light;
527 2 temp_data=temp_data%10000;
528 2 LcdWriteData(temp_data/1000+0x30);
529 2 temp_data=temp_data%1000;
530 2 LcdWriteData(temp_data/100+0x30);
531 2 temp_data=temp_data%100;
532 2 LcdWriteData(temp_data/10+0x30);
533 2 temp_data=temp_data%10;
534 2 LcdWriteData(temp_data+0x30);
535 2 LcdWriteData('L');
536 2 LcdWriteData('x');
537 2 LcdWriteData(' ');
538 2 LcdWriteData(userInfo.temp / 10 + 0x30);
539 2 LcdWriteData(userInfo.temp % 10 + 0x30);
540 2 LcdWriteData('C');
541 2
542 2 LcdWriteData(' ');
543 2 LcdWriteData(userInfo.num / 10 % 10 + 0x30);
544 2 LcdWriteData(userInfo.num % 10 + 0x30);
545 2 }else{
546 2 LcdWriteCom(0x80);
547 2 LcdWriteData('0'+ userInfo.time[0].hour/10); //时
C51 COMPILER V9.56.0.0 MAIN 05/01/2022 13:19:20 PAGE 10
495 2 }
496 1 }
*** WARNING C280 IN LINE 476 OF main.c: 'str': unreferenced local variable
497
498 // 显示
499 void LcdDisplay()
500 {
501 1 uint temp_data;
502 1 if(userInfo.set == 0){
503 2 // TODO 显示时间
504 2 LcdWriteCom(0x80);
505 2 LcdWriteData('0'+TIME[4]/16); //月
506 2 LcdWriteData('0'+(TIME[4]&0x0f));
507 2 LcdWriteData('-');
508 2 LcdWriteData('0'+TIME[3]/16); //æ—¥
509 2 LcdWriteData('0'+(TIME[3]&0x0f));
510 2 LcdWriteData(' ');
511 2
512 2 LcdWriteData('0'+TIME[2]/16); //æ—¶
513 2 LcdWriteData('0'+(TIME[2]&0x0f));
514 2 LcdWriteData(':');
515 2 LcdWriteData('0'+TIME[1]/16); //分
516 2 LcdWriteData('0'+(TIME[1]&0x0f));
517 2 LcdWriteData(':');
518 2 LcdWriteData('0'+TIME[0]/16); //秒
519 2 LcdWriteData('0'+(TIME[0]&0x0f));
520 2
521 2 LcdWriteData(' ');
522 2 LcdWriteData('0'+(TIME[5]&0x0f));
523 2
524 2 LcdWriteCom(0x80 + 0x40);
525 2 temp_data = userInfo.Light;
526 2 temp_data=temp_data%10000;
527 2 LcdWriteData(temp_data/1000+0x30);
528 2 temp_data=temp_data%1000;
529 2 LcdWriteData(temp_data/100+0x30);
530 2 temp_data=temp_data%100;
531 2 LcdWriteData(temp_data/10+0x30);
532 2 temp_data=temp_data%10;
533 2 LcdWriteData(temp_data+0x30);
534 2 LcdWriteData('L');
535 2 LcdWriteData('x');
536 2 LcdWriteData(' ');
537 2 LcdWriteData(userInfo.temp / 10 + 0x30);
538 2 LcdWriteData(userInfo.temp % 10 + 0x30);
539 2 LcdWriteData('C');
540 2
541 2 LcdWriteData(' ');
542 2 LcdWriteData(userInfo.num / 10 % 10 + 0x30);
543 2 LcdWriteData(userInfo.num % 10 + 0x30);
544 2 }else{
545 2 LcdWriteCom(0x80);
546 2 LcdWriteData('0'+ userInfo.time[0].hour/10); //æ—¶
547 2 LcdWriteData('0'+ userInfo.time[0].hour% 10);
548 2 LcdWriteData(':');
C51 COMPILER V9.56.0.0 MAIN 05/05/2022 19:42:13 PAGE 10
548 2 LcdWriteData('0'+ userInfo.time[0].hour% 10);
549 2 LcdWriteData(':');
550 2 LcdWriteData('0'+userInfo.time[0].min/10); //分
551 2 LcdWriteData('0'+ userInfo.time[0].min % 10);
552 2 LcdWriteData(':');
553 2 LcdWriteData('0'+userInfo.time[0].sec / 10); //秒
554 2 LcdWriteData('0'+userInfo.time[0].sec % 10);
555 2 LcdWriteData(' ');
556 2
557 2 LcdWriteData('0'+cut);
558 2
559 2 LcdWriteCom(0x80 + 0x40);
560 2 LcdWriteData('0'+ userInfo.time[1].hour/10); //时
561 2 LcdWriteData('0'+ userInfo.time[1].hour% 10);
562 2 LcdWriteData(':');
563 2 LcdWriteData('0'+userInfo.time[1].min/10); //分
564 2 LcdWriteData('0'+ userInfo.time[1].min % 10);
565 2 LcdWriteData(':');
566 2 LcdWriteData('0'+userInfo.time[1].sec / 10); //秒
567 2 LcdWriteData('0'+userInfo.time[1].sec % 10);
568 2 }
569 1 }
549 2 LcdWriteData('0'+userInfo.time[0].min/10); //分
550 2 LcdWriteData('0'+ userInfo.time[0].min % 10);
551 2 LcdWriteData(':');
552 2 LcdWriteData('0'+userInfo.time[0].sec / 10); //秒
553 2 LcdWriteData('0'+userInfo.time[0].sec % 10);
554 2 LcdWriteData(' ');
555 2
556 2 LcdWriteData('0'+cut);
557 2
558 2 LcdWriteCom(0x80 + 0x40);
559 2 LcdWriteData('0'+ userInfo.time[1].hour/10); //æ—¶
560 2 LcdWriteData('0'+ userInfo.time[1].hour% 10);
561 2 LcdWriteData(':');
562 2 LcdWriteData('0'+userInfo.time[1].min/10); //分
563 2 LcdWriteData('0'+ userInfo.time[1].min % 10);
564 2 LcdWriteData(':');
565 2 LcdWriteData('0'+userInfo.time[1].sec / 10); //秒
566 2 LcdWriteData('0'+userInfo.time[1].sec % 10);
567 2 }
568 1 }
569
570
571
572 void Delay10ms(void) //<EFBFBD><EFBFBD><EFBFBD> 0us
573 {
574 1 unsigned char a,b,c;
575 1 for(c=1;c>0;c--)
576 1 for(b=38;b>0;b--)
577 1 for(a=130;a>0;a--);
578 1 }
571 void Delay10ms(void) //��� 0us
572 {
573 1 unsigned char a,b,c;
574 1 for(c=1;c>0;c--)
575 1 for(b=38;b>0;b--)
576 1 for(a=130;a>0;a--);
577 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2082 ----
CONSTANT SIZE = 5 ----
CODE SIZE = 2049 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 42 22
@ -620,4 +618,4 @@ MODULE INFORMATION: STATIC OVERLAYABLE @@ -620,4 +618,4 @@ MODULE INFORMATION: STATIC OVERLAYABLE
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)
C51 COMPILATION COMPLETE. 2 WARNING(S), 0 ERROR(S)

BIN
main.OBJ

Binary file not shown.

207
main.c

@ -58,13 +58,13 @@ void LcdDisplay(); @@ -58,13 +58,13 @@ void LcdDisplay();
void LcdDisplay1();
void Delay10ms(void);
#define SlaveAddress 0x46 //¶¨ÒåÆ÷¼þÔÚIIC×ÜÏßÖеĴӵØÖ·,¸ù¾ÝALT ADDRESSµØÖ·Òý½Å²»Í¬ÐÞ¸Ä
//ALT ADDRESSÒý½Å½ÓµØʱµØַΪ0x46£¬½ÓµçԴʱµØַΪ0xB8
#define SlaveAddress 0x46 //定义器件在IIC总线中的从地址,根据ALT ADDRESS地址引脚不同修改
//ALT ADDRESS引脚接地时地址为0x46,接电源时地址为0xB8
typedef unsigned char BYTE;
typedef unsigned short WORD;
BYTE BUF[8]; //½ÓÊÕÊý¾Ý»º´æÇø
int dis_data; //±äÁ¿
BYTE BUF[8]; //接收数据缓存区
int dis_data; //变量
void delay_nms(unsigned int k);
void InitLcd();
@ -75,21 +75,21 @@ void WriteCommandLCM(uchar CMD,uchar Attribc); @@ -75,21 +75,21 @@ void WriteCommandLCM(uchar CMD,uchar Attribc);
void DisplayOneChar(uchar X,uchar Y,uchar DData);
void conversion(uint temp_data);
void Single_Write_BH1750(uchar REG_Address); //µ¥¸öдÈëÊý¾Ý
uchar Single_Read_BH1750(uchar REG_Address); //µ¥¸ö¶ÁÈ¡ÄÚ²¿¼Ä´æÆ÷Êý¾Ý
void Multiple_Read_BH1750(); //Á¬ÐøµÄ¶ÁÈ¡ÄÚ²¿¼Ä´æÆ÷Êý¾Ý
void Single_Write_BH1750(uchar REG_Address); //单个写入数据
uchar Single_Read_BH1750(uchar REG_Address); //单个读取内部寄存器数据
void Multiple_Read_BH1750(); //连续的读取内部寄存器数据
//------------------------------------
void Delay5us();
void Delay5ms();
void BH1750_Start(); //ÆðʼÐźÅ
void BH1750_Stop(); //Í£Ö¹ÐźÅ
void BH1750_SendACK(bit ack); //Ó¦´ðACK
bit BH1750_RecvACK(); //¶Áack
void BH1750_SendByte(BYTE dat); //IICµ¥¸ö×Ö½Úд
BYTE BH1750_RecvByte(); //IICµ¥¸ö×Ö½Ú¶Á
void BH1750_Start(); //起始信号
void BH1750_Stop(); //停止信号
void BH1750_SendACK(bit ack); //应答ACK
bit BH1750_RecvACK(); //读ack
void BH1750_SendByte(BYTE dat); //IIC单个字节写
BYTE BH1750_RecvByte(); //IIC单个字节读
//ºÁÃëÑÓʱ**************************
//毫秒延时**************************
void delay_nms(unsigned int k)
{
unsigned int i,j;
@ -115,93 +115,93 @@ void Delay5ms() @@ -115,93 +115,93 @@ void Delay5ms()
}
/**************************************
ÆðʼÐźÅ
**************************************/
void BH1750_Start()
{
SDA1 = 1; //À­¸ßÊý¾ÝÏß
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
SDA1 = 0; //²úÉúϽµÑØ
Delay5us(); //ÑÓʱ
SCL1 = 0; //À­µÍʱÖÓÏß
SDA1 = 1; //拉高数据线
SCL1 = 1; //拉高时钟线
Delay5us(); //延时
SDA1 = 0; //产生下降沿
Delay5us(); //延时
SCL1 = 0; //拉低时钟线
}
/**************************************
Í£Ö¹ÐźÅ
**************************************/
void BH1750_Stop()
{
SDA1 = 0; //À­µÍÊý¾ÝÏß
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
SDA1 = 1; //²úÉúÉÏÉýÑØ
Delay5us(); //ÑÓʱ
SDA1 = 0; //拉低数据线
SCL1 = 1; //拉高时钟线
Delay5us(); //延时
SDA1 = 1; //产生上升沿
Delay5us(); //延时
}
/**************************************
·¢ËÍÓ¦´ðÐźÅ
Èë¿Ú²ÎÊý:ack (0:ACK 1:NAK)
:ack (0:ACK 1:NAK)
**************************************/
void BH1750_SendACK(bit ack)
{
SDA1 = ack; //дӦ´ðÐźÅ
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
SCL1 = 0; //À­µÍʱÖÓÏß
Delay5us(); //ÑÓʱ
SDA = ack; //写应答信号
SCL = 1; //拉高时钟线
Delay5us(); //延时
SCL = 0; //拉低时钟线
Delay5us(); //延时
}
/**************************************
½ÓÊÕÓ¦´ðÐźÅ
**************************************/
bit BH1750_RecvACK()
{
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
CY = SDA1; //¶ÁÓ¦´ðÐźÅ
SCL1 = 0; //À­µÍʱÖÓÏß
Delay5us(); //ÑÓʱ
SCL = 1; //拉高时钟线
Delay5us(); //延时
CY = SDA; //读应答信号
SCL = 0; //拉低时钟线
Delay5us(); //延时
return CY;
}
/**************************************
ÏòIIC×ÜÏß·¢ËÍÒ»¸ö×Ö½ÚÊý¾Ý
IIC总线发送一个字节数据
**************************************/
void BH1750_SendByte(BYTE dat)
{
BYTE i;
for (i=0; i<8; i++) //8λ¼ÆÊýÆ÷
for (i=0; i<8; i++) //8位计数器
{
dat <<= 1; //ÒƳöÊý¾ÝµÄ×î¸ßλ
SDA1 = CY; //ËÍÊý¾Ý¿Ú
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
SCL1 = 0; //À­µÍʱÖÓÏß
Delay5us(); //ÑÓʱ
dat <<= 1; //移出数据的最高位
SDA = CY; //送数据口
SCL = 1; //拉高时钟线
Delay5us(); //延时
SCL = 0; //拉低时钟线
Delay5us(); //延时
}
BH1750_RecvACK();
}
/**************************************
´ÓIIC×ÜÏß½ÓÊÕÒ»¸ö×Ö½ÚÊý¾Ý
IIC总线接收一个字节数据
**************************************/
BYTE BH1750_RecvByte()
{
BYTE i;
BYTE dat = 0;
SDA1 = 1; //ʹÄÜÄÚ²¿ÉÏÀ­,×¼±¸¶ÁÈ¡Êý¾Ý,
for (i=0; i<8; i++) //8λ¼ÆÊýÆ÷
SDA = 1; //使能内部上拉,准备读取数据,
for (i=0; i<8; i++) //8位计数器
{
dat <<= 1;
SCL1 = 1; //À­¸ßʱÖÓÏß
Delay5us(); //ÑÓʱ
dat |= SDA1; //¶ÁÊý¾Ý
SCL1 = 0; //À­µÍʱÖÓÏß
Delay5us(); //ÑÓʱ
SCL = 1; //拉高时钟线
Delay5us(); //延时
dat |= SDA; //读数据
SCL = 0; //拉低时钟线
Delay5us(); //延时
}
return dat;
}
@ -210,65 +210,53 @@ BYTE BH1750_RecvByte() @@ -210,65 +210,53 @@ BYTE BH1750_RecvByte()
void Single_Write_BH1750(uchar REG_Address)
{
BH1750_Start(); //ÆðʼÐźÅ
BH1750_SendByte(SlaveAddress); //·¢ËÍÉ豸µØÖ·+дÐźÅ
BH1750_SendByte(REG_Address); //ÄÚ²¿¼Ä´æÆ÷µØÖ·£¬
// BH1750_SendByte(REG_data); //ÄÚ²¿¼Ä´æÆ÷Êý¾Ý£¬
BH1750_Stop(); //·¢ËÍÍ£Ö¹ÐźÅ
}
//********µ¥×Ö½Ú¶ÁÈ¡*****************************************
/*
uchar Single_Read_BH1750(uchar REG_Address)
{ uchar REG_data;
BH1750_Start(); //ÆðʼÐźÅ
BH1750_SendByte(SlaveAddress); //·¢ËÍÉ豸µØÖ·+дÐźÅ
BH1750_SendByte(REG_Address); //·¢ËÍ´æ´¢µ¥ÔªµØÖ·£¬´Ó0¿ªÊ¼
BH1750_Start(); //ÆðʼÐźÅ
BH1750_SendByte(SlaveAddress+1); //·¢ËÍÉ豸µØÖ·+¶ÁÐźÅ
REG_data=BH1750_RecvByte(); //¶Á³ö¼Ä´æÆ÷Êý¾Ý
BH1750_SendACK(1);
BH1750_Stop(); //Í£Ö¹ÐźÅ
return REG_data;
}
*/
BH1750_Start(); //起始信号
BH1750_SendByte(SlaveAddress); //发送设备地址+写信号
BH1750_SendByte(REG_Address); //内部寄存器地址,
// BH1750_SendByte(REG_data); //内部寄存器数据,
BH1750_Stop(); //发送停止信号
}
//*********************************************************
//
//Á¬Ðø¶Á³öBH1750ÄÚ²¿Êý¾Ý
//连续读出BH1750内部数据
//
//*********************************************************
void Multiple_read_BH1750(void)
{ uchar i;
BH1750_Start(); //ÆðʼÐźÅ
BH1750_SendByte(SlaveAddress+1); //·¢ËÍÉ豸µØÖ·+¶ÁÐźÅ
BH1750_Start(); //起始信号
BH1750_SendByte(SlaveAddress+1); //发送设备地址+读信号
for (i=0; i<3; i++) //Á¬Ðø¶ÁÈ¡2¸öµØÖ·Êý¾Ý£¬´æ´¢ÖÐBUF
for (i=0; i<3; i++) //连续读取2个地址数据,存储中BUF
{
BUF[i] = BH1750_RecvByte(); //BUF[0]´æ´¢0x32µØÖ·ÖеÄÊý¾Ý
BUF[i] = BH1750_RecvByte(); //BUF[0]存储0x32地址中的数据
if (i == 3)
{
BH1750_SendACK(1); //×îºóÒ»¸öÊý¾ÝÐèÒª»ØNOACK
BH1750_SendACK(1); //最后一个数据需要回NOACK
}
else
{
BH1750_SendACK(0); //»ØÓ¦ACK
BH1750_SendACK(0); //回应ACK
}
}
BH1750_Stop(); //Í£Ö¹ÐźÅ
BH1750_Stop(); //停止信号
Delay5ms();
}
//³õʼ»¯BH1750£¬¸ù¾ÝÐèÒªÇë²Î¿¼pdf½øÐÐÐÞ¸Ä****
//初始化BH1750
void Init_BH1750()
{
Single_Write_BH1750(0x01);
}
// 串口初始化
void Uart_Init()
{
TMOD = 0x20 | 0x01;
@ -306,6 +294,8 @@ void Bluetooth_Set(uchar *puf) @@ -306,6 +294,8 @@ void Bluetooth_Set(uchar *puf)
}
}
// 获取数据
void Detection()
{
static int num = 0;
@ -316,10 +306,12 @@ void Detection() @@ -316,10 +306,12 @@ void Detection()
Multiple_Read_BH1750();
dis_data=BUF[0];
dis_data=(dis_data<<8)+BUF[1];
userInfo.Light = (float)dis_data/1.2;
userInfo.Light = (float)dis_data/1.2; // 获取光照值
userInfo.temp = Temper_change();
userInfo.temp /= 100;
userInfo.temp /= 100; // 获取温度,去除小数部分
// 按键一
if(key1==0)
{
Delay10ms();
@ -338,6 +330,7 @@ void Detection() @@ -338,6 +330,7 @@ void Detection()
i=0;
}
// 按键二
if(key2==0)
{
Delay10ms();
@ -359,10 +352,10 @@ void Detection() @@ -359,10 +352,10 @@ void Detection()
i=0;
}
if(IN==0)
if(IN==0) // 光电门 进
{
Delay10ms();
if(IN==0){
if(IN==0){ // 去抖
userInfo.num++;
if(userInfo.num > 99) userInfo.num = 99;
}
@ -373,10 +366,11 @@ void Detection() @@ -373,10 +366,11 @@ void Detection()
i=0;
}
if(OUT==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
if(OUT==0) // 光电门 出
{
Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(OUT==0){
Delay10ms();
if(OUT==0){ // 去抖
userInfo.num--;
if(userInfo.num < 0) userInfo.num = 0;
}
@ -387,12 +381,13 @@ void Detection() @@ -387,12 +381,13 @@ void Detection()
i=0;
}
if(key3==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
if(key3==0) // 按键3
{
Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Delay10ms();
if(key3==0){
cut++;
if(cut >= 4) cut = 0;
if(cut >= 4) cut = 0; // 切换修改的对象
}
while((i<50)&&(key3==0)){
Delay10ms();
@ -401,10 +396,12 @@ void Detection() @@ -401,10 +396,12 @@ void Detection()
i=0;
}
if(key4==0) //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>K1<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
// 按键四
if(key4==0)
{
Delay10ms(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Delay10ms();
if(key4==0){
// 根据cut的值,修改不同的对象
if(cut == 0){
userInfo.time[0].hour++;
if(userInfo.time[0].hour >= 24) userInfo.time[0].hour = 0;
@ -428,6 +425,7 @@ void Detection() @@ -428,6 +425,7 @@ void Detection()
}
// 获取时间是否达到 返回1为定时时间到
int getTimeResult()
{
int result = 1;
@ -444,6 +442,7 @@ int getTimeResult() @@ -444,6 +442,7 @@ int getTimeResult()
}
// 点灯
void Dispose()
{
@ -470,13 +469,14 @@ void Dispose() @@ -470,13 +469,14 @@ void Dispose()
LED4 = userInfo.model;
}
// main
void main()
{
int i = 0;
uchar str[10];
Ds1302Init();
Ds1302Init(); // 时钟初始化
Uart_Init();
LcdInit();
LcdInit(); // lcd初始化
userInfo.time[0].hour = 18;
userInfo.time[0].min = 0;
@ -488,15 +488,14 @@ void main() @@ -488,15 +488,14 @@ void main()
while(1)
{
Ds1302ReadTime();
Ds1302ReadTime(); // 读取时间
LcdDisplay();
Detection();
Dispose();
sprintf(str, "%d\r\n", userInfo.temp);
Bluetooth_Set(str);
}
}
// 显示
void LcdDisplay()
{
uint temp_data;

BIN
pro

Binary file not shown.

1781
pro.M51

File diff suppressed because it is too large Load Diff

11
pro.build_log.htm

@ -23,17 +23,22 @@ Project File Date: 04/30/2022 @@ -23,17 +23,22 @@ Project File Date: 04/30/2022
<h2>Output:</h2>
Build target 'Target 1'
compiling main.c...
main.c(301): warning C280: 'num': unreferenced local variable
main.c(476): warning C280: 'str': unreferenced local variable
linking...
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?INIT_BH1750?MAIN
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_BLUETOOTH_SET?MAIN
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_AT24C02WRITE?I2C
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_AT24C02READ?I2C
Program Size: data=99.1 xdata=0 code=5899
Program Size: data=79.1 xdata=0 code=4152
creating hex file from "pro"...
"pro" - 0 Error(s), 3 Warning(s).
Build Time Elapsed: 00:00:00
"pro" - 0 Error(s), 6 Warning(s).
Build Time Elapsed: 00:00:01
</pre>
</body>
</html>

606
pro.hex

@ -1,226 +1,223 @@ @@ -1,226 +1,223 @@
:0517060025640D0A003E
:0C15EE0002260000024A00000222000059
:10151900E4FDFCC3ED9FEC9E5015E4FBFA0BBB0008
:0F152900010AEB64794A70F50DBD00010C80E4F6
:011538002290
:10164000000000000000000000000000000000009A
:011650002277
:0E1651007F307E02EF1FAC0670011E4C70F65B
:01165F002268
:0F166000D290D291121640C290121640C291221F
:0C16D000C290D291121640D29002164037
:0E167E00A2009290D291121640C29102164024
:0D16B600D291121640A290C291121640224D
:10157500E4FEEF25E0FF9290D291121640C291123F
:0915850016400EBE08EC0216B679
:10153900E4FFD290FEEF25E0FFD291121640A2906F
:0D154900E4334207C2911216400EBE08E8BE
:011556002272
:10162E00AD071216607F46121575AF0512157502BD
:02163E0016D0C4
:10143B001216607F47121575E4FD12153974422D93
:10144B00F8A607BD0304D2008002C20012167E0D5F
:09145B00BD03E71216D002165180
:051701007F0102162E1D
:1015D800758921759850758DFD858D8BE4F587D2B9
:0615E800AFD2ACD28E224E
:0716FA00AE071FEE70FA229B
:0E168C00C2ACC2998F993099FDC299D2AC229E
:1015C00012057BFF601112168C7F051216FA74014A
:0815D00029F9E43AFA80E9224E
:100B1100E4F558F5597F0112162E7F1012162E7F1B
:100B2100B47E0012151912143B752400854225E587
:100B310025FE7C00E42543F525EC3EF524FCAD259E
:100B410012031F7B9A7A997999783F1202048F33A5
:100B51008E328D318C301212828E348F357C007D35
:100B6100641206288E348F352092521216C32092B9
:100B71002AE52D452C7024E52B452A7007F52A75A9
:100B81002B018005E4F52AF52BE52B6401452A703C
:100B910006D2A3C2978004C2A3D297C3E559943267
:100BA100E55864809480501020920D1216C30559A7
:100BB100E55970E7055880E3E4F558F55920936449
:100BC1001216C320933CE52B452A601A054BE54BD1
:100BD1007002054AC39405E54A64809480401EE48E
:100BE100F54AF54B8017E52D452C7007F52C752D31
:100BF100018005E4F52CF52DE4F526F5277F01129A
:100C010016DCC3E5599432E5586480948050102075
:100C1100930D1216C30559E55970E7055880E3E4B1
:100C2100F558F55920B7411216C320B7190529E522
:100C31002970020528D39463E528648094804006D6
:100C4100752800752963C3E5599432E55864809489
:100C510080501020B70D1216C30559E55970E705EC
:100C61005880E3E4F558F55920B63E1216C320B674
:100C710016E529152970021528C3E528648094809A
:100C81005005E4F528F529C3E5599432E558648007
:100C91009480501020B60D1216C30559E55970E71E
:100CA100055880E3E4F558F55920A2401216C320F7
:100CB100A2180527E52770020526C39404E52664DA
:100CC1008094804005E4F526F527C3E5599432E583
:100CD1005864809480501020A20D1216C30559E566
:100CE1005970E7055880E3E4F558F55930A7030238
:100CF1000DA21216C330A703020DA2E527452670E7
:100D01001A0537E53770020536C39418E536648055
:100D11009480406BE4F536F5378064E5276401453E
:100D210026701A0539E53970020538C3943BE53858
:100D3100648094804049E4F538F5398042E52764C0
:100D4100024526701A053DE53D7002053CC3941825
:100D5100E53C648094804027E4F53CF53D8020E546
:100D610027640345267018053FE53F7002053EC321
:100D7100943BE53E648094804005E4F53EF53FC335
:100D8100E5599432E55864809480501020A70D12E3
:100D910016C30559E55970E7055880E3E4F558F5A0
:010DA10059F8
:010DA200222E
:101103007D017C00E50AC4540F75F00AA4FFAEF01C
:10111300E50A540F7A002FF559EA3EF558E509C45C
:10112300540F75F00AA4FFAEF0E509540F2FF55BD9
:10113300EA3EF55AC3E5599537E5366480F8E55834
:10114300648098404BD3E559953DE53C6480F8E5D0
:101153005864809840028038E559B53718E558B58A
:101163003613C3E55B9539E5386480F8E55A648046
:10117300985002801BE559B53D1AE558B53C15D387
:10118300E55B953FE53E6480F8E55A64809840044A
:08119300E4FEFF22AE04AF05EB
:01119B002231
:10102600E52B452A60030210AC121103EF4E6074E3
:10103600E4FFFE7DC87C42AB33AA32A931A8301248
:1010460002A15060C3E529940AE528648094805083
:101056000EE5299400E5286480948040028055C3FB
:10106600E529940AE52864809480400EE5299414C5
:10107600E528648094805002804CC3E5299414E5E9
:101086002864809480400EE529941EE528648094A7
:10109600805002803FC3E529941EE5286480948031
:1010A600404A803E8046E54B454A6040E54B640138
:1010B600454A700AC2A5C2A6C2A1D2A48036E54B93
:1010C6006402454A7006C2A5C2A6801AE54B6403AF
:1010D600454A7006C2A5D2A6800CE54B6404454A73
:1010E6007012D2A5D2A6D2A1D2A48008C2A5C2A649
:0D10F600C2A1C2A4E52A452B24FF92A3222B
:10122800E4F54CF54D12161A1215D812158E7536AE
:1012380000753712E4F538F539F53AF53BF53C75A4
:101248003D17F53E753F1EF540F541121604120D87
:10125800A3120B11121026755BFF755C17755D06DE
:1012680085345E85355F7B007A00794E1206FE7BF9
:0A127800007A00794E1215C080D1F3
:100DA300E52D452C7F806003020F241216DCE50C31
:100DB300C4540F2430FF1216E6E50C540F2430FF01
:100DC3001216E67F2D1216E6E50BC4540F2430FFEE
:100DD3001216E6E50B540F2430FF1216E67F20129D
:100DE30016E6E50AC4540F2430FF1216E6E50A544A
:100DF3000F2430FF1216E67F3A1216E6E509C454B3
:100E03000F2430FF1216E6E509540F2430FF1216A3
:100E1300E67F3A1216E6E508C4540F2430FF121693
:100E2300E6E508540F2430FF1216E67F201216E67B
:100E3300E50D540F2430FF1216E67FC01216DCAF07
:100E430033AE32AD31AC301203588E588F597C27F4
:100E53007D101205D38C588D59AE58AF597C037D44
:100E6300E81205D3EF2430FF1216E6AE58AF597CD3
:100E7300037DE81205D38C588D59AE58AF597C00C9
:100E83007D641205D3EF2430FF1216E6AE58AF5936
:100E93007C007D641205D38C588D59AE58AF597CB4
:100EA300007D0A1205D3EF2430FF1216E6AE58AFC9
:100EB300597C007D0A1205D38C588D59E55924308D
:100EC300FF1216E67F4C1216E67F781216E67F2095
:100ED3001216E6AE34AF357C007D0A120628EF24E5
:100EE30030FF1216E6AE34AF357C007D0A120628B9
:100EF300ED2430FF1216E67F431216E67F2012160A
:100F0300E6AE28AF297C007D0A1206287C007D0A04
:100F1300120628ED2430FF1216E6AE28AF29021080
:100F2300171216DCAE36AF377C007D0A120628EFA7
:100F33002430FF1216E6AE36AF377C007D0A120668
:100F430028ED2430FF1216E67F3A1216E6AE38AFCC
:100F5300397C007D0A120628EF2430FF1216E6AE14
:100F630038AF397C007D0A120628ED2430FF1216B3
:100F7300E67F3A1216E6AE3AAF3B7C007D0A1206D4
:100F830028EF2430FF1216E6AE3AAF3B7C007D0A11
:100F9300120628ED2430FF1216E67F201216E6E52E
:100FA300272430FF1216E67FC01216DCAE3CAF3D9D
:100FB3007C007D0A120628EF2430FF1216E6AE3CB1
:100FC300AF3D7C007D0A120628ED2430FF1216E6A1
:100FD3007F3A1216E6AE3EAF3F7C007D0A1206282A
:100FE300EF2430FF1216E6AE3EAF3F7C007D0A12BF
:100FF3000628ED2430FF1216E67F3A1216E6AE40BD
:10100300AF417C007D0A120628EF2430FF1216E65A
:10101300AE40AF417C007D0A120628ED2430FF125A
:0210230016E6CF
:0110250022A8
:0C16C3007F017E267D82DDFEDEFADFF670
:0116CF0022F8
:10141100C2958F807F017E00121422D2947F057EB7
:0114210000CA
:10142200D3EF9400EE9400400F7DC77C01DCFEDD1B
:08143200FAEF1F70EB1E80E8C9
:01143A00228F
:0A16DC00C294C296121411C29422A7
:0A16E600C294D296121411C294228D
:10158E007F381216DC7F0C1216DC7F061216DC7FFB
:09159E00011216DC7F800216DC4C
:0E169A0081838587898B8D80828486888A8CE7
:0915FA0007080024120105072274
:1013DC00C2B300C2B500D2B300E4FEEF1392B4EF77
:1013EC00C313FFD2B500C2B5000EBE08EEE4FEED8D
:1013FC001392B4EDC313FDD2B500C2B5000EBE08F6
:04140C00EEC2B30079
:0114100022B9
:1012D100C2B300C2B500D2B300E4FDEF1392B4EF84
:1012E100C313FFD2B500C2B5000DBD08EE00E4FD89
:1012F100A2B4E433FFC43333335480FCEEC3134C44
:10130100FED2B500C2B5000DBD08E5C2B300D2B52D
:0913110000C2B400D2B400AF0622
:01131A0022B0
:10161A00E4FD7F8E1213DCE4FF0FBF07FC7D807FA1
:04162A008E0213DC3D
:10160400E4FBEB90169A93FF1212D174082BF8A600
:05161400070BBB07ED10
:0116190022AE
:0516A8001216ADD2A1F5
:0816AD007F017E02DEFEDFFA80
:0116B5002212
:0F166F00D2A01216A8C2A01216ADC2A10216ADCB
:0A16F000C2A01216A8D2A00216AD87
:02135D00AD07DA
:10135F00E4FBFAEDC4131313540124FF92A0ED25FF
:10136F00E0FD1216A8C2A11216AD0BBB08E5D2A064
:10137F001216ADD2A130A00F0AEAD394C840F6C21C
:0E138F00A11216AD7F0022C2A11216AD7F0181
:01139D00222D
:10148B00E4FDFCD2A01216ADD2A11216ADEC25E0F4
:10149B00FCA2A0E43342041216ADC2A11216AD0D8C
:0514AB00BD08E5AF04DF
:0114B0002219
:1015A700AC05A90712166F7FA012135DAF011213C6
:0915B7005DAF0412135D0216F091
:0214D600AC0761
:1014D80012166F7FA012135DAF0412135D12166F00
:0F14E8007FA112135D12148BAD071216F0AF0522
:0114F70022D2
:10155700D3EF9400EE940040147D6E7C00ED1D7077
:0D156700011CED4C70F7EF1F70E61E80E3D5
:011574002254
:1014B100C2B27B46AF031BEF70FAD2B2E4FB30B28B
:1014C100117F017E001215570BEBD3940540EF7F7E
:0414D10000227F0175
:0114D50022F4
:10139E007D087C00C2B20FBF0000D2B20FBF0000AA
:1013AE000FBF0000A2B2E433C43333335480FBE9E1
:1013BE00C3134BF97E007F04EF1FAA0670011E4A6D
:0D13CE0070F6ED1D70011CED4C70C9AF01F3
:0113DB0022EF
:0C131B001214B17F017E001215577FCC28
:10132700E4FBFAC2B20560E5607002055FEF139255
:10133700B2755F00756006E5601560AC5F700215F9
:101347005F4C70F3D2B2EFC313FF0BBB00010AEB84
:0513570064084A70CE9D
:01135C00226E
:1014F800E4FFFE12131B7F4412132712131B7FBE37
:1015080012132712139E8F5E12139EEFFEE55EFFE5
:0115180022B0
:101282001214F8C3EE9400500DEF1F70011E630795
:10129200FF6306FF8000AD07AC06E412031FE4FB08
:1012A200FA7980783D1200FB8F5D8E5C8D5B8C5AE3
:1012B200E4FFFE7DC87C42AB5DAA5CA95BA85A1222
:0E12C20000FBE4FBFAF9783F12000A12035811
:0112D00022FB
:0C0F200002250000024900000221000030
:100E4B00E4FDFCC3ED9FEC9E5015E4FBFA0BBB00DD
:0F0E5B00010AEB64794A70F50DBD00010C80E4CB
:010E6A002265
:100F7200000000000000000000000000000000006F
:010F8200224C
:0E0F83007F307E02EF1FAC0670011E4C70F630
:010F9100223D
:0F0F9200D290D291120F72C290120F72C291229E
:0C100200C290D291120F72D290020F72B5
:0E0FB000A20092A0D2A1120F72C2A1020F7273
:0D0FE800D2A1120F72A2A0C2A1120F72229C
:100EA700E4FEEF25E0FF92A0D2A1120F72C2A112B9
:090EB7000F720EBE08EC020FE8F8
:100E6B00E4FFD2A0FEEF25E0FFD2A1120F72A2A0E9
:0D0E7B00E4334207C2A1120F720EBE08E858
:010E88002247
:100F6000AD07120F927F46120EA7AF05120EA70211
:020F700010026D
:100D9400120F927F47120EA7E4FD120E6B74412DC1
:100DA400F8A607BD0304D2008002C200120FB00DE2
:090DB400BD03E7121002020F83D7
:051033007F01020F60C7
:100F0A00758921759850758DFD858D8BE4F587D28D
:060F1A00AFD2ACD28E2222
:07102C00AE071FEE70FA226F
:0E0FBE00C2ACC2998F993099FDC299D2AC2273
:100EF2001203D9FF6011120FBE7F0512102C74016C
:080F020029F9E43AFA80E92222
:10048B00E4F514F5157F01120F607F10120F607FDA
:10049B00B47E00120E4B120D94752300854124E59A
:1004AB0024FE7C00E42542F524EC3EF523FCAD2430
:1004BB0012031F7B9A7A997999783F1202048F3233
:1004CB008E318D308C2F120BA28E338F347C007DAE
:1004DB00641204478E338F34209252120FF5209200
:1004EB002AE52C452B7024E52A45297007F529753B
:1004FB002A018005E4F529F52AE52A6401452970CE
:10050B0006D2A3C2978004C2A3D297C3E515943237
:10051B00E51464809480501020920D120FF5051590
:10052B00E51570E7051480E3E4F514F515209364E5
:10053B00120FF520933CE52A4529601A054AE54A36
:10054B0070020549C39405E54964809480401EE41C
:10055B00F549F54A8017E52C452B7007F52B752CC3
:10056B00018005E4F52BF52CE4F525F5267F01122A
:10057B00100EC3E5159432E514648094805010205E
:10058B00930D120FF50515E51570E7051480E3E4DF
:10059B00F514F51520B741120FF520B7190528E50D
:1005AB002870020527D39463E52764809480400666
:1005BB00752700752863C3E5159432E514648094A0
:1005CB0080501020B70D120FF50515E51570E705D6
:1005DB001480E3E4F514F51520B63E120FF520B6A2
:1005EB0016E528152870021527C3E527648094802B
:1005FB005005E4F527F528C3E5159432E51464801E
:10060B009480501020B60D120FF50515E51570E707
:10061B00051480E3E4F514F51520A240120FF52024
:10062B00A2180526E52670020525C39404E525646A
:10063B008094804005E4F525F526C3E5159432E555
:10064B001464809480501020A20D120FF50515E54F
:10065B001570E7051480E3E4F514F51530A70302D4
:10066B00071C120FF530A70302071CE52645257062
:10067B001A0536E53670020535C39418E5356480E6
:10068B009480406BE4F535F5368064E526640145CE
:10069B0025701A0538E53870020537C3943BE537EA
:1006AB00648094804049E4F537F5388042E5266450
:1006BB00024525701A053CE53C7002053BC39418B6
:1006CB00E53B648094804027E4F53BF53C8020E5D6
:1006DB0026640345257018053EE53E7002053DC3B3
:1006EB00943BE53D648094804005E4F53DF53EC3C5
:1006FB00E5159432E51464809480501020A70D12F8
:10070B000FF50515E51570E7051480E3E4F514F511
:01071B0015C8
:01071C0022BA
:100A7D007D017C00E54DC4540F75F00AA4FFAEF066
:100A8D00E54D540F7A002FF515EA3EF514E54CC4EB
:100A9D00540F75F00AA4FFAEF0E54C540F2FF51767
:100AAD00EA3EF516C3E5159536E5356480F8E5148F
:100ABD00648098404BD3E515953CE53B6480F8E5A3
:100ACD001464809840028038E515B53618E514B5E4
:100ADD003513C3E5179538E5376480F8E51664805E
:100AED00985002801BE515B53C1AE514B53B15D39E
:100AFD00E517953EE53D6480F8E516648098400461
:080B0D00E4FEFF22AE04AF0577
:010B150022BD
:1009A000E52A45296003020A26120A7DEF4E60748B
:1009B000E4FFFE7DC87C42AB32AA31A930A82F12D9
:1009C00002A15060C3E528940AE527648094805012
:1009D0000EE5289400E5276480948040028055C38A
:1009E000E528940AE52764809480400EE528941455
:1009F000E527648094805002804CC3E5289414E578
:100A00002764809480400EE528941EE52764809436
:100A1000805002803FC3E528941EE52764809480BF
:100A2000404A803E8046E54A45496040E54A6401C7
:100A30004549700AC2A5C2A6C2A1D2A48036E54A21
:100A4000640245497006C2A5C2A6801AE54A64033D
:100A500045497006C2A5D2A6800CE54A6404454902
:100A60007012D2A5D2A6D2A1D2A48008C2A5C2A6D5
:0D0A7000C2A1C2A4E529452A24FF92A322B9
:100CFC00E4F508F509120F4C120F0A120EC07535E7
:100D0C0000753612E4F537F538F539F53AF53B75DB
:100D1C003C17F53D753E1EF53FF540120F36120798
:090D2C001D12048B1209A080F2D3
:10071D00E52C452B7F80600302089E12100EE54FDD
:10072D00C4540F2430FF121018E54F540F2430FF1E
:10073D001210187F2D121018E54EC4540F2430FFDF
:10074D00121018E54E540F2430FF1210187F20128E
:10075D001018E54DC4540F2430FF121018E54D54F8
:10076D000F2430FF1210187F3A121018E54CC454A4
:10077D000F2430FF121018E54C540F2430FF1210C7
:10078D00187F3A121018E54BC4540F2430FF121085
:10079D0018E54B540F2430FF1210187F201210183B
:1007AD00E550540F2430FF1210187FC012100EAFF9
:1007BD0032AE31AD30AC2F1203588E148F157C270D
:1007CD007D101203F28C148D15AE14AF157C037DC4
:1007DD00E81203F2EF2430FF121018AE14AF157C9F
:1007ED00037DE81203F28C148D15AE14AF157C0049
:1007FD007D641203F2EF2430FF121018AE14AF1502
:10080D007C007D641203F28C148D15AE14AF157C33
:10081D00007D0A1203F2EF2430FF121018AE14AF50
:10082D00157C007D0A1203F28C148D15E51524300C
:10083D00FF1210187F4C1210187F781210187F209D
:10084D00121018AE33AF347C007D0A120447EF242A
:10085D0030FF121018AE33AF347C007D0A120447FE
:10086D00ED2430FF1210187F431210187F20121044
:10087D0018AE27AF287C007D0A1204477C007D0A44
:10088D00120447ED2430FF121018AE27AF280209CD
:10089D009112100EAE35AF367C007D0A120447EF73
:1008AD002430FF121018AE35AF367C007D0A1204CD
:1008BD0047ED2430FF1210187F3A121018AE37AFE3
:1008CD00387C007D0A120447EF2430FF121018AE59
:1008DD0037AF387C007D0A120447ED2430FF12102B
:1008ED00187F3A121018AE39AF3A7C007D0A120407
:1008FD0047EF2430FF121018AE39AF3A7C007D0A55
:10090D00120447ED2430FF1210187F20121018E545
:10091D00262430FF1210187FC012100EAE3BAF3CD4
:10092D007C007D0A120447EF2430FF121018AE3BF5
:10093D00AF3C7C007D0A120447ED2430FF121018E5
:10094D007F3A121018AE3DAF3E7C007D0A1204476F
:10095D00EF2430FF121018AE3DAF3E7C007D0A1221
:10096D000447ED2430FF1210187F3A121018AE3FD5
:10097D00AF407C007D0A120447EF2430FF1210189F
:10098D00AE3FAF407C007D0A120447ED2430FF12CC
:02099D00101830
:01099F002235
:0C0FF5007F017E267D82DDFEDEFADFF645
:0110010022CC
:100D6A00C2958F807F017E00120D7BD2947F057E13
:010D7A000078
:100D7B00D3EF9400EE9400400F7DC77C01DCFEDDC9
:080D8B00FAEF1F70EB1E80E877
:010D9300223D
:0A100E00C294C296120D6AC2942229
:0A101800C294D296120D6AC294220F
:100EC0007F3812100E7F0C12100E7F0612100E7F4C
:090ED0000112100E7F8002100EC9
:0E0FCC0081838587898B8D80828486888A8CBC
:090F2C00074B0024120105072205
:100D3500C2B300C2B500D2B300E4FEEF1392B4EF24
:100D4500C313FFD2B500C2B5000EBE08EEE4FEED3A
:100D55001392B4EDC313FDD2B500C2B5000EBE08A3
:040D6500EEC2B30027
:010D69002267
:100BF100C2B300C2B500D2B300E4FDEF1392B4EF6B
:100C0100C313FFD2B500C2B5000DBD08EE00E4FD6F
:100C1100A2B4E433FFC43333335480FCEEC3134C2A
:100C2100FED2B500C2B5000DBD08E5C2B300D2B514
:090C310000C2B400D2B400AF0609
:010C3A002297
:100F4C00E4FD7F8E120D35E4FF0FBF07FC7D807F23
:040F5C008E020D35BF
:100F3600E4FBEB900FCC93FF120BF1744B2BF8A64E
:050F4600070BBB07EDE5
:010F4B002283
:050FDA00120FDFD2A19F
:080FDF007F017E02DEFEDFFA55
:010FE70022E7
:0F0FA100D2A0120FDAC2A0120FDFC2A1020FDF1F
:0A102200C2A0120FDAD2A0020FDF05
:020C7D00AD07C1
:100C7F00E4FBFAEDC4131313540124FF92A0ED25E6
:100C8F00E0FD120FDAC2A1120FDF0BBB08E5D2A0F5
:100C9F00120FDFD2A130A00F0AEAD394C840F6C2D8
:0E0CAF00A1120FDF7F0022C2A1120FDF7F0112
:010CBD002214
:100DBD00E4FDFCD2A0120FDFD2A1120FDFEC25E073
:100DCD00FCA2A0E4334204120FDFC2A1120FDF0D0B
:050DDD00BD08E5AF04B4
:010DE20022EE
:100ED900AC05A907120FA17FA0120C7DAF01120C5E
:090EE9007DAF04120C7D02102201
:020E0800AC0735
:100E0A00120FA17FA0120C7DAF04120C7D120FA14C
:0F0E1A007FA1120C7D120DBDAD07121022AF0586
:010E290022A6
:100E8900D3EF9400EE940040147D6E7C00ED1D704C
:0D0E9900011CED4C70F7EF1F70E61E80E3AA
:010EA6002229
:100DE300C2B27B46AF031BEF70FAD2B2E4FB30B260
:100DF300117F017E00120E890BEBD3940540EF7F28
:040E030000227F0149
:010E070022C8
:100CBE007D087C00C2B20FBF0000D2B20FBF000091
:100CCE000FBF0000A2B2E433C43333335480FBE9C8
:100CDE00C3134BF97E007F04EF1FAA0670011E4A54
:0D0CEE0070F6ED1D70011CED4C70C9AF01DA
:010CFB0022D6
:0C0C3B00120DE37F017E00120E897FCCB9
:100C4700E4FBFAC2B2051CE51C7002051BEF139208
:100C5700B2751B00751C06E51C151CAC1B70021534
:100C67001B4C70F3D2B2EFC313FF0BBB00010AEBAF
:050C770064084A70CE84
:010C7C002255
:100E2A00E4FFFE120C3B7F44120C47120C3B7FBEC0
:100E3A00120C47120CBE8F1A120CBEEFFEE51AFFF7
:010E4A002285
:100BA200120E2AC3EE9400500DEF1F70011E630750
:100BB200FF6306FF8000AD07AC06E412031FE4FBEF
:100BC200FA7980783D1200FB8F198E188D178C16DA
:100BD200E4FFFE7DC87C42AB19AA18A917A8161219
:0E0BE20000FBE4FBFAF9783F12000A120358F8
:010BF00022E2
:100003000203C4E86480F8E933E83360110460F064
:10001300ED33EC337009E8FCE9FDEAFEEBFF220463
:1000230060DED3EB9FEA9EE99DE8C2E78CF0C2F75E
@ -273,152 +270,41 @@ @@ -273,152 +270,41 @@
:100301009FF5F0EA9E42F0E99D42F0E89C45F060DD
:0903110007CC4820E701B3EC22FF
:10031A0075F020800E75F010800575F0087D007E5E
:10032A00007F003392D530D50312065EEC334010BD
:10032A00007F003392D530D50312047DEC334010A0
:10033A00EF33FFEE33FEED33FDEC33FCD5F0ED2267
:0E034A00E5F0247EA2D513CC92E7CDCEFF22A3
:10035800EDD2E7CD33EC3392D524814006E4FFFE9D
:10036800FDFC22FCE4CFCECDCC24E0501174FF80FC
:10037800EDC3CC13CCCD13CDCE13CECF13CF047099
:07038800F030D5DE02065E35
:1006A200E56F245BF8E6056F227858300702785B25
:1006B200E475F00112066C02057B2000EB7F2ED25E
:1006C200008018EF540F2490D43440D4FF30040B30
:1006D200EF24BFB41A0050032461FFE570600215D5
:1006E200700573E5737002057230070D7858E47572
:1006F200F00112066CEF0205C10214647403D20702
:100702008003E4C207F56F8B588A59895AE4F57061
:10071200F572F573E57060077F201206DD80F575CE
:1007220071FFC201C200C202C203C205C206C208F0
:100732001206ABFF700D3007057F001206EEAF7395
:10074200AE7222B4255FC2D5C2041206ABFF24D01A
:10075200B40A00501A75F00A787030D50508B6FF51
:100762000106C6A426F620D5047002D20380D9243D
:10077200CFB41A00EF5004C2E5D2040209DBD20161
:1007820080C6D20080C0D20280BCD2D580BAD20547
:1007920080B47F201206DD2002077401B57000408C
:1007A200F11206A2FF1206DD020716D208D2068057
:1007B200951206A2FB1206A2FA1206A2F94A4B7081
:1007C2000679D27A0A7BFF20022EE570602A7E002B
:1007D2008E8275830012059460060EEE657170F0CC
:1007E200C2D5EBC0E0EAC0E0E9C0E0EE120A3BD0BD
:1007F200E0F9D0E0FAD0E0FB12057BFF60AAEBC083
:10080200E0EAC0E0E9C0E01206DDD0E02401F9D060
:10081200E03400FAD0E0FBE5710460DCD571D980E8
:1008220087D20280A2120A1E60F7E57170010412DB
:1008320003D9A971600DE571600914F571120AC539
:10084200EF60F3EA30E702F404C3995077EAF42543
:10085200710430E701E404F571800D120A1E60C1D3
:10086200EA057125711203D9EA786EF630E701E4E0
:10087200257104D5710420050114120A3BE4C0E07D
:10088200120AC5786EE6601320E70714F61206C551
:10089200802204F6D0E014C0E07F001206C5E571A4
:1008A20060071206BC1571800B3005031206BCD01E
:1008B200E0020716D0E00480C5120A1E60A0E571AE
:1008C200041203D9786EEAF6E5712005026001048C
:0508D2002404120A3BA2
:1008D70074FF04C0E0120AC51206C5E571200502BF
:1008E70060031206BCD0E0B571E87F451206CF78E9
:1008F7006EE67F2B30E7047F2DF404C0E01206DD9F
:10090700D0E075F00A84C0F01206C6D0E01206C621
:10091700020716791080027908C206C2088008D239
:10092700D5790A8004790AC2D5E571047002F57198
:10093700E4FAFDFEFF1206A2FC7B08200113120653
:10094700A2FD7B1030000A1206A2FE1206A2FF7B50
:1009570020EC3382D592D55013C3E43000069FFFB5
:10096700E49EFEE42001039DFDE49CFCE4CBF8C279
:1009770001EC700CCFCECDCCE824F8F870F38017DB
:10098700C3EF33FFEE33FEED33FDEC33FCEB33FB0C
:10099700994002FB0FD8E9EB300105F8D0E0C448D5
:1009A700B201C0E00AEC4D4E4F78207B0070C2EADE
:1009B700B5710040BCC0E0120A3DD0F0D0E0200184
:1009C70004C4C0E0C4B201C0F01206C6D0F0D5F02E
:1009D700EB02071612067C07B353091A5807844C13
:1009E700078042091E4F09264409264907994309EA
:1009F7002C55085D4608BB450827470AF25007886B
:100A07002D078C2E07AF2B07902307AD200ADB2A73
:100A1700074848000007A7E571B4FF037571061280
:100A270006A2FC1206A2FD1206A2FE1206A2FF787B
:100A370067020408790AA2D5200314300509B91002
:100A4700020404B9080104A2D520060250010420BB
:100A570002689202B570005034C0E07F203003195D
:100A67007F30A20272067205500F120A94C202C2A8
:100A770006C205C2087F30800F300503E9C0E012C7
:100A870006DD300503D0E0F9D0E0B570CC300517AE
:100A97007F30B9100C1206DD7F583004077F78804D
:100AA70003B908031206DD3002057F2D0206DD7F3C
:100AB700202008F87F2B2006F322920280CF7F00A8
:100AC700B4070050052467F8E6FF22286E756C6CA2
:100AD7002900D2011206A23001F8C201787030D580
:100AE7000108F60207482D504349581206A224036D
:100AF700B405004001E4900AED931206CE743A1251
:0A0B070006CED20375700402091A2D
:07038800F030D5DE02047D18
:10038F00E9D2E7C933E833F892D5EDD2E7CD33ECB4
:07039F0033FC5002B2D5222D
:1003A600EC30E7100FBF000C0EBE00080DBD0004B8
:1003B6000BEB6014A2D5EB13FCED92E7FD2274FF64
:1003C600FCFDFEFF22E480F8A2D574FF13FC7D80BD
:0303D600E480EFD1
:1003D900F920E72824F950037907E4F42402FB18EB
:1003E900DBFDE624FB5014E9600DE4F618E604F69B
:0F03F900B40A08E4F6D9F57401F60A22C2D52237
:10040800ED33EC3392D5FA602AB4FF33EDC2E77BC3
:10041800FF60067A04792DE4227A04793620D5041F
:100428007A047931224E614E002B494E46002D49FF
:100438004E4600E47A08F608DAFC7B00740722E8E6
:10044800C0E0ECC0E0EDC0E0EEC0E0EFC0E0EA756F
:10045800F010A4CAABF075F04DA42BFBE435F0FC0A
:10046800EA2410FAEB34C5FBEC34D9FCEDC2E7FF03
:1004780075F056A4F42411C5F0F434C58FF0A42AFD
:10048800E5F03BE43CF620E71412053BD0E0FFD052
:10049800E0FED0E0FDD0E0FC1202048014F4041267
:1004A800053BD0E0FFD0E0FED0E0FDD0E0FC12003C
:1004B800FBD0E0F8E6FAEDD2E7CD33EC332482FB4B
:1004C800E4C3CF33CFCE33CECD33CD33DBF37B078D
:1004D80075F00A846004F6081B0AE5F0F6088FF048
:1004E800740AA4FFACF08EF0740AA42CFEACF05091
:1004F800010C8DF0740AA42CFDE435F0F608DBDE5F
:0305080074072253
:10050B003F8000004120000042C80000447A0000F8
:10051B00461C400047C35000497424004B1896807A
:10052B004CBEBC205A0E1BCA6753C21C749DC5AE71
:10053B00FB60065407601C2323120569EB543860DB
:10054B00091205551205641200FBECF8EDF9EEFAF1
:10055B00EFCB22EB12056480F1543803241C900579
:10056B000BFE93FC0EEE93FD0EEE930ECE93FF223D
:0300000002119C4E
:0C119C00787FE4F6D8FD7581730211E342
:10057B00BB010689828A83E0225002E722BBFE027E
:09058B00E32289828A83E49322B1
:10059400BB010CE58229F582E5833AF583E022501C
:1005A40006E92582F8E622BBFE06E92582F8E22266
:0D05B400E58229F582E5833AF583E4932280
:1005C100BB010689828A83F0225002F722BBFE0119
:0205D100F32213
:1005D300BC000BBE0029EF8DF084FFADF022E4CC0C
:1005E300F875F008EF2FFFEE33FEEC33FCEE9DECD5
:1005F300984005FCEE9DFE0FD5F0E9E4CEFD22ED1B
:10060300F8F5F0EE8420D21CFEADF075F008EF2F64
:10061300FFED33FD4007985006D5F0F222C398FD55
:050623000FD5F0EA22F2
:10062800C2D5EC30E709B2D5E4C39DFDE49CFCEEED
:1006380030E715B2D5E4C39FFFE49EFE1205D3C38D
:10064800E49DFDE49CFC80031205D330D507C3E488
:060658009FFFE49EFE225C
:0E065E00C3E49FFFE49EFEE49DFDE49CFC22AD
:10066C00FAE6FB0808E6F925F0F618E6CA3AF6228F
:10067C00D083D082F8E4937012740193700DA3A30D
:10068C0093F8740193F5828883E473740293686021
:06069C00EFA3A3A380DF21
:10146400EFB40A07740D12146F740A309811A89916
:10147400B8130CC2983098FDA899C298B811F630E8
:0714840099FDC299F59922C0
:1011A800021228E493A3F8E493A34003F68001F223
:1011B80008DFF48029E493A3F85407240CC8C33348
:1011C800C4540F4420C8834004F456800146F6DF17
:1011D800E4800B01020408102040809015EEE47EA4
:1011E800019360BCA3FF543F30E509541FFEE4930C
:1011F800A360010ECF54C025E060A840B8E493A3D3
:10120800FAE493A3F8E493A3C8C582C8CAC583CAFD
:10121800F0A3C8C582C8CAC583CADFE9DEE780BEB5
:0116030000E6
:03000000020B16DA
:0C0B1600787FE4F6D8FD758151020B5D7C
:1003D900BB010689828A83E0225002E722BBFE0222
:0903E900E32289828A83E4932255
:1003F200BC000BBE0029EF8DF084FFADF022E4CCEF
:10040200F875F008EF2FFFEE33FEEC33FCEE9DECB7
:10041200984005FCEE9DFE0FD5F0E9E4CEFD22EDFD
:10042200F8F5F0EE8420D21CFEADF075F008EF2F47
:10043200FFED33FD4007985006D5F0F222C398FD38
:050442000FD5F0EA22D5
:10044700C2D5EC30E709B2D5E4C39DFDE49CFCEED0
:1004570030E715B2D5E4C39FFFE49EFE1203F2C353
:10046700E49DFDE49CFC80031203F230D507C3E44E
:060477009FFFE49EFE223F
:0E047D00C3E49FFFE49EFEE49DFDE49CFC2290
:100B2200020CFCE493A3F8E493A34003F68001F2E1
:100B320008DFF48029E493A3F85407240CC8C333D4
:100B4200C4540F4420C8834004F456800146F6DFA3
:100B5200E4800B0102040810204080900F20E47E04
:100B6200019360BCA3FF543F30E509541FFEE49398
:100B7200A360010ECF54C025E060A840B8E493A35F
:100B8200FAE493A3F8E493A3C8C582C8CAC583CA8A
:100B9200F0A3C8C582C8CAC583CADFE9DEE780BE42
:010F350000BB
:00000001FF

62
pro.uvgui.QY

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save