Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 52mcu four phase five wire stepper motor (3)-main.c #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

beautifulzzzz
Copy link
Collaborator

这里实现了52单片机控制5个独立的步进电机并发运作,其各自的速度、方向都可调整,此外还利用串口可以收集压力传感器的数据,但是采集频率过高就会影响步进电机的执行!

beautifulzzzz added 4 commits December 12, 2014 20:43
这里实现了52单片机控制5个独立的步进电机并发运作,其各自的速度、方向都可调整,此外还利用串口可以收集压力传感器的数据,但是采集频率过高就会影响步进电机的执行!
这个是main.c需要用到的关于控制步进电机的头文件
这里实现了通过串口控制5个步进电机和读取数据的帧约束。本工程的.h文件和上一个一样,这里不另外添加了。控制帧约束为:
/*-----------------------------------------------------------
采用帧格式为
a=='0'表示要重量数据
其他的为步进电机控制命令
0000 0000
前3位表示选择第几个步进电机的:000(1);001(2);010(3);011(4);100(5)
接下来2位表示控制方向命令:00(stop);01(go);10(back)
接下来3位表示档位:000(0档);001(1);002(2);003(3);...
-----------------------------------------------------------*/
details goto the 52mcu four phase five wire stepper motor (4)-main.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant