Browse Source

完成大部分功能

master
htujun 3 years ago
parent
commit
703eb18952
  1. 319
      IRIN.LST
  2. BIN
      IRIN.OBJ
  3. 217
      IRIN.c
  4. 10
      IRIN.h
  5. 6
      i2c.LST
  6. BIN
      i2c.OBJ
  7. 1
      i2c.__i
  8. 1
      i2c.h
  9. 4
      lcd.LST
  10. BIN
      lcd.OBJ
  11. 342
      main.LST
  12. BIN
      main.OBJ
  13. 223
      main.c
  14. BIN
      pro
  15. 1392
      pro.M51
  16. 7
      pro.build_log.htm
  17. 597
      pro.hex
  18. 109
      pro.uvgui.QY
  19. 6
      pro.uvopt
  20. 172
      pwm.LST
  21. BIN
      pwm.OBJ
  22. 128
      pwm.c
  23. 21
      pwm.h

319
IRIN.LST

@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 1 C51 COMPILER V9.56.0.0 IRIN 04/08/2022 03:09:39 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE IRIN C51 COMPILER V9.56.0.0, COMPILATION OF MODULE IRIN
@ -10,223 +10,120 @@ line level source
1 #include "IRIN.h" 1 #include "IRIN.h"
2 #include "i2c.h" 2 #include "i2c.h"
3 3
4 uint journey; 4 uint mileage = 0;
5 uint journey1; 5
6 extern uchar pwm_left; 6 uint count=0;
7 unsigned int b; 7
8 unsigned int c; 8 uchar ms=0;
9 extern uint time1; 9 uint speed=0;
10 extern uchar pwm_val_left; 10 uint r_s=0;
11 unsigned int b2; 11
12 unsigned int c2; 12 extern uint model;
13 13 extern uchar set;
14 uint money=7; 14
15 uint sudu=0; 15 void delay11(int i)
16 16 {
17 uint count=0; //栅格是一圈20个 17 1 while(i--);
18 18 1 }
19 uchar ms=0; 19
20 uint speed=0; 20 void IRIN_Init(void)
21 uint r_s=0; 21 {
22 22 1 TMOD=0x01 | 0x20;
23 bit state=0; 23 1 TH0=0XFc;
24 bit s0=0; 24 1 TL0=0X18;
25 bit flas=0; 25 1 ET0=1;
26 26 1 TR0=1;
27 uchar sec=0; 27 1 EA=1;
28 uchar sec1=0; 28 1 EX1=1;
29 29 1 IT1=1;
30 /******************************************************************************* 30 1 }
31 * 函 数 名 : delay 31
32 * 函数功能 : 延时函数,i=1时,大约延时10us 32 void display()
33 *******************************************************************************/ 33 {
34 void delay11(int i) 34 1 LcdSetCursor(0,0);
35 { 35 1 LcdShowStr(0,0,"");
36 1 while(i--); 36 1 Lcd1602_Write_Data(0x30+speed/100%10);
37 1 } 37 1 Lcd1602_Write_Data(0x30+speed/10%10);
38 38 1 Lcd1602_Write_Data(0x30+speed%10);
39 void IRIN_Init(void) 39 1 LcdShowStr(3,0,"KM/h ");
40 { 40 1
41 1 TMOD=0x01 | 0x20 ;//定时器1工作方式1 41 1 LcdShowStr(8,0,"");
42 1 TH0=0x3C; 42 1 Lcd1602_Write_Data(0x30+mileage/100%10);
43 1 TL0=0xb0; 43 1 Lcd1602_Write_Data(0x30+mileage/10%10);
44 1 ET0=1; 44 1 Lcd1602_Write_Data(0x30+mileage%10);
45 1 TR0=1; 45 1 LcdShowStr(11,0,"m ");
46 1 EA=1; 46 1
47 1 EX1=1; 47 1 if(model == 0) LcdShowStr(13,0," ");
48 1 IT1=1; 48 1 else if(model == 1) LcdShowStr(13, 0, "L");
49 1 } 49 1 else if(model == 2) LcdShowStr(13, 0, "M");
50 50 1 else LcdShowStr(13, 0, "H");
51 void display() 51 1 }
52 { 52
53 1 if(state==0) 53
54 1 { 54 void Key_scan(){
55 2 sudu=At24c02Read(10); 55 1 if(k1==0)
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 2 C51 COMPILER V9.56.0.0 IRIN 04/08/2022 03:09:39 PAGE 2
56 2 if(money>7) 56 1 {
57 2 { 57 2 delay11(1000); //Ïû¶¶´¦Àí
58 3 money=At24c02Read(5); 58 2 if(k1==0){
59 3 } 59 3 model++;
60 2 LcdSetCursor(0,0); 60 3 if(model >= 4) model = 0;
61 2 LcdShowStr(0,0,"Speed:"); 61 3 }
62 2 Lcd1602_Write_Data(0x30+sudu/100%10); 62 2 while(!k1);
63 2 Lcd1602_Write_Data(0x30+sudu/10%10); 63 2 }
64 2 Lcd1602_Write_Data(0x30+sudu%10); 64 1
65 2 LcdShowStr(10,0,"KM/h"); 65 1 if(k2==0)
66 2 66 1 {
67 2 LcdShowStr(0,1,"L:"); 67 2 delay11(1000); //Ïû¶¶´¦Àí
68 2 Lcd1602_Write_Data(journey/10000%10+0x30); 68 2 if(k2==0){
69 2 Lcd1602_Write_Data(journey/1000%10+0x30); 69 3 set = 1;
70 2 Lcd1602_Write_Data(journey/100%10+0x30); 70 3 }
71 2 Lcd1602_Write_Data(journey/10%10+0x30); 71 2 while(!k2);
72 2 Lcd1602_Write_Data(journey%10+0x30); 72 2 }
73 2 LcdShowStr(7,1,"M"); 73 1
74 2 74 1 }
75 2 if(journey>1000) 75
76 2 { 76 void time0() interrupt 1
77 3 money=(journey-1000)*0.002+7; 77 {
78 3 At24c02Write(5,money); 78 1 static int time = 0;
79 3 } 79 1 TH0=0XFc;
80 2 money=money*10; 80 1 TL0=0X18;
81 2 LcdShowStr(9,1,"Q:"); 81 1 time++;
82 2 Lcd1602_Write_Data(money/1000%10+0x30); 82 1 pwm_out_right_moto();
83 2 Lcd1602_Write_Data(money/100%10+0x30); 83 1 if(time >= 500){
84 2 Lcd1602_Write_Data(money/10%10+0x30); 84 2 EX1=0;
85 2 LcdShowStr(14,1,"."); 85 2 time = 0;
86 2 Lcd1602_Write_Data(money%10+0x30); 86 2 r_s=count;
87 2 87 2 count=0;
88 2 money=money/10; 88 2 EX1=1;
89 2 89 2 speed=speed*0.5+(r_s*6)*0.5;
90 2 } 90 2 speed=(0.15*speed);
91 1 } 91 2 mileage = mileage+(r_s*2.5/20);
92 92 2 }
93 93 1 }
94 94
95 void keypros() 95 void int1() interrupt 2
96 { 96 {
97 1 if(k2==0) 97 1 count++;
98 1 { 98 1 }
99 2 delay11(1000); //消抖处理 99
100 2 if(k2==0) 100
101 2 { 101
102 3 sudu=At24c02Read(10); //读取EEPROM地址1内的数据 102
103 3 103
104 3 b2=At24c02Read(1); 104
105 3 c2=At24c02Read(8); 105
106 3 journey=(b2<<8) | c2;
107 3
108 3 money=At24c02Read(5);
109 3
110 3 }
111 2 while(!k2);
112 2 }
113 1
114 1 if(k1==0)
115 1 {
116 2 delay11(1000); //消抖处理
117 2 if(k1==0)
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 3
118 2 {
119 3 flas=1;
120 3
121 3 }
122 2 while(!k1);
123 2 }
124 1 if(k4==0)
125 1 {
126 2 delay11(1000); //消抖处理
127 2 if(k4==0)
128 2 {
129 3 if(pwm_left>=20)
130 3 {
131 4 pwm_left=1;
132 4 }
133 3 else
134 3 {
135 4 pwm_left++;
136 4 }
137 3 }
138 2 while(!k4);
139 2 }
140 1
141 1 }
142
143 void time0() interrupt 1 //定时器 0
144 {
145 1 TH0=0x3C;
146 1 TL0=0xb0; //50ms定时
147 1 ms++; //变量50ms加一
148 1 if(ms%5==0) s0=~s0;
149 1
150 1
151 1 if(ms%10==0) //500ms定时
152 1 {
153 2
154 2 if(sec!=0) sec--;
155 2 if(sec1!=0) sec1--;
156 2 ms=0; //清零变量
157 2 EX1=0; //关闭外部中断,保证变量在计算的时候不会增加
158 2 r_s=count; //因为是500ms检测一次转动数据,所以要想一秒转动的圈数是 speed=count*2 ,但是光栅是一圈2
-0格,所以还要除以20;
159 2 //综合一下,一秒转动的圈数就是 speed=count*2/20 ==》 speed=counr/10;
160 2 count=0; //清零变量
161 2 EX1=1; //打开外部中断
162 2 speed=speed*0.5+(r_s*6)*0.5; // 这里r_s是一秒走的圈数,然后乘以60得到60秒走的圈数,单位变成了
- r/min; 总方式 speed=count/10*60; ==>> speed=count*6;
163 2
164 2 if(flas==0)
165 2 {
166 3 sudu=(0.15*speed);
167 3 At24c02Write(10,sudu);
168 3
169 3 journey=journey+(r_s*2.5/20);
170 3 journey1=journey;
171 3 c = journey & 0x00FF;
172 3 At24c02Write(8,c);
173 3
174 3 delay11(1000);
175 3 b=journey1>>8;
176 3 At24c02Write(1,b);
177 3 }
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 4
178 2 else
179 2 {
180 3 journey=0;
181 3 money=7;
182 3 At24c02Write(1,journey);
183 3 At24c02Write(8,journey);
184 3 At24c02Write(5,money);
185 3 flas=0;
186 3 }
187 2 }
188 1 }
189
190 void int1() interrupt 2 //外部中断 1
191 {
192 1
193 1 count++; //中断每触发一次,变量加一
194 1
195 1 }
196
197
198
199
200
201
202
MODULE INFORMATION: STATIC OVERLAYABLE MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1006 ---- CODE SIZE = 623 ----
CONSTANT SIZE = 22 ---- CONSTANT SIZE = 26 ----
XDATA SIZE = ---- ---- XDATA SIZE = ---- ----
PDATA SIZE = ---- ---- PDATA SIZE = ---- ----
DATA SIZE = 25 ---- DATA SIZE = 11 ----
IDATA SIZE = ---- ---- IDATA SIZE = ---- ----
BIT SIZE = 3 ---- BIT SIZE = ---- ----
END OF MODULE INFORMATION. END OF MODULE INFORMATION.

BIN
IRIN.OBJ

Binary file not shown.

217
IRIN.c

@ -1,36 +1,17 @@
#include "IRIN.h" #include "IRIN.h"
#include "i2c.h" #include "i2c.h"
uint journey; uint mileage = 0;
uint journey1;
extern uchar pwm_left;
unsigned int b;
unsigned int c;
extern uint time1;
extern uchar pwm_val_left;
unsigned int b2;
unsigned int c2;
uint money=7; uint count=0;
uint sudu=0;
uint count=0; //栅格是一圈20个
uchar ms=0; uchar ms=0;
uint speed=0; uint speed=0;
uint r_s=0; uint r_s=0;
bit state=0; extern uint model;
bit s0=0; extern uchar set;
bit flas=0;
uchar sec=0;
uchar sec1=0;
/*******************************************************************************
* : delay
* : i=110us
*******************************************************************************/
void delay11(int i) void delay11(int i)
{ {
while(i--); while(i--);
@ -38,9 +19,9 @@ void delay11(int i)
void IRIN_Init(void) void IRIN_Init(void)
{ {
TMOD=0x01 | 0x20 ;//定时器1工作方式1 TMOD=0x01 | 0x20;
TH0=0x3C; TH0=0XFc;
TL0=0xb0; TL0=0X18;
ET0=1; ET0=1;
TR0=1; TR0=1;
EA=1; EA=1;
@ -49,150 +30,72 @@ void IRIN_Init(void)
} }
void display() void display()
{ {
if(state==0) LcdSetCursor(0,0);
{ LcdShowStr(0,0,"");
sudu=At24c02Read(10); Lcd1602_Write_Data(0x30+speed/100%10);
if(money>7) Lcd1602_Write_Data(0x30+speed/10%10);
{ Lcd1602_Write_Data(0x30+speed%10);
money=At24c02Read(5); LcdShowStr(3,0,"KM/h ");
}
LcdSetCursor(0,0); LcdShowStr(8,0,"");
LcdShowStr(0,0,"Speed:"); Lcd1602_Write_Data(0x30+mileage/100%10);
Lcd1602_Write_Data(0x30+sudu/100%10); Lcd1602_Write_Data(0x30+mileage/10%10);
Lcd1602_Write_Data(0x30+sudu/10%10); Lcd1602_Write_Data(0x30+mileage%10);
Lcd1602_Write_Data(0x30+sudu%10); LcdShowStr(11,0,"m ");
LcdShowStr(10,0,"KM/h");
LcdShowStr(0,1,"L:");
Lcd1602_Write_Data(journey/10000%10+0x30);
Lcd1602_Write_Data(journey/1000%10+0x30);
Lcd1602_Write_Data(journey/100%10+0x30);
Lcd1602_Write_Data(journey/10%10+0x30);
Lcd1602_Write_Data(journey%10+0x30);
LcdShowStr(7,1,"M");
if(journey>1000)
{
money=(journey-1000)*0.002+7;
At24c02Write(5,money);
}
money=money*10;
LcdShowStr(9,1,"Q:");
Lcd1602_Write_Data(money/1000%10+0x30);
Lcd1602_Write_Data(money/100%10+0x30);
Lcd1602_Write_Data(money/10%10+0x30);
LcdShowStr(14,1,".");
Lcd1602_Write_Data(money%10+0x30);
money=money/10;
}
}
void keypros()
{
if(k2==0)
{
delay11(1000); //消抖处理
if(k2==0)
{
sudu=At24c02Read(10); //读取EEPROM地址1内的数据
b2=At24c02Read(1);
c2=At24c02Read(8);
journey=(b2<<8) | c2;
money=At24c02Read(5);
}
while(!k2);
}
if(model == 0) LcdShowStr(13,0," ");
else if(model == 1) LcdShowStr(13, 0, "L");
else if(model == 2) LcdShowStr(13, 0, "M");
else LcdShowStr(13, 0, "H");
}
void Key_scan(){
if(k1==0) if(k1==0)
{ {
delay11(1000); //消抖处理 delay11(1000); //消抖处理
if(k1==0) if(k1==0){
{ model++;
flas=1; if(model >= 4) model = 0;
} }
while(!k1); while(!k1);
} }
if(k4==0)
if(k2==0)
{ {
delay11(1000); //消抖处理 delay11(1000); //消抖处理
if(k4==0) if(k2==0){
{ set = 1;
if(pwm_left>=20)
{
pwm_left=1;
}
else
{
pwm_left++;
}
} }
while(!k4); while(!k2);
} }
} }
void time0() interrupt 1 //定时器 0 void time0() interrupt 1
{ {
TH0=0x3C; static int time = 0;
TL0=0xb0; //50ms定时 TH0=0XFc;
ms++; //变量50ms加一 TL0=0X18;
if(ms%5==0) s0=~s0; time++;
pwm_out_right_moto();
if(time >= 500){
if(ms%10==0) //500ms定时 EX1=0;
{ time = 0;
r_s=count;
if(sec!=0) sec--; count=0;
if(sec1!=0) sec1--; EX1=1;
ms=0; //清零变量 speed=speed*0.5+(r_s*6)*0.5;
EX1=0; //关闭外部中断,保证变量在计算的时候不会增加 speed=(0.15*speed);
r_s=count; //因为是500ms检测一次转动数据,所以要想一秒转动的圈数是 speed=count*2 ,但是光栅是一圈20格,所以还要除以20; mileage = mileage+(r_s*2.5/20);
//综合一下,一秒转动的圈数就是 speed=count*2/20 ==》 speed=counr/10;
count=0; //清零变量
EX1=1; //打开外部中断
speed=speed*0.5+(r_s*6)*0.5; // 这里r_s是一秒走的圈数,然后乘以60得到60秒走的圈数,单位变成了 r/min; 总方式 speed=count/10*60; ==>> speed=count*6;
if(flas==0)
{
sudu=(0.15*speed);
At24c02Write(10,sudu);
journey=journey+(r_s*2.5/20);
journey1=journey;
c = journey & 0x00FF;
At24c02Write(8,c);
delay11(1000);
b=journey1>>8;
At24c02Write(1,b);
}
else
{
journey=0;
money=7;
At24c02Write(1,journey);
At24c02Write(8,journey);
At24c02Write(5,money);
flas=0;
}
} }
} }
void int1() interrupt 2 //外部中断 1 void int1() interrupt 2
{ {
count++;
count++; //中断每触发一次,变量加一 }
}

10
IRIN.h

@ -5,19 +5,13 @@
#include "lcd.h" #include "lcd.h"
#include "pwm.h" #include "pwm.h"
sbit k1=P3^5;
sbit k2=P3^4;
sbit k3=P3^3;
sbit k4=P3^2; //¶¨Òå°´¼ü¶Ë¿Ú
sbit k1=P3^5;
sbit k2=P3^2;
void IRIN_Init(void); void IRIN_Init(void);
void display(); void display();
void keypros();
#endif #endif

6
i2c.LST

@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 I2C 04/06/2022 22:40:09 PAGE 1 C51 COMPILER V9.56.0.0 I2C 04/08/2022 02:58:55 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE I2C C51 COMPILER V9.56.0.0, COMPILATION OF MODULE I2C
@ -62,7 +62,7 @@ line level source
53 /******************************************************************************* 53 /*******************************************************************************
54 * 函数名 : I2cSendByte(unsigned char dat) 54 * 函数名 : I2cSendByte(unsigned char dat)
55 * 函数功能 : 通过I2C发送一个字节。在SCL时钟信号高电平期间,保持发送信号SDA保持稳定 55 * 函数功能 : 通过I2C发送一个字节。在SCL时钟信号高电平期间,保持发送信号SDA保持稳定
C51 COMPILER V9.56.0.0 I2C 04/06/2022 22:40:09 PAGE 2 C51 COMPILER V9.56.0.0 I2C 04/08/2022 02:58:55 PAGE 2
56 * 输入 : num 56 * 输入 : num
57 * 输出 : 0或1。发送成功返回1,发送失败返回0 57 * 输出 : 0或1。发送成功返回1,发送失败返回0
@ -126,7 +126,7 @@ line level source
115 1 } 115 1 }
116 116
117 117
C51 COMPILER V9.56.0.0 I2C 04/06/2022 22:40:09 PAGE 3 C51 COMPILER V9.56.0.0 I2C 04/08/2022 02:58:55 PAGE 3
118 /******************************************************************************* 118 /*******************************************************************************
119 * 函数名 : void At24c02Write(unsigned char addr,unsigned char dat) 119 * 函数名 : void At24c02Write(unsigned char addr,unsigned char dat)

BIN
i2c.OBJ

Binary file not shown.

1
i2c.__i

@ -1 +0,0 @@
"i2c.c" OPTIMIZE (8,SPEED) BROWSE DEBUG OBJECTEXTEND TABS (2)

1
i2c.h

@ -12,5 +12,6 @@ unsigned char I2cSendByte(unsigned char dat);
unsigned char I2cReadByte(); unsigned char I2cReadByte();
void At24c02Write(unsigned char addr,unsigned char dat); void At24c02Write(unsigned char addr,unsigned char dat);
unsigned char At24c02Read(unsigned char addr); unsigned char At24c02Read(unsigned char addr);
void Delay10us();
#endif #endif

4
lcd.LST

@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 LCD 04/06/2022 22:23:01 PAGE 1 C51 COMPILER V9.56.0.0 LCD 04/08/2022 02:58:55 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE LCD C51 COMPILER V9.56.0.0, COMPILATION OF MODULE LCD
@ -62,7 +62,7 @@ line level source
53 1 X &= 0xF; //限制X不能大于15,Y不能大于1 53 1 X &= 0xF; //限制X不能大于15,Y不能大于1
54 1 if (Y) X |= 0x40; //当要显示第二行时地址码+0x40; 54 1 if (Y) X |= 0x40; //当要显示第二行时地址码+0x40;
55 1 X |= 0x80; //算出指令码 55 1 X |= 0x80; //算出指令码
C51 COMPILER V9.56.0.0 LCD 04/06/2022 22:23:01 PAGE 2 C51 COMPILER V9.56.0.0 LCD 04/08/2022 02:58:55 PAGE 2
56 1 Lcd1602_Write_Cmd(X); //发命令字 56 1 Lcd1602_Write_Cmd(X); //发命令字
57 1 Lcd1602_Write_Data(DData); //发数据 57 1 Lcd1602_Write_Data(DData); //发数据

BIN
lcd.OBJ

Binary file not shown.

342
main.LST

@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 1 C51 COMPILER V9.56.0.0 MAIN 04/08/2022 03:21:37 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE MAIN C51 COMPILER V9.56.0.0, COMPILATION OF MODULE MAIN
@ -13,135 +13,235 @@ line level source
4 #include "pwm.h" 4 #include "pwm.h"
5 #include "i2c.h" 5 #include "i2c.h"
6 #include "IRIN.h" 6 #include "IRIN.h"
7 7 #include <string.h>
8 unsigned char PuZh[]=" Pechin Science "; 8 #include <stdio.h>
9 extern uint journey; 9 # include <stdlib.h>
10 extern uint money; 10
11 extern uchar sudu; 11 #define uint unsigned int
12 unsigned int b12; 12 #define uchar unsigned char
13 unsigned int c12; 13
14 14 typedef unsigned char uint8;
15 15 typedef unsigned int uint16;
16 unsigned int b123; 16
17 unsigned int c123; 17 extern uint mileage;
18 extern unsigned char pwm_left; 18 extern uint speed;
19 unsigned char code ASCII[15] = {'0','1','2','3','4','5','6','7','8','9','.','-','M'}; 19
20 20 uint model = 0;
21 void delayms(unsigned int ms) 21
22 { 22 extern unsigned char pwm_value;
23 1 unsigned char i=100,j; 23
24 1 for(;ms;ms--) 24
25 1 { 25 struct UserInfo{
26 2 while(--i) 26 int height;
27 2 { 27 int weight;
28 3 j=10; 28 int target_mileage;
29 3 while(--j); 29 int target_speed;
30 3 } 30 };
31 2 } 31
32 1 } 32 uchar set = 0;
33 33
34 void Uart_Init() //使用定时器1作为波特率发生器(STC89C52、STC89C51、AT89C51 34 struct UserInfo usr;
-等均可) 35
35 { 36 /*****************相关变量**************/
36 1 TMOD = 0x20 | 0x01; 37
37 1 38 uchar Receive;
38 1 SCON = 0x50; //设置串行方式 39 uchar Recive_table[40]; //用于接收wifi模块反馈到MCU上的数据
39 1 40
40 1 TH1 = 0xFD; //波特率9600 41 bit accept = 0;
41 1 42
42 1 TL1 = TH1; 43 void delayms(unsigned int ms)
43 1 44 {
44 1 PCON = 0x00; 45 1 unsigned char i=100,j;
45 1 46 1 for(;ms;ms--)
46 1 EA = 1; //总中断打开 47 1 {
47 1 48 2 while(--i)
48 1 ES = 1; //开串口中断 49 2 {
49 1 50 3 j=10;
50 1 TR1 = 1; //启动定时器1 51 3 while(--j);
51 1 52 3 }
52 1 } 53 2 }
53 54 1 }
54 void us_delay(uchar t)
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 2
55 55
56 { C51 COMPILER V9.56.0.0 MAIN 04/08/2022 03:21:37 PAGE 2
57 1
58 1 while(t--); 56 void Uart_Init()
59 1 57 {
60 1 } 58 1 TMOD = 0x20 | 0x01;
61 59 1 SCON = 0x50;
62 void Send_Uart(uchar value) 60 1 TH1 = 0xFD;
63 61 1 TL1 = TH1;
64 { 62 1 PCON = 0x00;
65 1 63 1 EA = 1;
66 1 ES=0; //关闭串口中断 64 1 ES = 1;
67 1 65 1 TR1 = 1;
68 1 TI=0; //清发送完毕中断请求标志位 66 1 }
69 1 67
70 1 SBUF=value; //发送 68 void us_delay(uchar t)
71 1 69 {
72 1 while(TI==0); //等待发送完毕 70 1 while(t--);
73 1 71 1 }
74 1 TI=0; //清发送完毕中断请求标志位 72
75 1 73 void Send_Uart(uchar value)
76 1 ES=1; //允许串口中断 74 {
77 1 75 1 ES=0;
78 1 } 76 1 TI=0;
79 77 1 SBUF=value;
80 void ESP8266_Set(uchar *puf) // 数组指针*puf指向字符串数组 78 1 while(TI==0);
81 79 1 TI=0;
82 { 80 1 ES=1;
83 1 81 1 }
84 1 while(*puf!='\0') //遇到空格跳出循环 82
85 1 83 void Bluetooth_Set(uchar *puf)
86 1 { 84 {
87 2 85 1 while(*puf!='\0')
88 2 Send_Uart(*puf); //向WIFI模块发送控制指令。 86 1 {
89 2 87 2 Send_Uart(*puf);
90 2 us_delay(5); 88 2 us_delay(5);
91 2 89 2 puf++;
92 2 puf++; 90 2 }
93 2 91 1 }
94 2 } 92
95 1 93
96 1 } 94 void saveUserInfo(){
97 95 1 int target = 0;
98 void main(void) 96 1 target = usr.height >> 8;
99 { 97 1 At24c02Write(3, target);
100 1 int i = 0; 98 1 delayms(2);
101 1 InitLcd1602(); 99 1 target = (usr.height) & 0x00ff;
102 1 IRIN_Init(); 100 1 At24c02Write(4, target);
103 1 Uart_Init(); 101 1 delayms(2);
104 1 pwm_left=10; 102 1 target = (usr.weight) >> 8;
105 1 b12=At24c02Read(1); 103 1 At24c02Write(5, target);
106 1 c12=At24c02Read(8); 104 1 delayms(2);
107 1 money = 120; 105 1 target = (usr.weight) & 0x00ff;
108 1 money=At24c02Read(5); 106 1 At24c02Write(6, target);
109 1 journey = (b12<<8)|c12; 107 1 delayms(2);
110 1 108 1 }
111 1 while(1) 109
112 1 { 110
113 2 run(); 111 void Bluetooth_Accept(){
114 2 ESP8266_Set("1111\r\n"); 112 1 int target1 = 0, target2 = 0, i = 0;
115 2 display(); 113 1 if(accept){
116 2 keypros(); 114 2 if(strstr(Recive_table, "inquire") != NULL){
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 3 115 3 memset(Recive_table, 0, sizeof(Recive_table));
116 3 sprintf(Recive_table, "speed:%d km/h mileage:%d m\r\n",speed, mileage);
117 3 Bluetooth_Set(Recive_table);
C51 COMPILER V9.56.0.0 MAIN 04/08/2022 03:21:37 PAGE 3
118 3 }else if(strstr(Recive_table, "set:") != NULL){
119 3 target1 = strstr(Recive_table, "(") - Recive_table;
120 3 target2 = strstr(Recive_table, ",") - Recive_table;
121 3 usr.height = 0;
122 3 for(i = target1 + 1; i < target2; i++){
123 4 usr.height = usr.height * 10 + (*(Recive_table + i) - 0x30);
124 4 }
125 3 Bluetooth_Set(Recive_table);
126 3 target1 = strstr(Recive_table, ",") - Recive_table;
127 3 target2 = strstr(Recive_table, ")") - Recive_table;
128 3 usr.weight = 0;
129 3 for(i = target1 + 1; i < target2; i++){
130 4 usr.weight = usr.weight * 10 + (*(Recive_table + i) - 0x30);
131 4 }
132 3 memset(Recive_table, 0, sizeof(Recive_table));
133 3 sprintf(Recive_table, "SET OK\r\n",usr.height, usr.weight);
134 3 Bluetooth_Set(Recive_table);
135 3
136 3 // 计算
137 3 usr.target_mileage = (usr.weight / usr.height) * (usr.weight / usr.height) / 22 * 3000;
138 3 usr.target_speed = 10 - (usr.weight / usr.height) * (usr.weight / usr.height) / 22 ;
139 3 saveUserInfo();
140 3 }
141 2 memset(Recive_table, 0, sizeof(Recive_table));
142 2 accept = 0;
143 2 }
144 1 }
145
146 void ReadData(){
147 1 mileage = At24c02Read(1) * 255 + At24c02Read(2);
148 1 set = At24c02Read(7);
149 1 if(set){
150 2 usr.height = 0;
151 2 usr.weight = 0;
152 2
153 2 At24c02Write(1, 0);
154 2 delayms(2);
155 2 At24c02Write(2, 0);
156 2 delayms(2);
157 2
158 2 At24c02Write(3, 0);
159 2 delayms(2);
160 2 At24c02Write(4, 0);
161 2 delayms(2);
162 2 At24c02Write(5, 0);
163 2 delayms(2);
164 2 At24c02Write(6, 0);
165 2
166 2 }else{
167 2 usr.height = At24c02Read(3) * 255 + At24c02Read(4);
168 2 usr.weight = At24c02Read(5) * 255 + At24c02Read(6);
169 2 }
170 1 }
171
172
173
174
175
176 void WriteData(){
177 1 int target = mileage >> 8;
178 1 At24c02Write(1, target);
179 1 delayms(2);
C51 COMPILER V9.56.0.0 MAIN 04/08/2022 03:21:37 PAGE 4
117 2 Delay10us(); 180 1 target = mileage & 0x00ff;
*** WARNING C206 IN LINE 117 OF main.c: 'Delay10us': missing function-prototype 181 1 At24c02Write(2, target);
118 2 } 182 1 delayms(2);
119 1 } 183 1 }
184
185 void main(void)
186 {
187 1 InitLcd1602();
188 1 IRIN_Init();
189 1 Uart_Init();
190 1 ReadData();
191 1 while(1)
192 1 {
193 2 run();
194 2 display();
195 2 Key_scan();
*** WARNING C206 IN LINE 195 OF main.c: 'Key_scan': missing function-prototype
196 2 Bluetooth_Accept();
197 2 WriteData();
198 2 }
199 1 }
200
201 void Uart_Interrupt() interrupt 4
202 {
203 1 static uchar i=0;
204 1 if( accept) return;
205 1 if(RI==1) {
206 2 RI=0;
207 2 Receive=SBUF; //MCU接收wifi模块反馈回来的数据
-
208 2 Recive_table[i]=Receive;
209 2 if((Recive_table[i]=='\r')){
210 3 i=0;
211 3 accept = 1;
212 3 }
213 2 else i++; //遇到换行 重
-新装值
214 2 }
215 1 else TI=0;
216 1 }
MODULE INFORMATION: STATIC OVERLAYABLE MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 179 ---- CODE SIZE = 1000 ----
CONSTANT SIZE = 22 ---- CONSTANT SIZE = 57 ----
XDATA SIZE = ---- ---- XDATA SIZE = ---- ----
PDATA SIZE = ---- ---- PDATA SIZE = ---- ----
DATA SIZE = 25 2 DATA SIZE = 53 6
IDATA SIZE = ---- ---- IDATA SIZE = ---- ----
BIT SIZE = ---- ---- BIT SIZE = 1 ----
END OF MODULE INFORMATION. END OF MODULE INFORMATION.

BIN
main.OBJ

Binary file not shown.

223
main.c

@ -4,19 +4,41 @@
#include "pwm.h" #include "pwm.h"
#include "i2c.h" #include "i2c.h"
#include "IRIN.h" #include "IRIN.h"
#include <string.h>
#include <stdio.h>
# include <stdlib.h>
unsigned char PuZh[]=" Pechin Science "; #define uint unsigned int
extern uint journey; #define uchar unsigned char
extern uint money;
extern uchar sudu;
unsigned int b12;
unsigned int c12;
typedef unsigned char uint8;
typedef unsigned int uint16;
unsigned int b123; extern uint mileage;
unsigned int c123; extern uint speed;
extern unsigned char pwm_left;
unsigned char code ASCII[15] = {'0','1','2','3','4','5','6','7','8','9','.','-','M'}; uint model = 0;
extern unsigned char pwm_value;
struct UserInfo{
int height;
int weight;
int target_mileage;
int target_speed;
};
uchar set = 0;
struct UserInfo usr;
/*****************相关变量**************/
uchar Receive;
uchar Recive_table[40]; //用于接收wifi模块反馈到MCU上的数据
bit accept = 0;
void delayms(unsigned int ms) void delayms(unsigned int ms)
{ {
@ -31,89 +53,164 @@ void delayms(unsigned int ms)
} }
} }
void Uart_Init() //使用定时器1作为波特率发生器(STC89C52、STC89C51、AT89C51等均可) void Uart_Init()
{ {
TMOD = 0x20 | 0x01; TMOD = 0x20 | 0x01;
SCON = 0x50;
SCON = 0x50; //设置串行方式 TH1 = 0xFD;
TL1 = TH1;
TH1 = 0xFD; //波特率9600 PCON = 0x00;
EA = 1;
TL1 = TH1; ES = 1;
TR1 = 1;
PCON = 0x00;
EA = 1; //总中断打开
ES = 1; //开串口中断
TR1 = 1; //启动定时器1
} }
void us_delay(uchar t) void us_delay(uchar t)
{ {
while(t--);
while(t--);
} }
void Send_Uart(uchar value) void Send_Uart(uchar value)
{ {
ES=0;
TI=0;
SBUF=value;
while(TI==0);
TI=0;
ES=1;
}
ES=0; //关闭串口中断 void Bluetooth_Set(uchar *puf)
{
TI=0; //清发送完毕中断请求标志位 while(*puf!='\0')
{
SBUF=value; //发送 Send_Uart(*puf);
us_delay(5);
while(TI==0); //等待发送完毕 puf++;
}
TI=0; //清发送完毕中断请求标志位 }
ES=1; //允许串口中断
} void saveUserInfo(){
int target = 0;
target = usr.height >> 8;
At24c02Write(3, target);
delayms(2);
target = (usr.height) & 0x00ff;
At24c02Write(4, target);
delayms(2);
target = (usr.weight) >> 8;
At24c02Write(5, target);
delayms(2);
target = (usr.weight) & 0x00ff;
At24c02Write(6, target);
delayms(2);
}
void ESP8266_Set(uchar *puf) // 数组指针*puf指向字符串数组
{ void Bluetooth_Accept(){
int target1 = 0, target2 = 0, i = 0;
if(accept){
if(strstr(Recive_table, "inquire") != NULL){
memset(Recive_table, 0, sizeof(Recive_table));
sprintf(Recive_table, "speed:%d km/h mileage:%d m\r\n",speed, mileage);
Bluetooth_Set(Recive_table);
}else if(strstr(Recive_table, "set:") != NULL){
target1 = strstr(Recive_table, "(") - Recive_table;
target2 = strstr(Recive_table, ",") - Recive_table;
usr.height = 0;
for(i = target1 + 1; i < target2; i++){
usr.height = usr.height * 10 + (*(Recive_table + i) - 0x30);
}
Bluetooth_Set(Recive_table);
target1 = strstr(Recive_table, ",") - Recive_table;
target2 = strstr(Recive_table, ")") - Recive_table;
usr.weight = 0;
for(i = target1 + 1; i < target2; i++){
usr.weight = usr.weight * 10 + (*(Recive_table + i) - 0x30);
}
memset(Recive_table, 0, sizeof(Recive_table));
sprintf(Recive_table, "SET OK\r\n",usr.height, usr.weight);
Bluetooth_Set(Recive_table);
// 计算
usr.target_mileage = (usr.weight / usr.height) * (usr.weight / usr.height) / 22 * 3000;
usr.target_speed = 10 - (usr.weight / usr.height) * (usr.weight / usr.height) / 22 ;
saveUserInfo();
}
memset(Recive_table, 0, sizeof(Recive_table));
accept = 0;
}
}
while(*puf!='\0') //遇到空格跳出循环 void ReadData(){
mileage = At24c02Read(1) * 255 + At24c02Read(2);
set = At24c02Read(7);
if(set){
usr.height = 0;
usr.weight = 0;
At24c02Write(1, 0);
delayms(2);
At24c02Write(2, 0);
delayms(2);
At24c02Write(3, 0);
delayms(2);
At24c02Write(4, 0);
delayms(2);
At24c02Write(5, 0);
delayms(2);
At24c02Write(6, 0);
}else{
usr.height = At24c02Read(3) * 255 + At24c02Read(4);
usr.weight = At24c02Read(5) * 255 + At24c02Read(6);
}
}
{
Send_Uart(*puf); //向WIFI模块发送控制指令。
us_delay(5);
puf++;
}
void WriteData(){
int target = mileage >> 8;
At24c02Write(1, target);
delayms(2);
target = mileage & 0x00ff;
At24c02Write(2, target);
delayms(2);
} }
void main(void) void main(void)
{ {
int i = 0;
InitLcd1602(); InitLcd1602();
IRIN_Init(); IRIN_Init();
Uart_Init(); Uart_Init();
pwm_left=10; ReadData();
b12=At24c02Read(1);
c12=At24c02Read(8);
money = 120;
money=At24c02Read(5);
journey = (b12<<8)|c12;
while(1) while(1)
{ {
run(); run();
ESP8266_Set("1111\r\n");
display(); display();
keypros(); Key_scan();
Delay10us(); Bluetooth_Accept();
WriteData();
} }
}
void Uart_Interrupt() interrupt 4
{
static uchar i=0;
if( accept) return;
if(RI==1) {
RI=0;
Receive=SBUF; //MCU接收wifi模块反馈回来的数据
Recive_table[i]=Receive;
if((Recive_table[i]=='\r')){
i=0;
accept = 1;
}
else i++; //遇到换行 重新装值
}
else TI=0;
} }

BIN
pro

Binary file not shown.

1392
pro.M51

File diff suppressed because it is too large Load Diff

7
pro.build_log.htm

@ -23,11 +23,12 @@ Project File Date: 05/31/2019
<h2>Output:</h2> <h2>Output:</h2>
Build target 'Target 1' Build target 'Target 1'
compiling IRIN.c... compiling main.c...
main.c(195): warning C206: 'Key_scan': missing function-prototype
linking... linking...
Program Size: data=71.5 xdata=0 code=2992 Program Size: data=111.3 xdata=0 code=5315
creating hex file from "pro"... creating hex file from "pro"...
"pro" - 0 Error(s), 0 Warning(s). "pro" - 0 Error(s), 1 Warning(s).
Build Time Elapsed: 00:00:01 Build Time Elapsed: 00:00:01
</pre> </pre>
</body> </body>

597
pro.hex

@ -1,223 +1,378 @@
:100A9E00313131310D0A0030313233343536373899 :10119800696E71756972650073706565643A256476
:060AAE00392E2D4D000061 :1011A800206B6D2F68206D696C656167653A2564F1
:1008A90011212050656368696E20536369656E6321 :1011B800206D0D0A007365743A0028002C00290080
:0308B900652000B7 :0911C800534554204F4B0D0A0061
:100A3D007C64EF4E60131CEC60087D0A1DED60F6C2 :0C12090002230000014E00C10901220078
:090A4D0080FAEF1F70EC1E80E935 :04135E007F027E008C
:010A5600227D :101362007C64EF4E60131CEC60087D0A1DED60F694
:100A8800758921759850758DFD858D8BE4F587D214 :0913720080FAEF1F70EC1E80E907
:060A9800AFD2ACD28E22A9 :01137B00224F
:10140700758921759850758DFD858D8BE4F587D28B
:06141700AFD2ACD28E2220
:07000300AE071FEE70FA22A8 :07000300AE071FEE70FA22A8
:0E0B7200C2ACC2998F993099FDC299D2AC22C3 :0E149800C2ACC2998F993099FDC299D2AC2294
:100A700012037BFF6011120B727F051200037401D9 :06137C007B007A007926D7
:080A800029F9E43AFA80E922A9 :10138200120525FF60111214987F051200037401E3
:10085300E4F50FF510120ACA120ADE120A88750BA4 :0813920029F9E43AFA80E9228E
:100863000A7F011209867532008F337F08120986C9 :1010DB00E54FFF3395E0FEAD077F031213EE1213BE
:100873007534008F357542007543787F05120986FC :1010EB005E7E00AF50AD077F041213EE12135EE568
:100883007542008F43E5334534F53AE535F53B12C0 :1010FB0051FF3395E0FEAD077F051213EE12135E21
:100893000B367BFF7A0A799E120A7012040912073B :10110B007E00AF52AD077F061213EE7F027E000208
:0608A300EC120B8580E958 :02111B0013625D
:100AF20075A0FFC287D286D285AFA0C285EF20E75C :100AF900E4F557F558F559F55AF55BF55C20090306
:010B0200F6FC :100B0900020D0D7560FF756111756298FB7A0079A8
:010B030022CF :100B190026121059E94A4B60337E007F287D007BFD
:100B1600AE07120AF2C287C2868EA0D285C285228D :100B2900007A00792612065E7560FF75611175629B
:100B2600AE07120AF2D287C2868EA0D285C285226D :100B3900A0850A63850B648510658511667B007A3B
:100B0400ED7004AC078004EF2440FCEC4480FF0249 :100B49000079261206E612137C020CFC7560FF750B
:020B14000B16BE :100B590061117562BD7B007A007926121059E94A44
:100A0400AE07AC0353050153060FED6003430640E4 :100B69004B7003020CFC7560FF7561117562C27BE5
:0D0A1400430680AF06120B16AF04020B263E :100B7900007A007926121059AE02C3E99426F55875
:100938008B118A128913120B04AB11AA12A9131274 :100B8900EE9400F5577560FF7561117562C47B00BD
:10094800037B60130513E5137002051214F91203F3 :100B99007A007926121059AE02C3E99426F55AEE65
:080958007BFF120B2680E22256 :100BA9009400F559E4F54FF550E5582401F55CE456
:100ACA007F38120B167F0C120B167F06120B167F3D :100BB9003557F55BC3E55C955AE5596480F8E55B03
:040ADA0001020B16F4 :100BC900648098502A7426255CF8E624D0FBE43426
:1008BC00010800010D00010E00010C00010B00C12C :100BD900FFFAAE4FAF507C007D0A12057DEF2BF571
:0708CC0083C1840209000052 :100BE90050EE3AF54F055CE55C7002055B80C51275
:1009A800E4FDFCC3ED9FEC9E5015E4FBFA0BBB0085 :100BF900137C7560FF7561117562C47A00792612DC
:0F09B800010ABA07F8BBD0F50DBD00010C80E4B1 :100C09001059AE02C3E99426F558EE9400F55775CC
:0109C700220D :100C190060FF7561117562C67B007A007926121032
:0F0B3600750D03850B0CC286D287D284C285222F :100C290059AE02C3E99426F55AEE9400F559E4F554
:0F0B4500750D03750C04D286C287C284D2852237 :100C390051F552E5582401F55CE43557F55BC3E5F8
:0B0B9B00E4F50D750C04D284C2852225 :100C49005C955AE5596480F8E55B648098502A748C
:0B0BA600E4F50C750D04C286D2872216 :100C590026255CF8E624D0FBE434FFFAAE51AF5206
:1009C800300418E508D3950D5004D2B58002C2B59D :100C69007C007D0A12057DEF2BF552EE3AF5510510
:0E09D800E508C394144006E4F50822C2B522D7 :100C79005CE55C7002055B80C57E007F287D007B9A
:1009E600300318E50ED3950C5004D2B48002C2B47D :100C8900007A00792612065E7560FF75611175623A
:0E09F600E50EC394144006E4F50E22C2B422AE :100C9900C8854F638550648551658552667B007AA6
:03001B00020A21B5 :100CA9000079261206E612137CAC4FAD50AE51AF57
:100A2100C0E0C0D0758DFC758B18050AE50A70020F :100CB900521205E4AC06AD0712057D7C007D1612C3
:0C0A31000509050E1209E6D0D0D0E03215 :100CC90005E47C0B7DB812057D8E538F54AC4FAD76
:050B8000120B85D2817B :100CD90050AE51AF521205E4AC06AD0712057D7C4A
:080B85007F017E02DEFEDFFAB3 :100CE900007D161205E4C3740A9FF556E49EF55576
:010B8D002245 :100CF9001210DB7E007F287D007B007A00792612A6
:0F0B5400D280120B80C280120B85C281020B85EA :040D0900065EC209B7
:0A0BB100C280120B80D280020B8577 :010D0D0022C3
:0208F700AD074B :100F17007F011212DCEF75F0FFA4FFAEF0C006C030
:1008F900E4FBFAEDC4131313540124FF9280ED2590 :100F2700077F021212DCEFFDD0E02DF511D0E0347F
:10090900E0FD120B80C281120B850BBB08E5D2807A :100F370000F5107F071212DC8F4EE54E6041E4F595
:10091900120B85D28130800F0AEAD394C840F6C2FF :100F47004FF550F551F552FD7F011213EE12135E66
:0E09290081120B857F0022C281120B857F0197 :100F5700E4FD7F021213EE12135EE4FD7F0312130A
:01093700229D :100F6700EE12135EE4FD7F041213EE12135EE4FD2E
:10096000E4FDFCD280120B85D281120B85EC25E0D0 :100F77007F051213EE12135EE4FD7F060213EE7F68
:10097000FCA280E4334204120B85C281120B850D68 :100F8700031212DCEF75F0FFA4FFAEF0C006C00736
:05098000BD08E5AF0415 :100F97007F041212DCEFFDD0E02DF550D0E03400D5
:01098500224F :100FA700F54F7F051212DCEF75F0FFA4FFAEF0C01E
:100A5700AC05A907120B547FA01208F7AF011208C3 :100FB70006C0077F061212DCEFFDD0E02DF552D0F8
:090A6700F7AF041208F7020BB10D :060FC700E03400F55122A8
:02098600AC07BC :10133F00E5107E00FD7F011213EE12135E7E00AFEB
:10098800120B547FA01208F7AF041208F7120B5489 :0F134F0011AD077F021213EE7F027E00021362C0
:0F0998007FA11208F7120960AD07120BB1AF056E :10139A0012141D121431121407120F1712123812D6
:0109A700222D :0D13AA000E1C12115E120AF912133F80EFA3
:100AB40053706565643A004B4D2F68004C3A004D05 :030023000211D1F6
:060AC40000513A002E0073 :0911D100C0E0C0D075D000C000E0
:1008D300024200070249000002440000014D0002E9 :1011DA00200925309820C29885992574262522F859
:1008E3003C0000024B0000C101C100C102014600EF :1011EA00A62574262522F8E6B40D07752200D20931
:0308F300015200AF :0811FA00800605228002C29963
:040B63007FE87E03A6 :07120200D000D0D0D0E03293
:0B0B6700EF1FAC0670011E4C70F62260 :1014450075A0FFC287D286D285AFA0C285EF20E7FF
:100ADE00758921758C3C758AB0D2A9D28CD2AFD2D1 :01145500F6A0
:040AEE00AAD28A22DC :011456002273
:100409003001030205F27F0A1209867549008F4AF5 :10146900AE07121445C287C2868EA0D285C28522D4
:10041900D3E5439407E5429400400A7F0512098613 :10147900AE07121445D287C2868EA0D285C28522B4
:100429007542008F43E4FDFF120B047BFF7A0A79C2 :10145700ED7004AC078004EF2440FCEC4480FF02ED
:10043900B4E4FDFF120938AE49AF4A7C007D64126D :02146700146906
:1004490003A67C007D0A1203A6ED2430FF120B26B9 :1013B700AE07AC0353050153060FED600343064028
:10045900AE49AF4A7C007D0A1203A67C007D0A12D0 :0D13C700430680AF06121469AF04021479CA
:1004690003A6ED2430FF120B26AE49AF4A7C007D6E :101267008B578A588959121457AB57AA58A959123C
:100479000A1203A6ED2430FF120B267BFF7A0A79B4 :10127700052560130559E5597002055814F912053B
:10048900BBE4FD7F0A1209387BFF7A0A79C07D0136 :0812870025FF12147980E22218
:10049900E4FF120938AE3AAF3B7C277D101203A660 :10141D007F381214697F0C1214697F061214697FCC
:1004A9007C007D0A1203A6ED2430FF120B26AE3A1A :04142D00010214693B
:1004B900AF3B7C037DE81203A67C007D0A1203A6EC :0B121500011500011400011300C10AC4
:1004C900ED2430FF120B26AE3AAF3B7C007D64125F :10131F00E4FDFCC3ED9FEC9E5015E4FBFA0BBB0004
:1004D90003A67C007D0A1203A6ED2430FF120B2629 :0F132F00010ABA07F8BBD0F50DBD00010C80E430
:1004E900AE3AAF3B7C007D0A1203A67C007D0A125E :01133E00228C
:1004F90003A6ED2430FF120B26AE3AAF3B7C007DFC :10123800E52445237004F513801DE5246401452346
:100509000A1203A6ED2430FF120B267BFF7A0A7923 :1012480070057513028010E5246402452370057546
:10051900C37D017F07120938D3E53B94E8E53A9496 :0F1258001305800375130A851314C290D29122D7
:10052900034031E53B2418FDE53A34FCFCE41202B2 :1012FE000515A20AB35017E51595145004D2B48003
:10053900C17B6F7A127903783B120116E4FBFA79D1 :10130E0002C2B4E515C394144006E4F51522C2B426
:10054900E078401200251202FA8E428F43AD437FB4 :01131E0022AC
:1005590005120A57AE42AF437C007D0A1203948EFE :0514A6001214ABD2811D
:10056900428F437BFF7A0A79C57D017F09120938D9 :0814AB007F017E02DEFEDFFA84
:10057900AE42AF437C037DE81203A67C007D0A12DC :0114B3002216
:1005890003A6ED2430FF120B26AE42AF437C007D5B :0F148900D2801214A6C2801214ABC2810214AB1F
:10059900641203A67C007D0A1203A6ED2430FF1223 :0A14BF00C2801214A6D2800214AB02
:1005A9000B26AE42AF437C007D0A1203A67C007D78 :02111D00AD071C
:1005B9000A1203A6ED2430FF120B267BFF7A0A7973 :10111F00E4FBFAEDC4131313540124FF9280ED2561
:1005C900C87D017F0E120938AE42AF437C007D0A17 :10112F00E0FD1214A6C2811214AB0BBB08E5D280EE
:1005D9001203A6ED2430FF120B26AE42AF437C0076 :10113F001214ABD28130800F0AEAD394C840F6C2A2
:0A05E9007D0A1203A68E428F432202 :0E114F00811214AB7F0022C2811214AB7F010B
:1007EC0020B43B120B6320B4327F0A120986754980 :01115D00226F
:1007FC00008F4A7F01120986753E008F3F7F0812D9 :1012B600E4FDFCD2801214ABD2811214ABEC25E013
:10080C0009867540008F41E53F4540F53AE541F5D5 :1012C600FCA280E43342041214ABC2811214AB0DAB
:10081C003B7F051209867542008F4330B4FD20B52D :0512D600BD08E5AF04B6
:10082C000B120B6320B502D20230B5FD20B21712A9 :0112DB0022F0
:10083C000B6320B20EE50BC394144005750B0180BD :1013EE00AC05A9071214897FA012111DAF011211AD
:07084C0002050B30B2FD2292 :0913FE001DAF0412111D0214BF01
:03000B000205F3F8 :0212DC00AC075D
:1005F300C0E0C0F0C083C082C0D075D000C000C0CE :1012DE001214897FA012111DAF0412111D12148950
:1006030001C002C003C004C005C006C007758C3C0E :0F12EE007FA112111D1212B6AD071214BFAF056A
:10061300758AB0054DE54D75F00584E5F07002B2BD :0112FD0022CE
:1006230000E54D75F00A84E5F06003020745E546F1 :1013D400004B4D2F6820006D20202020202020204D
:1006330060021546E55260021552754D00C2AA8547 :0A13E400200020004C004D004800DE
:10064300444B85454C754400754500D2AAAE4BAF6B :1012200002100000020C0000011200020A0000027D
:100653004C7C007D06120394AC06AD07E41202C184 :071230000E0000020800009F
:10066300E4FBFAF9783F120116C004C005C006C0C6 :0B14B400EF1FAC0670011E4C70F6220A
:1006730007AC3CAD3DE41202C1E4FBFAF9783F124A :10143100758921758CFC758A18D2A9D28CD2AFD24C
:100683000116D003D002D001D0001200251202FAC5 :04144100AAD28A227F
:100693008E3C8F3D300203020722AC3CAD3DE41299 :100E1C00E4FDFF1214577BFF7A1379D4E4FDFF1223
:1006A30002C17B9A7A997919783E1201161202FADD :100E2C001267AE0AAF0B7C007D6412058F7C007DCF
:1006B3008E498F4AAD4A7F0A120A57AC4BAD4CE4C0 :100E3C000A12058FED2430FF121479AE0AAF0B7C29
:1006C3001202C1E4FBFA79207840120116E4FBFA26 :100E4C00007D0A12058F7C007D0A12058FED24307F
:1006D30079A0784112021FC004C005C006C007AC50 :100E5C00FF121479AE0AAF0B7C007D0A12058FEDE0
:1006E3003AAD3BE41202C1D003D002D001D00012D4 :100E6C002430FF1214797BFF7A1379D5E4FD7F03CC
:1006F30000251202FA8E3A8F3B853A47853B4875AF :100E7C001212677BFF7A1379D4E4FD7F0812126794
:100703005000853B51AD517F08120A57120B63E528 :100E8C00AE10AF117C007D6412058F7C007D0A12C0
:1007130047F54F754E00AD4F7F01120A5780237581 :100E9C00058FED2430FF121479AE10AF117C007D5C
:100723003A00753B00754200754307AD3B7F0112EC :100EAC000A12058F7C007D0A12058FED2430FF128B
:100733000A57AD3B7F08120A57AD437F05120A578C :100EBC001479AE10AF117C007D0A12058FED243031
:10074300C202D007D006D005D004D003D002D00116 :100ECC00FF1214797BFF7A1379DBE4FD7F0B12128E
:0D075300D000D0D0D082D083D0F0D0E032E2 :100EDC0067E524452370087BFF7A1379E68025E5C6
:03001300020B8E4F :100EEC00246401452370087BFF7A1379E88015E5AB
:0D0B8E00C0E00545E54570020544D0E032A9 :100EFC0024640245237BFF70067A1379EA80057A15
:10001E00020366E86480F8E933E83360110460F0A7 :0B0F0C001379ECE4FD7F0D1212672248
:10002E00ED33EC337009E8FCE9FDEAFEEBFF220448 :10115E0020B5237FE87E031214B420B5160524E5CE
:10003E0060DED3EB9FEA9EE99DE8C2E78CF0C2F743 :10116E002470020523C39404E52394004005E4F59E
:10004E0095F0400CE8CCF8E9CDF9EACEFAEBCFFB0F :10117E0023F52430B5FD20B2107FE87E031214B49F
:10005E0012033185D0F05804700320D5B3E8047034 :0A118E0020B203754E0130B2FD22BD
:10006E00075002B2D502037092D5EC0460F7E4CCCF :03000B00020D0ED5
:10007E00C0E0C398F8603B94186008400DD0E0FBD8 :100D0E00C0E0C0F0C083C082C0D075D000C000C0AB
:10008E00020348E4FBFAC9FC8028E830E406E4C920 :0D0D1E0001C002C003C004C005C006C0072C
:10009E00FBE4CAFCE830E305E4C9CACBFCE854072C :100D2B00758CFC758A180509E50970020508121205
:1000AE006010F8C3E913F9EA13FAEB13FBEC13FC37 :100D3B00FEC3E50994F4E508648094815003020E28
:1000BE00D8F130F52FC3E49CFCEF9BFFEE9AFEEDDA :100D4B0001C2AA750800750900850C0E850D0F757B
:1000CE0099FDD0E0FBEF4E4D4C701222DB03020384 :100D5B000C00750D00D2AAAE0EAF0F7C007D0612F3
:1000DE006DEC2CFCEF33FFEE33FEED33FDED30E730 :100D6B00057DAC06AD07E41202C9E4FBFAF9783F46
:1000EE00EB020348EF2BFFEE3AFEED39FDD0E0FBBD :100D7B0012011EC004C005C006C007AC0AAD0BE4CF
:1000FE0050130BBB0003020370ED13FDEE13FEEF66 :100D8B001202C9E4FBFAF9783F12011ED003D0021C
:08010E0013FFEC13FC0203488F :100D9B00D001D00012002D1203028E0A8F0BAC0A69
:10011600EC4D6011E8497017ED33EC3304600DE4E3 :100DAB00AD0BE41202C97B9A7A997919783E12013C
:10012600FCFFFEFD22E933E8330470F80203661291 :100DBB001E1203028E0A8F0BAC0EAD0FE41202C98A
:10013600033158046009E4CC248150062850090292 :100DCB00E4FBFA7920784012011EE4FBFA79A07853
:10014600037028400302036DC0E0EB4A7044B98097 :100DDB0041120227C004C005C006C007AC10AD11FC
:1001560006D0E0FB02035CEF4E701CBD8008EBFF8F :100DEB00E41202C9D003D002D001D00012002D12A0
:10016600EAFEE9FD80EBE98DF0A4FEE5F00201FF71 :060DFB0003028E108F11AF
:10017600E9CDF9EAFEEBFFEF89F0A4FCE5F0CE89C4 :100E0100D007D006D005D004D003D002D001D00045
:10018600F0A42EFFE435F0CD89F0A42DFEE435F081 :0B0E1100D0D0D082D083D0F0D0E032EF
:100196008067EF4E7005BD80D780C3EF8BF0A4ACAF :03001300020016D2
:1001A600F0EE8BF0A42CFCE435F0F8EF8AF0A42CEA :0D001600C0E0050DE50D7002050CD0E032D4
:1001B600E5F038FCE433CB8DF0A42CFCE5F03BF8FD :1000260002036EE86480F8E933E83360110460F097
:1001C600EE8AF0A42CFCE5F038F8E433CF89F0A4ED :10003600ED33EC337009E8FCE9FDEAFEEBFF220440
:1001D6002CFCE5F038CF3400CE89F0A42FFFE5F0F3 :1000460060DED3EB9FEA9EE99DE8C2E78CF0C2F73B
:1001E6003EFEE433C98DF0A42EFEE5F039CD8AF04B :1000560095F0400CE8CCF8E9CDF9EACEFAEBCFFB07
:1001F600A42FFFE5F03EFEE43DFD33D0E0FB5007C3 :1000660012033985D0F05804700320D5B3E8047024
:100206000BBB000F020370EC2CFCEF33FFEE33FE4A :10007600075002B2D502037892D5EC0460F7E4CCBF
:06021600ED33FD02034878 :10008600C0E0C398F8603B94186008400DD0E0FBD0
:10021C00020370EC5D046005E85904700302036688 :10009600020350E4FBFAC9FC8028E830E406E4C910
:10022C00120331580460F6EC4860F2EC7004FDFEE9 :1000A600FBE4CAFCE830E305E4C9CACBFCE8540724
:10023C00FF22C860DB2481C85009C39860025006B5 :1000B6006010F8C3E913F9EA13FAEB13FBEC13FC2F
:10024C0002036D9850CAF582E9294B4A7005AB82BE :1000C600D8F130F52FC3E49CFCEF9BFFEE9AFEEDD2
:10025C0002035C75F0007C1A7880C3EF9BEE9AED7C :1000D60099FDD0E0FBEF4E4D4C701222DB0302037C
:10026C0099400DC3EF9BFFEE9AFEED99FDE842F02D :1000E60075EC2CFCEF33FFEE33FEED33FDED30E720
:10027C00DC23ACF0D0E0FFD0E0FED0E0FDAB822080 :1000F600EB020350EF2BFFEE3AFEED39FDD0E0FBAD
:10028C00E7101BEB60BAEC2CFCEF33FFEE33FEED0A :1001060050130BBB0003020378ED13FDEE13FEEF55
:10029C0033FD020348E803F830E705C0F075F000C1 :0801160013FFEC13FC0203507F
:1002AC00EF2FFFEE33FEED33FD40B830E7C280AAEE :10011E00EC4D6011E8497017ED33EC3304600DE4DB
:1002BC0075F020800E75F010800575F0087D007EBD :10012E00FCFFFEFD22E933E8330470F802036E1281
:1002CC00007F003392D530D5031203FBEC33401082 :10013E00033958046009E4CC248150062850090282
:1002DC00EF33FFEE33FEED33FDEC33FCD5F0ED22C6 :10014E000378284003020375C0E0EB4A7044B9807F
:0E02EC00E5F0247EA2D513CC92E7CDCEFF2202 :10015E0006D0E0FB020364EF4E701CBD8008EBFF7F
:1002FA00EDD2E7CD33EC3392D524814006E4FFFEFC :10016E00EAFEE9FD80EBE98DF0A4FEE5F002020760
:10030A00FDFC22FCE4CFCECDCC24E0501174FF805A :10017E00E9CDF9EAFEEBFFEF89F0A4FCE5F0CE89BC
:10031A00EDC3CC13CCCD13CDCE13CECF13CF0470F7 :10018E00F0A42EFFE435F0CD89F0A42DFEE435F079
:07032A00F030D5DE0203FBF9 :10019E008067EF4E7005BD80D780C3EF8BF0A4ACA7
:10033100E9D2E7C933E833F892D5EDD2E7CD33EC12 :1001AE00F0EE8BF0A42CFCE435F0F8EF8AF0A42CE2
:0703410033FC5002B2D5228B :1001BE00E5F038FCE433CB8DF0A42CFCE5F03BF8F5
:10034800EC30E7100FBF000C0EBE00080DBD000416 :1001CE00EE8AF0A42CFCE5F038F8E433CF89F0A4E5
:100358000BEB6014A2D5EB13FCED92E7FD2274FFC2 :1001DE002CFCE5F038CF3400CE89F0A42FFFE5F0EB
:10036800FCFDFEFF22E480F8A2D574FF13FC7D801B :1001EE003EFEE433C98DF0A42EFEE5F039CD8AF043
:03037800E480EF2F :1001FE00A42FFFE5F03EFEE43DFD33D0E0FB5007BB
:0300000002076094 :10020E000BBB000F020378EC2CFCEF33FFEE33FE3A
:0C076000787FE4F6D8FD7581520207A7EF :06021E00ED33FD02035068
:10037B00BB010689828A83E0225002E722BBFE0280 :10022400020378EC5D046005E85904700302036E70
:09038B00E32289828A83E49322B3 :10023400120339580460F6EC4860F2EC7004FDFED9
:10039400EF8DF0A4A8F0CF8CF0A428CE8DF0A42E7D :10024400FF22C860DB2481C85009C39860025006AD
:0203A400FE2237 :100254000203759850CAF582E9294B4A7005AB82AE
:1003A600BC000BBE0029EF8DF084FFADF022E4CC3B :1002640002036475F0007C1A7880C3EF9BEE9AED6C
:1003B600F875F008EF2FFFEE33FEEC33FCEE9DEC04 :1002740099400DC3EF9BFFEE9AFEED99FDE842F025
:1003C600984005FCEE9DFE0FD5F0E9E4CEFD22ED4A :10028400DC23ACF0D0E0FFD0E0FED0E0FDAB822078
:1003D600F8F5F0EE8420D21CFEADF075F008EF2F94 :10029400E7101BEB60BAEC2CFCEF33FFEE33FEED02
:1003E600FFED33FD4007985006D5F0F222C398FD85 :1002A40033FD020350E803F830E705C0F075F000B1
:0503F6000FD5F0EA2222 :1002B400EF2FFFEE33FEED33FD40B830E7C280AAE6
:0E03FB00C3E49FFFE49EFEE49DFDE49CFC2213 :1002C40075F020800E75F010800575F0087D007EB5
:10076C00020853E493A3F8E493A34003F68001F248 :1002D400007F003392D530D50312061AEC33401058
:10077C0008DFF48029E493A3F85407240CC8C3338E :1002E400EF33FFEE33FEED33FDEC33FCD5F0ED22BE
:10078C00C4540F4420C8834004F456800146F6DF5D :0E02F400E5F0247EA2D513CC92E7CDCEFF22FA
:10079C00E4800B01020408102040809008A9E47E3C :10030200EDD2E7CD33EC3392D524814006E4FFFEF3
:1007AC00019360BCA3FF543F30E509541FFEE49352 :10031200FDFC22FCE4CFCECDCC24E0501174FF8052
:1007BC00A360010ECF54C025E060A840B8E493A319 :10032200EDC3CC13CCCD13CDCE13CECF13CF0470EF
:1007CC00FAE493A3F8E493A3C8C582C8CAC583CA44 :07033200F030D5DE02061ACF
:1007DC00F0A3C8C582C8CAC583CADFE9DEE780BEFC :10068A00E5742460F8E6057422785D300702786024
:0108F6000001 :10069A00E475F0011206280205252000EB7F2ED210
:1006AA00008018EF540F2490D43440D4FF30040B48
:1006BA00EF24BFB41A0050032461FFE575600215E8
:1006CA00750578E5787002057730070D785DE47571
:1006DA00F001120628EF02056B02128F7403D2078B
:1006EA008003E4C207F5748B5D8A5E895FE4F57561
:1006FA00F577F578E57560077F201206C580F575F0
:10070A0076FFC201C200C202C203C205C206C20803
:10071A00120693FF700D3007057F001206D6AF78D8
:10072A00AE7722B4255FC2D5C204120693FF24D045
:10073A00B40A00501A75F00A787530D50508B6FF64
:10074A000106C6A426F620D5047002D20380D92455
:10075A00CFB41A00EF5004C2E5D2040209C3D20191
:10076A0080C6D20080C0D20280BCD2D580BAD2055F
:10077A0080B47F201206C52002077401B5750040B7
:10078A00F112068AFF1206C50206FED208D20680B8
:10079A009512068AFB12068AFA12068AF94A4B70E1
:1007AA000679BA7A0A7BFF20022EE575602A7E0056
:1007BA008E8275830012053E60060EEE657670F035
:1007CA00C2D5EBC0E0EAC0E0E9C0E0EE120A23D0ED
:1007DA00E0F9D0E0FAD0E0FB120525FF60AAEBC0F1
:1007EA00E0EAC0E0E9C0E01206C5D0E02401F9D091
:1007FA00E03400FAD0E0FBE5760460DCD576D980F7
:10080A0087D20280A2120A0660F7E5767001041206
:10081A000383A976600DE576600914F576120AADB0
:10082A00EF60F3EA30E702F404C3995077EAF4255B
:10083A00760430E701E404F576800D120A0660C1F9
:10084A00EA05762576120383EA7873F630E701E43F
:10085A00257604D5760420050114120A23E4C0E0A3
:10086A00120AAD7873E6601320E70714F61206AD94
:10087A00802204F6D0E014C0E07F001206ADE576CF
:10088A0060071206A41576800B3005031206A4D061
:10089A00E00206FED0E00480C5120A0660A0E576F2
:1008AA00041203837873EAF6E576200502600104F0
:0508BA002404120A23D2
:1008BF0074FF04C0E0120AAD1206ADE57620050202
:1008CF0060031206A4D0E0B576E87F451206B7782C
:1008DF0073E67F2B30E7047F2DF404C0E01206C5CA
:1008EF00D0E075F00A84C0F01206AED0E01206AE6A
:1008FF000206FE791080027908C206C2088008D26B
:10090F00D5790A8004790AC2D5E576047002F576A6
:10091F00E4FAFDFEFF12068AFC7B08200113120683
:10092F008AFD7B1030000A12068AFE12068AFF7BB0
:10093F0020EC3382D592D55013C3E43000069FFFCD
:10094F00E49EFEE42001039DFDE49CFCE4CBF8C291
:10095F0001EC700CCFCECDCCE824F8F870F38017F3
:10096F00C3EF33FFEE33FEED33FDEC33FCEB33FB24
:10097F00994002FB0FD8E9EB300105F8D0E0C448ED
:10098F00B201C0E00AEC4D4E4F78207B0070C2EAF6
:10099F00B5760040BCC0E0120A25D0F0D0E02001AF
:1009AF0004C4C0E0C4B201C0F01206AED0F0D5F05E
:1009BF00EB0206FE120638079B53090258076C4CD0
:1009CF0007684209064F090E44090E49078143097A
:1009DF00145508454608A345080F470ADA50077013
:1009EF002D07742E07972B0778230795200AC32A04
:1009FF000730480000078FE576B4FF0375760612BF
:100A0F00068AFC12068AFD12068AFE12068AFF78F3
:100A1F006C0203B2790AA2D5200314300509B9106C
:100A2F00020404B9080104A2D520060250010420D3
:100A3F0002689202B575005034C0E07F2030031970
:100A4F007F30A20272067205500F120A7CC202C2D8
:100A5F0006C205C2087F30800F300503E9C0E012DF
:100A6F0006C5300503D0E0F9D0E0B575CC300517D9
:100A7F007F30B9100C1206C57F583004077F78807D
:100A8F0003B908031206C53002057F2D0206C57F84
:100A9F00202008F87F2B2006F322920280CF7F00C0
:100AAF00B407005005246CF8E6FF22286E756C6CB5
:100ABF002900D20112068A3001F8C201787530D5AB
:100ACF000108F60207302D5043495812068A2403B5
:100ADF00B405004001E4900AD5931206B6743A1299
:0A0AEF0006B6D20375750402090271
:10033900E9D2E7C933E833F892D5EDD2E7CD33EC0A
:0703490033FC5002B2D52283
:10035000EC30E7100FBF000C0EBE00080DBD00040E
:100360000BEB6014A2D5EB13FCED92E7FD2274FFBA
:10037000FCFDFEFF22E480F8A2D574FF13FC7D8013
:03038000E480EF27
:10038300F920E72824F950037907E4F42402FB1841
:10039300DBFDE624FB5014E9600DE4F618E604F6F1
:0F03A300B40A08E4F6D9F57401F60A22C2D5228D
:1003B200ED33EC3392D5FA602AB4FF33EDC2E77B1A
:1003C200FF60067A0379D7E4227A0379E020D50424
:1003D2007A0379DB224E614E002B494E46002D49AD
:1003E2004E4600E47A08F608DAFC7B00740722E83D
:1003F200C0E0ECC0E0EDC0E0EEC0E0EFC0E0EA75C6
:10040200F010A4CAABF075F04DA42BFBE435F0FC60
:10041200EA2410FAEB34C5FBEC34D9FCEDC2E7FF59
:1004220075F056A4F42411C5F0F434C58FF0A42A53
:10043200E5F03BE43CF620E7141204E5D0E0FFD0FF
:10044200E0FED0E0FDD0E0FC1202278014F404129A
:1004520004E5D0E0FFD0E0FED0E0FDD0E0FC1201E8
:100462001ED0E0F8E6FAEDD2E7CD33EC332482FB7E
:10047200E4C3CF33CFCE33CECD33CD33DBF37B07E3
:1004820075F00A846004F6081B0AE5F0F6088FF09E
:10049200740AA4FFACF08EF0740AA42CFEACF050E7
:1004A200010C8DF0740AA42CFDE435F0F608DBDEB5
:0304B200740722AA
:1004B5003F8000004120000042C80000447A00004F
:1004C500461C400047C35000497424004B189680D1
:1004D5004CBEBC205A0E1BCA6753C21C749DC5AEC8
:1004E500FB60065407601C2323120513EB54386088
:1004F500091204FF12050E12011EECF8EDF9EEFAD1
:10050500EFCB22EB12050E80F1543803241C900426
:10051500B5FE93FC0EEE93FD0EEE930ECE93FF22E9
:03000000020FCD1F
:0C0FCD00787FE4F6D8FD758178021014DE
:10052500BB010689828A83E0225002E722BBFE02D4
:09053500E32289828A83E4932207
:10053E00BB010CE58229F582E5833AF583E0225072
:10054E0006E92582F8E622BBFE06E92582F8E222BC
:0D055E00E58229F582E5833AF583E49322D6
:10056B00BB010689828A83F0225002F722BBFE016F
:02057B00F32269
:10057D00EF8DF0A4A8F0CF8CF0A428CE8DF0A42E92
:02058D00FE224C
:10058F00BC000BBE0029EF8DF084FFADF022E4CC50
:10059F00F875F008EF2FFFEE33FEEC33FCEE9DEC19
:1005AF00984005FCEE9DFE0FD5F0E9E4CEFD22ED5F
:1005BF00F8F5F0EE8420D21CFEADF075F008EF2FA9
:1005CF00FFED33FD4007985006D5F0F222C398FD9A
:0505DF000FD5F0EA2237
:1005E400C2D5EC30E709B2D5E4C39DFDE49CFCEE32
:1005F40030E715B2D5E4C39FFFE49EFE12058FC316
:10060400E49DFDE49CFC800312058F30D507C3E410
:060614009FFFE49EFE22A0
:0E061A00C3E49FFFE49EFEE49DFDE49CFC22F1
:10062800FAE6FB0808E6F925F0F618E6CA3AF622D3
:10063800D083D082F8E4937012740193700DA3A351
:1006480093F8740193F5828883E473740293686065
:06065800EFA3A3A380DF65
:10128F00EFB40A07740D12129A740A309811A899C4
:10129F00B8130CC2983098FDA899C298B811F630BF
:0712AF0099FDC299F5992297
:101059008B5D8A5E895FAB60AA61A9621205256012
:1010690063AB5DAA5EA95F120525605F8560638534
:1010790061648562658B668A678968AB63AA64A9BE
:1010890065120525FF6023AB66AA67A968120525C5
:101099006F7017042565F565E43564F564740125F9
:1010A90068F568E43567F56780D1AB63AA64A9651B
:1010B9001205257002800D7401255FF55FE4355E28
:1010C900F55E809DAB5DAA5EA95F227B007A0079FF
:0210D9000022F3
:10065E00EF4E6012EF60010EEDBB010B89828A83B3
:10066E00F0A3DFFCDEFA2289F05007F709DFFCA9C0
:0C067E00F022BBFEFCF309DFFCA9F02217
:100FD90002139AE493A3F8E493A34003F68001F281
:100FE90008DFF48029E493A3F85407240CC8C33319
:100FF900C4540F4420C8834004F456800146F6DFE8
:10100900E4800B0102040810204080901209E47E5C
:10101900019360BCA3FF543F30E509541FFEE493DC
:10102900A360010ECF54C025E060A840B8E493A3A3
:10103900FAE493A3F8E493A3C8C582C8CAC583CACE
:10104900F0A3C8C582C8CAC583CADFE9DEE780BE86
:0112370000B6
:00000001FF :00000001FF

109
pro.uvgui.QY

File diff suppressed because one or more lines are too long

6
pro.uvopt

@ -191,7 +191,7 @@
<GroupNumber>1</GroupNumber> <GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber> <FileNumber>1</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName> <PathWithFileName>.\main.c</PathWithFileName>
@ -203,7 +203,7 @@
<GroupNumber>1</GroupNumber> <GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber> <FileNumber>2</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>.\lcd.c</PathWithFileName> <PathWithFileName>.\lcd.c</PathWithFileName>
@ -215,7 +215,7 @@
<GroupNumber>1</GroupNumber> <GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber> <FileNumber>3</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>.\pwm.c</PathWithFileName> <PathWithFileName>.\pwm.c</PathWithFileName>

172
pwm.LST

@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 PWM 04/06/2022 22:23:01 PAGE 1 C51 COMPILER V9.56.0.0 PWM 04/08/2022 03:07:52 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE PWM C51 COMPILER V9.56.0.0, COMPILATION OF MODULE PWM
@ -9,135 +9,67 @@ line level source
1 #include "pwm.h" 1 #include "pwm.h"
2 2
3 unsigned char pwm_val_left =0;//变量定义 3 unsigned char pwm_val_right =0;
4 unsigned char push_val_left =0;// 左电机占空比N/20 4 unsigned char push_val_right=0;
5 unsigned char pwm_val_right =0; 5
6 unsigned char push_val_right=0;// 右电机占空比N/20 6 unsigned char pwm_value=0;
7 unsigned char pwm_left=0; 7
8 8 extern uint model;
9 bit Right_moto_stop=1; 9
10 bit Left_moto_stop =1; 10 bit Right_moto_stop = 0;
11 11
12 unsigned int time1=0; 12 void delay(unsigned int k)
13 13 {
14 14 1 unsigned int x,y;
15 15 1 for(x=0;x<k;x++)
16 /************************************************************************/ 16 1 for(y=0;y<2000;y++);
17 //延时函数 17 1 }
18 void delay(unsigned int k) 18
19 { 19 void run(void)
20 1 unsigned int x,y; 20 {
21 1 for(x=0;x<k;x++) 21 1 if(model == 0) pwm_value = 0;
22 1 for(y=0;y<2000;y++); 22 1 else if(model == 1) pwm_value = 2;
23 1 } 23 1 else if(model == 2) pwm_value = 5;
24 /************************************************************************/ 24 1 else pwm_value = 10;
25 //前速前进 25 1 push_val_right=pwm_value;
26 void run(void) 26 1 Right_moto_back;
27 { 27 1 }
28 1 push_val_left=3; //速度调节变量 0-20。。。0最小,20最大 28
29 1 push_val_right=pwm_left; 29 void pwm_out_right_moto(void)
30 1 Left_moto_go ; //左电机往前走 30 {
31 1 Right_moto_go ; //右电机往前走 31 1 pwm_val_right++;
32 1 } 32 1 if(~Right_moto_stop){
33 33 2 if(pwm_val_right <= push_val_right)
34 void backrun(void) 34 2 {
35 { 35 3 Right_moto_pwm=1;
36 1 push_val_left=3; //速度调节变量 0-20。。。0最小,20最大 36 3 }
37 1 push_val_right=4; 37 2 else
38 1 Left_moto_back; //左电机往前走 38 2 {
39 1 Right_moto_back; //右电机往前走 39 3 Right_moto_pwm=0;
40 1 } 40 3 }
41 41 2 if(pwm_val_right>=20) pwm_val_right=0;
42 42 2 }
43 //左转 43 1 else{
44 void leftrun(void) 44 2 Right_moto_pwm=0;
45 { 45 2 }
46 1 push_val_left=0; 46 1 }
47 1 push_val_right=4; 47
48 1 Right_moto_go ; //右电机往前走 48
49 1 } 49
50 50
51 51
52 //右转
53 void rightrun(void)
54 {
55 1 push_val_right=0;
C51 COMPILER V9.56.0.0 PWM 04/06/2022 22:23:01 PAGE 2
56 1 push_val_left=4;
57 1 Left_moto_go ; //左电机往前走
58 1 }
59
60
61 void pwm_out_left_moto(void)
62 {
63 1 if(Left_moto_stop)
64 1 {
65 2 if(pwm_val_left<=push_val_left)
66 2 {
67 3 Left_moto_pwm=1;
68 3 }
69 2 else
70 2 {
71 3 Left_moto_pwm=0;
72 3 }
73 2 if(pwm_val_left>=20)
74 2 pwm_val_left=0;
75 2 }
76 1 else
77 1 {
78 2 Left_moto_pwm=0;
79 2 }
80 1 }
81 /******************************************************************/
82 /* 右电机调速 */
83 void pwm_out_right_moto(void)
84 {
85 1 if(Right_moto_stop)
86 1 {
87 2 if(pwm_val_right<=push_val_right)
88 2 {
89 3 Right_moto_pwm=1;
90 3 }
91 2 else
92 2 {
93 3 Right_moto_pwm=0;
94 3 }
95 2 if(pwm_val_right>=20)
96 2 pwm_val_right=0;
97 2 }
98 1 else
99 1 {
100 2 Right_moto_pwm=0;
101 2 }
102 1 }
103
104 void timer1()interrupt 3
105 {
106 1 TH1=0XFc; //1Ms定时
107 1 TL1=0X18;
108 1 time1++;
109 1 // pwm_val_left++;
110 1 pwm_val_right++;
111 1 // pwm_out_left_moto();
112 1 pwm_out_right_moto();
113 1 }
114
115
116
117
C51 COMPILER V9.56.0.0 PWM 04/06/2022 22:23:01 PAGE 3
MODULE INFORMATION: STATIC OVERLAYABLE MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 172 ---- CODE SIZE = 112 ----
C51 COMPILER V9.56.0.0 PWM 04/08/2022 03:07:52 PAGE 2
CONSTANT SIZE = ---- ---- CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ---- XDATA SIZE = ---- ----
PDATA SIZE = ---- ---- PDATA SIZE = ---- ----
DATA SIZE = 7 ---- DATA SIZE = 3 ----
IDATA SIZE = ---- ---- IDATA SIZE = ---- ----
BIT SIZE = 2 ---- BIT SIZE = 1 ----
END OF MODULE INFORMATION. END OF MODULE INFORMATION.

