📄 electromotion1.lst
字号:
C51 COMPILER V7.01 ELECTROMOTION1 08/29/2005 09:37:52 PAGE 1
C51 COMPILER V7.01, COMPILATION OF MODULE ELECTROMOTION1
OBJECT MODULE PLACED IN electromotion1.OBJ
COMPILER INVOKED BY: E:\Keil\C51\BIN\C51.EXE electromotion1.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #pragma small
2 #include "REG66X.H"
3 #include "motor_dri.h"
4
5
6
7 unsigned char respiration_ratio[6]= { 1, 2, 3, 4, 5, 6 }; //呼吸比对应1:0.5~1:3
8 unsigned char respiration_frequency; //呼吸频率
9 unsigned int tide; //潮气量
10 unsigned char ratio; //设定的吸呼比
11 unsigned int time_respiration; //一个呼吸周期时间ms
12
13 main()
14 {
15 1 unsigned int i,
16 1 motor_speed, //步进电机速度
17 1 motor_steps, //步进电机步数
18 1 time_inspiration, //吸气时间ms
19 1 time_inspiration_fact, //实际步进电机吸气时间ms
20 1 time_inspiration_plate; //吸气平台时间ms
21 1 unsigned long m_sp_temp = 0;
22 1 time_inspiration = 0;
23 1 time_inspiration_fact = 0;
24 1 time_inspiration_plate = 0;
25 1 ratio = respiration_ratio[1];
26 1 respiration_frequency = 20;
27 1 tide = 400;
28 1 time_respiration = (60*1000)/(unsigned int)respiration_frequency;
29 1 time_inspiration = time_respiration*2/(2+ratio);
30 1 time_inspiration_fact = time_inspiration*9/10;
31 1 time_inspiration_plate = time_inspiration/10;
32 1 motor_steps = tide*5/2; //根据潮气量得到总步数;
33 1 m_sp_temp = (unsigned long)time_inspiration_fact*1000;
34 1 m_sp_temp /=(unsigned long)motor_steps;
35 1 m_sp_temp -= 66;
36 1 m_sp_temp *= 2;
37 1 motor_speed = (unsigned int)m_sp_temp; //步进电机速度us(1个字=0.5us)
38 1 init_timer();
39 1 init_stepmotor();
40 1 //regress_stepmotor();
41 1 for(i=0;i<54000;i++);
42 1 while(1)
43 1 {
44 2
45 2 motor_driver(motor_speed,motor_steps,forward);
46 2 for(i=0;i<10000;i++);
47 2 motor_driver(motor_speed,motor_steps,backward);
48 2 for(i=0;i<10000;i++);
49 2 }
50 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 317 ----
CONSTANT SIZE = ---- ----
C51 COMPILER V7.01 ELECTROMOTION1 08/29/2005 09:37:52 PAGE 2
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 12 8
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -