Browse Source

完成外设驱动和调试

master
htujun 3 years ago
parent
commit
b58f854af4
  1. 330
      IRIN.LST
  2. BIN
      IRIN.OBJ
  3. 1
      IRIN.__i
  4. 40
      IRIN.c
  5. 6
      README.md
  6. 6
      i2c.LST
  7. BIN
      i2c.OBJ
  8. 1
      i2c.__i
  9. 4
      lcd.LST
  10. BIN
      lcd.OBJ
  11. 6
      lcd.h
  12. 154
      main.LST
  13. BIN
      main.OBJ
  14. 80
      main.c
  15. BIN
      pro
  16. 1074
      pro.M51
  17. 10
      pro.build_log.htm
  18. 223
      pro.hex
  19. 219
      pro.uvgui.QY
  20. 6
      pwm.LST
  21. BIN
      pwm.OBJ
  22. BIN
      原理图/原理图QX-mini51(开发板).pdf

330
IRIN.LST

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 21:56:10 PAGE 1
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE IRIN
@ -47,186 +47,180 @@ line level source @@ -47,186 +47,180 @@ line level source
38
39 void IRIN_Init(void)
40 {
41 1 TMOD=0x01;//定时器1工作方式1
41 1 TMOD=0x01 | 0x20 ;//定时器1工作方式1
42 1 TH0=0x3C;
43 1 TL0=0xb0;
44 1 ET0=1;
45 1 TH1=0XFc;
46 1 TL1=0X18;
47 1 ET1=1;
48 1 TR1=1;
49 1 TR0=1;
50 1 EA=1;
51 1 EX1=1;
52 1 IT1=1;
53 1
54 1 }
55
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 21:56:10 PAGE 2
45 1 TR0=1;
46 1 EA=1;
47 1 EX1=1;
48 1 IT1=1;
49 1 }
50
51 void display()
52 {
53 1 if(state==0)
54 1 {
55 2 sudu=At24c02Read(10);
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 23:56:38 PAGE 2
56 void display()
57 {
58 1 if(state==0)
59 1 {
60 2 sudu=At24c02Read(10);
61 2 if(money>7)
62 2 {
63 3 money=At24c02Read(5);
64 3 }
65 2 LcdSetCursor(0,0);
66 2 LcdShowStr(0,0,"Speed:");
67 2 Lcd1602_Write_Data(0x30+sudu/100%10);
68 2 Lcd1602_Write_Data(0x30+sudu/10%10);
69 2 Lcd1602_Write_Data(0x30+sudu%10);
70 2 LcdShowStr(10,0,"KM/h");
71 2
72 2 LcdShowStr(0,1,"L:");
73 2 Lcd1602_Write_Data(journey/10000%10+0x30);
74 2 Lcd1602_Write_Data(journey/1000%10+0x30);
75 2 Lcd1602_Write_Data(journey/100%10+0x30);
76 2 Lcd1602_Write_Data(journey/10%10+0x30);
77 2 Lcd1602_Write_Data(journey%10+0x30);
78 2 LcdShowStr(7,1,"M");
79 2
80 2 if(journey>1000)
81 2 {
82 3 money=(journey-1000)*0.002+7;
83 3 At24c02Write(5,money);
84 3 }
85 2 money=money*10;
86 2 LcdShowStr(9,1,"Q:");
87 2 Lcd1602_Write_Data(money/1000%10+0x30);
88 2 Lcd1602_Write_Data(money/100%10+0x30);
89 2 Lcd1602_Write_Data(money/10%10+0x30);
90 2 LcdShowStr(14,1,".");
91 2 Lcd1602_Write_Data(money%10+0x30);
92 2
93 2 money=money/10;
94 2
95 2
96 2 }
97 1 }
98
99
100
101 void keypros()
102 {
103 1 if(k2==0)
104 1 {
105 2 delay11(1000); //消抖处理
106 2 if(k2==0)
107 2 {
108 3 sudu=At24c02Read(10); //读取EEPROM地址1内的数据
56 2 if(money>7)
57 2 {
58 3 money=At24c02Read(5);
59 3 }
60 2 LcdSetCursor(0,0);
61 2 LcdShowStr(0,0,"Speed:");
62 2 Lcd1602_Write_Data(0x30+sudu/100%10);
63 2 Lcd1602_Write_Data(0x30+sudu/10%10);
64 2 Lcd1602_Write_Data(0x30+sudu%10);
65 2 LcdShowStr(10,0,"KM/h");
66 2
67 2 LcdShowStr(0,1,"L:");
68 2 Lcd1602_Write_Data(journey/10000%10+0x30);
69 2 Lcd1602_Write_Data(journey/1000%10+0x30);
70 2 Lcd1602_Write_Data(journey/100%10+0x30);
71 2 Lcd1602_Write_Data(journey/10%10+0x30);
72 2 Lcd1602_Write_Data(journey%10+0x30);
73 2 LcdShowStr(7,1,"M");
74 2
75 2 if(journey>1000)
76 2 {
77 3 money=(journey-1000)*0.002+7;
78 3 At24c02Write(5,money);
79 3 }
80 2 money=money*10;
81 2 LcdShowStr(9,1,"Q:");
82 2 Lcd1602_Write_Data(money/1000%10+0x30);
83 2 Lcd1602_Write_Data(money/100%10+0x30);
84 2 Lcd1602_Write_Data(money/10%10+0x30);
85 2 LcdShowStr(14,1,".");
86 2 Lcd1602_Write_Data(money%10+0x30);
87 2
88 2 money=money/10;
89 2
90 2 }
91 1 }
92
93
94
95 void keypros()
96 {
97 1 if(k2==0)
98 1 {
99 2 delay11(1000); //消抖处理
100 2 if(k2==0)
101 2 {
102 3 sudu=At24c02Read(10); //读取EEPROM地址1内的数据
103 3
104 3 b2=At24c02Read(1);
105 3 c2=At24c02Read(8);
106 3 journey=(b2<<8) | c2;
107 3
108 3 money=At24c02Read(5);
109 3
110 3 b2=At24c02Read(1);
111 3 c2=At24c02Read(8);
112 3 journey=(b2<<8) | c2;
113 3
114 3 money=At24c02Read(5);
115 3
116 3 }
117 2 while(!k2);
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 21:56:10 PAGE 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 1
120 1 if(k1==0)
121 1 {
122 2 delay11(1000); //消抖处理
123 2 if(k1==0)
124 2 {
125 3 flas=1;
126 3
127 3 }
128 2 while(!k1);
129 2 }
130 1 if(k4==0)
131 1 {
132 2 delay11(1000); //消抖处理
133 2 if(k4==0)
134 2 {
135 3 if(pwm_left>=20)
136 3 {
137 4 pwm_left=1;
138 4 }
139 3 else
140 3 {
141 4 pwm_left++;
142 4 }
143 3 }
144 2 while(!k4);
145 2 }
146 1
147 1 }
148
149 void time0() interrupt 1 //定时器 0
150 {
151 1 TH0=0x3C;
152 1 TL0=0xb0; //50ms定时
153 1 ms++; //变量50ms加一
154 1 if(ms%5==0) s0=~s0;
155 1
156 1
157 1 if(ms%10==0) //500ms定时
158 1 {
159 2
160 2 if(sec!=0) sec--;
161 2 if(sec1!=0) sec1--;
162 2 ms=0; //清零变量
163 2 EX1=0; //关闭外部中断,保证变量在计算的时候不会增加
164 2 r_s=count; //因为是500ms检测一次转动数据,所以要想一秒转动的圈数是 speed=count*2 ,但是光栅是一圈2
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;
165 2 //综合一下,一秒转动的圈数就是 speed=count*2/20 ==》 speed=counr/10;
166 2 count=0; //清零变量
167 2 EX1=1; //打开外部中断
168 2 speed=speed*0.5+(r_s*6)*0.5; // 这里r_s是一秒走的圈数,然后乘以60得到60秒走的圈数,单位变成了
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;
169 2
170 2 if(flas==0)
171 2 {
172 3 sudu=(0.15*speed);
173 3 At24c02Write(10,sudu);
174 3
175 3 journey=journey+(r_s*2.5/20);
176 3 journey1=journey;
177 3 c = journey & 0x00FF;
C51 COMPILER V9.56.0.0 IRIN 04/06/2022 21:56:10 PAGE 4
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 3 At24c02Write(8,c);
179 3
180 3 delay11(1000);
181 3 b=journey1>>8;
182 3 At24c02Write(1,b);
183 3 }
184 2 else
185 2 {
186 3 journey=0;
187 3 money=7;
188 3 At24c02Write(1,journey);
189 3 At24c02Write(8,journey);
190 3 At24c02Write(5,money);
191 3 flas=0;
192 3 }
193 2 }
194 1 }
195
196 void int1() interrupt 2 //外部中断 1
197 {
198 1
199 1 count++; //中断每触发一次,变量加一
200 1
201 1 }
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
203
204
205
206
207
208
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1016 ----
CODE SIZE = 1006 ----
CONSTANT SIZE = 22 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----

BIN
IRIN.OBJ

Binary file not shown.

1
IRIN.__i

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

40
IRIN.c

@ -38,19 +38,14 @@ void delay11(int i) @@ -38,19 +38,14 @@ void delay11(int i)
void IRIN_Init(void)
{
TMOD=0x01;//定时器1工作方式1
TMOD=0x01 | 0x20 ;//定时器1工作方式1
TH0=0x3C;
TL0=0xb0;
ET0=1;
TH1=0XFc;
TL1=0X18;
ET1=1;
TR1=1;
TR0=1;
EA=1;
EX1=1;
IT1=1;
}
void display()
@ -79,7 +74,7 @@ void display() @@ -79,7 +74,7 @@ void display()
if(journey>1000)
{
money=(journey-1000)*0.002+7;
money=(journey-1000)*0.002+7;
At24c02Write(5,money);
}
money=money*10;
@ -92,7 +87,6 @@ void display() @@ -92,7 +87,6 @@ void display()
money=money/10;
}
}
@ -169,26 +163,26 @@ void display() @@ -169,26 +163,26 @@ void display()
if(flas==0)
{
sudu=(0.15*speed);
At24c02Write(10,sudu);
sudu=(0.15*speed);
At24c02Write(10,sudu);
journey=journey+(r_s*2.5/20);
journey1=journey;
c = journey & 0x00FF;
At24c02Write(8,c);
journey=journey+(r_s*2.5/20);
journey1=journey;
c = journey & 0x00FF;
At24c02Write(8,c);
delay11(1000);
b=journey1>>8;
At24c02Write(1,b);
delay11(1000);
b=journey1>>8;
At24c02Write(1,b);
}
else
{
journey=0;
money=7;
At24c02Write(1,journey);
At24c02Write(8,journey);
At24c02Write(5,money);
flas=0;
journey=0;
money=7;
At24c02Write(1,journey);
At24c02Write(8,journey);
At24c02Write(5,money);
flas=0;
}
}
}

6
README.md

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
## 智能自行车
***
项目采用stc89c51作为主控,驱动包括LCD1602、AT24C02、红外测试模块、蓝牙HC-05

6
i2c.LST

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

BIN
i2c.OBJ

Binary file not shown.

1
i2c.__i

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

4
lcd.LST

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

BIN
lcd.OBJ

Binary file not shown.

6
lcd.h

@ -31,9 +31,9 @@ PIN @@ -31,9 +31,9 @@ PIN
#define LCD1602_DB P2 //data bus 数据总线
sbit LCD1602_RS=P1^6;
sbit LCD1602_RW=P1^5;
sbit LCD1602_EN=P1^4;
sbit LCD1602_RS=P0^7;
sbit LCD1602_RW=P0^6;
sbit LCD1602_EN=P0^5;
/**********************************

154
main.LST

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 21:56:09 PAGE 1
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE MAIN
@ -22,57 +22,127 @@ line level source @@ -22,57 +22,127 @@ line level source
13 unsigned int c12;
14
15
16
17 unsigned int b123;
18 unsigned int c123;
19 extern unsigned char pwm_left;
20 unsigned char code ASCII[15] = {'0','1','2','3','4','5','6','7','8','9','.','-','M'};
21
22 void delayms(unsigned int ms)
23 {
24 1 unsigned char i=100,j;
25 1 for(;ms;ms--)
26 1 {
27 2 while(--i)
28 2 {
29 3 j=10;
30 3 while(--j);
31 3 }
32 2 }
33 1 }
34
35 void main(void)
36 {
16 unsigned int b123;
17 unsigned int c123;
18 extern unsigned char pwm_left;
19 unsigned char code ASCII[15] = {'0','1','2','3','4','5','6','7','8','9','.','-','M'};
20
21 void delayms(unsigned int ms)
22 {
23 1 unsigned char i=100,j;
24 1 for(;ms;ms--)
25 1 {
26 2 while(--i)
27 2 {
28 3 j=10;
29 3 while(--j);
30 3 }
31 2 }
32 1 }
33
34 void Uart_Init() //使用定时器1作为波特率发生器(STC89C52、STC89C51、AT89C51
-等均可)
35 {
36 1 TMOD = 0x20 | 0x01;
37 1
38 1 InitLcd1602();
39 1 IRIN_Init();
40 1 pwm_left=10;
41 1 b12=At24c02Read(1);
42 1 c12=At24c02Read(8);
38 1 SCON = 0x50; //设置串行方式
39 1
40 1 TH1 = 0xFD; //波特率9600
41 1
42 1 TL1 = TH1;
43 1
44 1 money=At24c02Read(5);
45 1 journey = (b12<<8)|c12;
46 1 while(1)
47 1 {
48 2 run();
49 2 display();
50 2 keypros();
51 2 }
52 1
53 1 }
44 1 PCON = 0x00;
45 1
46 1 EA = 1; //总中断打开
47 1
48 1 ES = 1; //开串口中断
49 1
50 1 TR1 = 1; //启动定时器1
51 1
52 1 }
53
54 void us_delay(uchar t)
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 2
55
56 {
57 1
58 1 while(t--);
59 1
60 1 }
61
62 void Send_Uart(uchar value)
63
64 {
65 1
66 1 ES=0; //关闭串口中断
67 1
68 1 TI=0; //清发送完毕中断请求标志位
69 1
70 1 SBUF=value; //发送
71 1
72 1 while(TI==0); //等待发送完毕
73 1
74 1 TI=0; //清发送完毕中断请求标志位
75 1
76 1 ES=1; //允许串口中断
77 1
78 1 }
79
80 void ESP8266_Set(uchar *puf) // 数组指针*puf指向字符串数组
81
82 {
83 1
84 1 while(*puf!='\0') //遇到空格跳出循环
85 1
86 1 {
87 2
88 2 Send_Uart(*puf); //向WIFI模块发送控制指令。
89 2
90 2 us_delay(5);
91 2
92 2 puf++;
93 2
94 2 }
95 1
96 1 }
97
98 void main(void)
99 {
100 1 int i = 0;
101 1 InitLcd1602();
102 1 IRIN_Init();
103 1 Uart_Init();
104 1 pwm_left=10;
105 1 b12=At24c02Read(1);
106 1 c12=At24c02Read(8);
107 1 money = 120;
108 1 money=At24c02Read(5);
109 1 journey = (b12<<8)|c12;
110 1
111 1 while(1)
112 1 {
113 2 run();
114 2 ESP8266_Set("1111\r\n");
115 2 display();
116 2 keypros();
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 23:54:42 PAGE 3
117 2 Delay10us();
*** WARNING C206 IN LINE 117 OF main.c: 'Delay10us': missing function-prototype
118 2 }
119 1 }
C51 COMPILER V9.56.0.0 MAIN 04/06/2022 21:56:09 PAGE 2
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 86 ----
CONSTANT SIZE = 15 ----
CODE SIZE = 179 ----
CONSTANT SIZE = 22 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 25 ----
DATA SIZE = 25 2
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)

BIN
main.OBJ

Binary file not shown.

80
main.c

@ -13,7 +13,6 @@ unsigned int b12; @@ -13,7 +13,6 @@ unsigned int b12;
unsigned int c12;
unsigned int b123;
unsigned int c123;
extern unsigned char pwm_left;
@ -32,22 +31,89 @@ void delayms(unsigned int ms) @@ -32,22 +31,89 @@ void delayms(unsigned int ms)
}
}
void main(void)
void Uart_Init() //使用定时器1作为波特率发生器(STC89C52、STC89C51、AT89C51等均可)
{
TMOD = 0x20 | 0x01;
SCON = 0x50; //设置串行方式
TH1 = 0xFD; //波特率9600
TL1 = TH1;
PCON = 0x00;
EA = 1; //总中断打开
ES = 1; //开串口中断
TR1 = 1; //启动定时器1
}
void us_delay(uchar t)
{
while(t--);
}
void Send_Uart(uchar value)
{
ES=0; //关闭串口中断
TI=0; //清发送完毕中断请求标志位
SBUF=value; //发送
while(TI==0); //等待发送完毕
TI=0; //清发送完毕中断请求标志位
ES=1; //允许串口中断
}
void ESP8266_Set(uchar *puf) // 数组指针*puf指向字符串数组
{
while(*puf!='\0') //遇到空格跳出循环
{
Send_Uart(*puf); //向WIFI模块发送控制指令。
us_delay(5);
puf++;
}
}
void main(void)
{
int i = 0;
InitLcd1602();
IRIN_Init();
Uart_Init();
pwm_left=10;
b12=At24c02Read(1);
c12=At24c02Read(8);
money = 120;
money=At24c02Read(5);
journey = (b12<<8)|c12;
while(1)
{
run();
display();
keypros();
run();
ESP8266_Set("1111\r\n");
display();
keypros();
Delay10us();
}
}

BIN
pro

Binary file not shown.

1074
pro.M51

File diff suppressed because it is too large Load Diff

10
pro.build_log.htm

@ -18,21 +18,17 @@ Hex Converter: OH51.exe V2.7.0.0 @@ -18,21 +18,17 @@ Hex Converter: OH51.exe V2.7.0.0
CPU DLL: S8051.DLL V3.106.0.0
Dialog DLL: DP51.DLL V2.63.0.0
<h2>Project:</h2>
E:\项目\兼职项目\20220406-智能健身直行车\pro.uvproj
E:\ÏîÄ¿\¼æÖ°ÏîÄ¿\20220406-SmartBike\pro.uvproj
Project File Date: 05/31/2019
<h2>Output:</h2>
Build target 'Target 1'
compiling main.c...
compiling lcd.c...
compiling pwm.c...
compiling i2c.c...
compiling IRIN.c...
linking...
Program Size: data=69.5 xdata=0 code=2902
Program Size: data=71.5 xdata=0 code=2992
creating hex file from "pro"...
"pro" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:02
Build Time Elapsed: 00:00:01
</pre>
</body>
</html>

223
pro.hex

@ -1,110 +1,119 @@ @@ -1,110 +1,119 @@
:0F0AE200303132333435363738392E2D4D000050
:1008530011212050656368696E20536369656E6377
:030863006520000D
:100A41007C64EF4E60131CEC60087D0A1DED60F6BE
:090A510080FAEF1F70EC1E80E931
:010A5A002279
:1008E200120A8A1209EA750B0A7F0112096C753223
:1008F200008F337F0812096C7534008F357F051223
:10090200096C7542008F43E5334534F53AE535F518
:0C0912003B120AF11204091207EC80F5F8
:100A9E0075A0FFC296D295D294AFA0C294EF20E774
:010AAE00F651
:010AAF002224
:100AC200AE07120A9EC296C2958EA0D294C29422FA
:100AD200AE07120A9ED296C2958EA0D294C29422DA
:100AB000ED7004AC078004EF2440FCEC4480FF029E
:020AC0000AC268
:100A0800AE07AC0353050153060FED6003430640E0
:0D0A1800430680AF06120AC2AF04020AD2E4
:10091E008B0F8A108911120AB0AB0FAA10A91112EF
:10092E00037B60130511E5117002051014F9120313
:08093E007BFF120AD280E222C5
:100A8A007F38120AC27F0C120AC27F06120AC27F7C
:040A9A0001020AC289
:10086600010800010D00010E00010C00010B00C182
:0708760083C18402090000A8
:10098E00E4FDFCC3ED9FEC9E5015E4FBFA0BBB009F
:0F099E00010ABA07F8BBD0F50DBD00010C80E4CB
:0109AD002227
:0F0AF100750D03850B0CC286D287D284C2852275
:0F0B0000750D03750C04D286C287C284D285227C
:0B0B4800E4F50D750C04D284C2852278
:0B0B5300E4F50C750D04C286D2872269
:1009AE00300418E508D3950D5004D2B58002C2B5B7
:0E09BE00E508C394144006E4F50822C2B522F1
:1009CC00300318E50ED3950C5004D2B48002C2B497
:0E09DC00E50EC394144006E4F50E22C2B422C8
:03001B00020A25B1
:100A2500C0E0C0D0758DFC758B18050AE50A70020B
:0C0A35000509050E1209CCD0D0D0E0322B
:050B2D00120B32D28121
:080B32007F017E02DEFEDFFA06
:010B3A002298
:0F0B0F00D280120B2DC280120B32C281020B3228
:0A0B5E00C280120B2DD280020B3270
:0208A100AD07A1
:1008A300E4FBFAEDC4131313540124FF9280ED25E6
:1008B300E0FD120B2DC281120B320BBB08E5D28077
:1008C300120B32D28130800F0AEAD394C840F6C2A9
:0E08D30081120B327F0022C281120B327F0194
:0108E10022F4
:10094600E4FDFCD280120B32D281120B32EC25E090
:10095600FCA280E4334204120B32C281120B320D28
:05096600BD08E5AF042F
:01096B002269
:100A5B00AC05A907120B0F7FA01208A1AF0112085A
:090A6B00A1AF041208A1020B5E08
:02096C00AC07D6
:10096E00120B0F7FA01208A1AF041208A1120B0FD9
:0F097E007FA11208A1120946AD07120B5EAF054B
:01098D002247
:100A740053706565643A004B4D2F68004C3A004D45
:060A840000513A002E00B3
:10087D00024200070249000002440000014D00023F
:10088D003C0000024B0000C101C100C10201460045
:03089D0001520005
:040B1E007FE87E03EB
:0B0B2200EF1FAC0670011E4C70F622A5
:1009EA00758901758C3C758AB0D2A9758DFC758B99
:0E09FA0018D2ABD28ED28CD2AFD2AAD28A2221
:100409003001030205F27F0A12096C7549008F4A0F
:10041900D3E5439407E5429400400A7F0512096C2D
:100429007542008F43E4FDFF120AB07BFF7A0A7917
:1004390074E4FDFF12091EAE49AF4A7C007D6412C7
:1004490003A67C007D0A1203A6ED2430FF120AD20E
:100A9E00313131310D0A0030313233343536373899
:060AAE00392E2D4D000061
:1008A90011212050656368696E20536369656E6321
:0308B900652000B7
:100A3D007C64EF4E60131CEC60087D0A1DED60F6C2
:090A4D0080FAEF1F70EC1E80E935
:010A5600227D
:100A8800758921759850758DFD858D8BE4F587D214
:060A9800AFD2ACD28E22A9
:07000300AE071FEE70FA22A8
:0E0B7200C2ACC2998F993099FDC299D2AC22C3
:100A700012037BFF6011120B727F051200037401D9
:080A800029F9E43AFA80E922A9
:10085300E4F50FF510120ACA120ADE120A88750BA4
:100863000A7F011209867532008F337F08120986C9
:100873007534008F357542007543787F05120986FC
:100883007542008F43E5334534F53AE535F53B12C0
:100893000B367BFF7A0A799E120A7012040912073B
:0608A300EC120B8580E958
:100AF20075A0FFC287D286D285AFA0C285EF20E75C
:010B0200F6FC
:010B030022CF
:100B1600AE07120AF2C287C2868EA0D285C285228D
:100B2600AE07120AF2D287C2868EA0D285C285226D
:100B0400ED7004AC078004EF2440FCEC4480FF0249
:020B14000B16BE
:100A0400AE07AC0353050153060FED6003430640E4
:0D0A1400430680AF06120B16AF04020B263E
:100938008B118A128913120B04AB11AA12A9131274
:10094800037B60130513E5137002051214F91203F3
:080958007BFF120B2680E22256
:100ACA007F38120B167F0C120B167F06120B167F3D
:040ADA0001020B16F4
:1008BC00010800010D00010E00010C00010B00C12C
:0708CC0083C1840209000052
:1009A800E4FDFCC3ED9FEC9E5015E4FBFA0BBB0085
:0F09B800010ABA07F8BBD0F50DBD00010C80E4B1
:0109C700220D
:0F0B3600750D03850B0CC286D287D284C285222F
:0F0B4500750D03750C04D286C287C284D2852237
:0B0B9B00E4F50D750C04D284C2852225
:0B0BA600E4F50C750D04C286D2872216
:1009C800300418E508D3950D5004D2B58002C2B59D
:0E09D800E508C394144006E4F50822C2B522D7
:1009E600300318E50ED3950C5004D2B48002C2B47D
:0E09F600E50EC394144006E4F50E22C2B422AE
:03001B00020A21B5
:100A2100C0E0C0D0758DFC758B18050AE50A70020F
:0C0A31000509050E1209E6D0D0D0E03215
:050B8000120B85D2817B
:080B85007F017E02DEFEDFFAB3
:010B8D002245
:0F0B5400D280120B80C280120B85C281020B85EA
:0A0BB100C280120B80D280020B8577
:0208F700AD074B
:1008F900E4FBFAEDC4131313540124FF9280ED2590
:10090900E0FD120B80C281120B850BBB08E5D2807A
:10091900120B85D28130800F0AEAD394C840F6C2FF
:0E09290081120B857F0022C281120B857F0197
:01093700229D
:10096000E4FDFCD280120B85D281120B85EC25E0D0
:10097000FCA280E4334204120B85C281120B850D68
:05098000BD08E5AF0415
:01098500224F
:100A5700AC05A907120B547FA01208F7AF011208C3
:090A6700F7AF041208F7020BB10D
:02098600AC07BC
:10098800120B547FA01208F7AF041208F7120B5489
:0F0998007FA11208F7120960AD07120BB1AF056E
:0109A700222D
:100AB40053706565643A004B4D2F68004C3A004D05
:060AC40000513A002E0073
:1008D300024200070249000002440000014D0002E9
:1008E3003C0000024B0000C101C100C102014600EF
:0308F300015200AF
:040B63007FE87E03A6
:0B0B6700EF1FAC0670011E4C70F62260
:100ADE00758921758C3C758AB0D2A9D28CD2AFD2D1
:040AEE00AAD28A22DC
:100409003001030205F27F0A1209867549008F4AF5
:10041900D3E5439407E5429400400A7F0512098613
:100429007542008F43E4FDFF120B047BFF7A0A79C2
:10043900B4E4FDFF120938AE49AF4A7C007D64126D
:1004490003A67C007D0A1203A6ED2430FF120B26B9
:10045900AE49AF4A7C007D0A1203A67C007D0A12D0
:1004690003A6ED2430FF120AD2AE49AF4A7C007DC3
:100479000A1203A6ED2430FF120AD27BFF7A0A7909
:100489007BE4FD7F0A12091E7BFF7A0A79807D01D0
:10049900E4FF12091EAE3AAF3B7C277D101203A67A
:1004A9007C007D0A1203A6ED2430FF120AD2AE3A6F
:1004690003A6ED2430FF120B26AE49AF4A7C007D6E
:100479000A1203A6ED2430FF120B267BFF7A0A79B4
:10048900BBE4FD7F0A1209387BFF7A0A79C07D0136
:10049900E4FF120938AE3AAF3B7C277D101203A660
:1004A9007C007D0A1203A6ED2430FF120B26AE3A1A
:1004B900AF3B7C037DE81203A67C007D0A1203A6EC
:1004C900ED2430FF120AD2AE3AAF3B7C007D6412B4
:1004D90003A67C007D0A1203A6ED2430FF120AD27E
:1004C900ED2430FF120B26AE3AAF3B7C007D64125F
:1004D90003A67C007D0A1203A6ED2430FF120B2629
:1004E900AE3AAF3B7C007D0A1203A67C007D0A125E
:1004F90003A6ED2430FF120AD2AE3AAF3B7C007D51
:100509000A1203A6ED2430FF120AD27BFF7A0A7978
:10051900837D017F0712091ED3E53B94E8E53A94F0
:1004F90003A6ED2430FF120B26AE3AAF3B7C007DFC
:100509000A1203A6ED2430FF120B267BFF7A0A7923
:10051900C37D017F07120938D3E53B94E8E53A9496
:10052900034031E53B2418FDE53A34FCFCE41202B2
:10053900C17B6F7A127903783B120116E4FBFA79D1
:10054900E078401200251202FA8E428F43AD437FB4
:1005590005120A5BAE42AF437C007D0A1203948EFA
:10056900428F437BFF7A0A79857D017F0912091E33
:1005590005120A57AE42AF437C007D0A1203948EFE
:10056900428F437BFF7A0A79C57D017F09120938D9
:10057900AE42AF437C037DE81203A67C007D0A12DC
:1005890003A6ED2430FF120AD2AE42AF437C007DB0
:1005890003A6ED2430FF120B26AE42AF437C007D5B
:10059900641203A67C007D0A1203A6ED2430FF1223
:1005A9000AD2AE42AF437C007D0A1203A67C007DCD
:1005B9000A1203A6ED2430FF120AD27BFF7A0A79C8
:1005C900887D017F0E12091EAE42AF437C007D0A71
:1005D9001203A6ED2430FF120AD2AE42AF437C00CB
:1005A9000B26AE42AF437C007D0A1203A67C007D78
:1005B9000A1203A6ED2430FF120B267BFF7A0A7973
:1005C900C87D017F0E120938AE42AF437C007D0A17
:1005D9001203A6ED2430FF120B26AE42AF437C0076
:0A05E9007D0A1203A68E428F432202
:1007EC0020B43B120B1E20B4327F0A12096C7549DF
:1007FC00008F4A7F0112096C753E008F3F7F0812F3
:10080C00096C7540008F41E53F4540F53AE541F5EF
:10081C003B7F0512096C7542008F4330B4FD20B547
:10082C000B120B1E20B502D20230B5FD20B21712EE
:10083C000B1E20B20EE50BC394144005750B018002
:1007EC0020B43B120B6320B4327F0A120986754980
:1007FC00008F4A7F01120986753E008F3F7F0812D9
:10080C0009867540008F41E53F4540F53AE541F5D5
:10081C003B7F051209867542008F4330B4FD20B52D
:10082C000B120B6320B502D20230B5FD20B21712A9
:10083C000B6320B20EE50BC394144005750B0180BD
:07084C0002050B30B2FD2292
:03000B000205F3F8
:1005F300C0E0C0F0C083C082C0D075D000C000C0CE
@ -119,19 +128,19 @@ @@ -119,19 +128,19 @@
:100683000116D003D002D001D0001200251202FAC5
:100693008E3C8F3D300203020722AC3CAD3DE41299
:1006A30002C17B9A7A997919783E1201161202FADD
:1006B3008E498F4AAD4A7F0A120A5BAC4BAD4CE4BC
:1006B3008E498F4AAD4A7F0A120A57AC4BAD4CE4C0
:1006C3001202C1E4FBFA79207840120116E4FBFA26
:1006D30079A0784112021FC004C005C006C007AC50
:1006E3003AAD3BE41202C1D003D002D001D00012D4
:1006F30000251202FA8E3A8F3B853A47853B4875AF
:100703005000853B51AD517F08120A5B120B1EE569
:1007130047F54F754E00AD4F7F01120A5B8023757D
:100703005000853B51AD517F08120A57120B63E528
:1007130047F54F754E00AD4F7F01120A5780237581
:100723003A00753B00754200754307AD3B7F0112EC
:100733000A5BAD3B7F08120A5BAD437F05120A5B80
:100733000A57AD3B7F08120A57AD437F05120A578C
:10074300C202D007D006D005D004D003D002D00116
:0D075300D000D0D0D082D083D0F0D0E032E2
:03001300020B3BA2
:0D0B3B00C0E00545E54570020544D0E032FC
:03001300020B8E4F
:0D0B8E00C0E00545E54570020544D0E032A9
:10001E00020366E86480F8E933E83360110460F0A7
:10002E00ED33EC337009E8FCE9FDEAFEEBFF220448
:10003E0060DED3EB9FEA9EE99DE8C2E78CF0C2F743
@ -202,13 +211,13 @@ @@ -202,13 +211,13 @@
:1003E600FFED33FD4007985006D5F0F222C398FD85
:0503F6000FD5F0EA2222
:0E03FB00C3E49FFFE49EFEE49DFDE49CFC2213
:10076C000208E2E493A3F8E493A34003F68001F2B9
:10076C00020853E493A3F8E493A34003F68001F248
:10077C0008DFF48029E493A3F85407240CC8C3338E
:10078C00C4540F4420C8834004F456800146F6DF5D
:10079C00E4800B0102040810204080900853E47E92
:10079C00E4800B01020408102040809008A9E47E3C
:1007AC00019360BCA3FF543F30E509541FFEE49352
:1007BC00A360010ECF54C025E060A840B8E493A319
:1007CC00FAE493A3F8E493A3C8C582C8CAC583CA44
:1007DC00F0A3C8C582C8CAC583CADFE9DEE780BEFC
:0108A0000057
:0108F6000001
:00000001FF

219
pro.uvgui.QY

File diff suppressed because one or more lines are too long

6
pwm.LST

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
C51 COMPILER V9.56.0.0 PWM 04/06/2022 21:56:10 PAGE 1
C51 COMPILER V9.56.0.0 PWM 04/06/2022 22:23:01 PAGE 1
C51 COMPILER V9.56.0.0, COMPILATION OF MODULE PWM
@ -62,7 +62,7 @@ line level source @@ -62,7 +62,7 @@ line level source
53 void rightrun(void)
54 {
55 1 push_val_right=0;
C51 COMPILER V9.56.0.0 PWM 04/06/2022 21:56:10 PAGE 2
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 ; //左电机往前走
@ -126,7 +126,7 @@ line level source @@ -126,7 +126,7 @@ line level source
115
116
117
C51 COMPILER V9.56.0.0 PWM 04/06/2022 21:56:10 PAGE 3
C51 COMPILER V9.56.0.0 PWM 04/06/2022 22:23:01 PAGE 3

BIN
pwm.OBJ

Binary file not shown.

BIN
原理图/原理图QX-mini51(开发板).pdf

Binary file not shown.
Loading…
Cancel
Save