BIN
pwm.OBJ

Binary file not shown.

128
pwm.c

@ -1,116 +1,50 @@
#include "pwm.h" #include "pwm.h"
unsigned char pwm_val_left =0;//变量定义
unsigned char push_val_left =0;// 左电机占空比N/20
unsigned char pwm_val_right =0; unsigned char pwm_val_right =0;
unsigned char push_val_right=0;// 右电机占空比N/20 unsigned char push_val_right=0;
unsigned char pwm_left=0;
bit Right_moto_stop=1; unsigned char pwm_value=0;
bit Left_moto_stop =1;
unsigned int time1=0; extern uint model;
bit Right_moto_stop = 0;
/************************************************************************/ void delay(unsigned int k)
//延时函数
void delay(unsigned int k)
{ {
unsigned int x,y; unsigned int x,y;
for(x=0;x<k;x++) for(x=0;x<k;x++)
for(y=0;y<2000;y++); for(y=0;y<2000;y++);
} }
/************************************************************************/
//前速前进
void run(void)
{
push_val_left=3; //速度调节变量 0-20。。。0最小,20最大
push_val_right=pwm_left;
Left_moto_go ; //左电机往前走
Right_moto_go ; //右电机往前走
}
void backrun(void) void run(void)
{ {
push_val_left=3; //速度调节变量 0-20。。。0最小,20最大 if(model == 0) pwm_value = 0;
push_val_right=4; else if(model == 1) pwm_value = 2;
Left_moto_back; //左电机往前走 else if(model == 2) pwm_value = 5;
Right_moto_back; //右电机往前走 else pwm_value = 10;
} push_val_right=pwm_value;
Right_moto_back;
//左转
void leftrun(void)
{
push_val_left=0;
push_val_right=4;
Right_moto_go ; //右电机往前走
} }
void pwm_out_right_moto(void)
//右转
void rightrun(void)
{ {
push_val_right=0; pwm_val_right++;
push_val_left=4; if(~Right_moto_stop){
Left_moto_go ; //左电机往前走 if(pwm_val_right <= push_val_right)
} {
Right_moto_pwm=1;
}
void pwm_out_left_moto(void) else
{ {
if(Left_moto_stop) Right_moto_pwm=0;
{ }
if(pwm_val_left<=push_val_left) if(pwm_val_right>=20) pwm_val_right=0;
{ }
Left_moto_pwm=1; else{
} Right_moto_pwm=0;
else }
{
Left_moto_pwm=0;
}
if(pwm_val_left>=20)
pwm_val_left=0;
}
else
{
Left_moto_pwm=0;
}
}
/******************************************************************/
/* 右电机调速 */
void pwm_out_right_moto(void)
{
if(Right_moto_stop)
{
if(pwm_val_right<=push_val_right)
{
Right_moto_pwm=1;
}
else
{
Right_moto_pwm=0;
}
if(pwm_val_right>=20)
pwm_val_right=0;
}
else
{
Right_moto_pwm=0;
}
} }
void timer1()interrupt 3
{
TH1=0XFc; //1Ms定时
TL1=0X18;
time1++;
// pwm_val_left++;
pwm_val_right++;
// pwm_out_left_moto();
pwm_out_right_moto();
}

21
pwm.h

@ -15,26 +15,15 @@ void pwm_out_right_moto(void);
//定义小车驱动模块输入IO口 //定义小车驱动模块输入IO口
sbit IN1=P0^4; sbit IN1=P1^0;
sbit IN2=P0^5; sbit IN2=P1^1;
sbit IN3=P0^6;
sbit IN4=P0^7;
sbit EN1=P3^4; sbit EN1=P3^4;
sbit EN2=P3^5;
sbit Left_moto_pwm=P3^5; //PWM信号端
sbit Right_moto_pwm=P3^4; //PWM信号端 sbit Right_moto_pwm=P3^4; //PWM信号端
#define Left_moto_go {IN3=0,IN4=1;} //左电机向前走
#define Left_moto_back {IN3=1,IN4=0;} //左边电机向后转
#define Left_moto_Stop {EN1=0;} //左边电机停转
#define Right_moto_go {IN1=1,IN2=0;} //右边电机向前走 #define Right_moto_go {IN1=1,IN2=0;} //右边电机向前走
#define Right_moto_back {IN1=0,IN2=1;} //右边电机向后走 #define Right_moto_back {IN1=0,IN2=1;} //右边电机向后走
#define Right_moto_Stop {EN2=0;} //右边电机停转 #define Right_moto_Stop {EN1=0;} //右边电机停转
#endif #endif
Loading…
Cancel
Save