论文总字数:28504字
摘 要
STM32F30x是ST公司推出的基于Cortex-M4内核的高性能MCU,主要面向于模拟外设应用和电机控制设备,其拥有大量针对模拟应用和电机控制特有的外设。其例程包含有控制powerSTEP01的各种指令和寄存器。
结合实际需要和课题要求,本文融合了最新电子通信技术、自动控制技术、传感器自动检测技术、计算机技术于一体,完成了多控制功能、高可扩展性、优用户体验的控制终端系统。
本文兼容了上位机及触控屏两种用户接口,完成了对低速步进电机和高速直流电机两种电机的兼容式设计即对powerSTEP01的开发,这是对传统控制平台的升级,我们提高了控制速度,提高了反馈处理速度,从而使控制设备更方便快捷。
关键词:stm32,迪文屏,powerSTEP01,串口
Abstract
STM32F30x is a high performance MCU based on Cortex-M4 core launched by ST company. It is mainly for analog peripheral applications and motor control equipment. It has a large number of unique peripherals for analog applications and motor control. Its routine contains various instructions and registers that control powerSTEP01.
Combining the actual needs and the requirements of the subject, this paper combines the latest electronic communication technology, automatic control technology, automatic sensor detection technology and computer technology, and completes the control terminal system with multiple control functions, high scalability and excellent user experience.
We are compatible with the two user interfaces of the host computer and the touch screen. We have completed the development of the powerSTEP01 for the compatible design of the low speed stepping motor and the high speed DC motor. This is an upgrade to the traditional control platform. We have improved Controlling the speed and improving the feedback processing speed make the control device more convenient and faster.
KEY WORDS: stm32, Diwen screen, powerSTEP01, serial port
目 录
摘要………………………………………………………………………………….….…..……..Ⅰ
Abstract....…………………………………………………………….………………….………..Ⅱ
第一章 绪论…..…………………………………………………………………….……………1
1.1课题背景及意义….……………………………………………………….…………...1
1.2设计思路……………………………………………………………….…....................1
1.3论文结构…………………………………………………………….……....................1
第二章 基于STM32F303RE单片机的开发………………………………….………………..3
2.1单片机的介绍………………………………………………………..…………………..3
2.1.1开发板外观………………………………………………….…..………………...3
2.1.2板载资源……………………………………………………...…………………...4
2.1.3芯片特性…………………………………………………..….…………………...5
2.1.4内部电路及管脚………………………………………...…………….…………...5
2.2 STM32Cube架构……………………………………………………….………………7
2.2.1级别0…………………………………………………………...……….…………7
2.2.2级别1……………………………………………………………...…….…………8
2.2.3级别2………………………………………………………………………………8
2.3用于STM32Cube的X-CUBE-SPN3软件扩展…………………………….…………..8
2.4文件夹结构…………………………………………..……………….….……………...11
2.5 BSP文件夹………………………………………………….…………..………………11
2.6项目文件夹………………………………………………….………………..…………12
2.7例程分析…………………………………………………….…………………..………13
.
第三章 powerSTEP01的使用…………………………………………………...…...…………19
3.1模式选择…………………………………………………………….……………..……19
3.1.1相电流控制:电压模式……………………………………..…………..……….19
3.1.2相电流控制:电流模式……………………………………...….……………….19
3.2串行接口…………………………………………………………..……….……………20
3.3寄存器和标志说明…………………………………………….……………..…………21
3.3.1 ABS_POS………………………………………………...…………………….…25
3.3.2 EL_POS………………………………………………………………………..…25
3.3.3 MARK………………………………………………………………...…..………25
3.3.4 SPEED……………………………………………………………………..……..25
3.3.5 ACC……………………………………………………………..………………..26
3.3.6 DEC………………………………………………………………..……………..26
3.3.7 MAX_SPEED……………………………………………………………..……..26
3.3.8 MIN_SPEED……………………………………………………..…..…………..26
3.3.9 STEP_MODE……………………………………………………...……………..27
3.4应用程序指令………………………………………………………….……..…………29
3.4.1 SetParam (PARAM, VALUE) ……………………………………….…………..31
3.4.2 GetParam (PARAM) ………………………………………………….…………32
3.4.2 Run (DIR, SPD) …………………………………………………….…………32
3.4.3 Move (DIR, N_STEP) ……………………………………………….…………33
3.4.4 GoTo (ABS_POS) ……………………………………………….………………33
3.4.5 GoTo_DIR (DIR, ABS_POS) ………………………………….………………..34
3.4.6 GoUntil (ACT, DIR, SPD) …………………………………….……………..34
3.4.7 GoHome………………………………………………………………..…………35
3.4.8 GoMark……………………………………………………………..……………35
3.4.9 ResetPos……………………………………………………………..…………35
3.4.10 SoftStop……………………………………………………..……………..…36
3.4.11 HardStop…………………………………………………………..…………..36
3.4.12 SoftHiZ…………………………………………………………..……………36
3.4.13 HardHiZ…..………………………………………………….……………….36
3.4.14 GetStatus………………………………………………………..……………37
3.5特征和应用………………………………………………………………..……………37
3.5.1特征………………………………………………………………..…………….37
3.5.2应用…………………………………………………..………………………….38
第四章 两种实现方法…………………………………………………………….……………39
4.1用上位机实现…………………………………………………………….……………39
4.1.1系统连接…………………………………………………………….………….39
4.1.2实现……………………………………………………………..……………….40
4.2用触控屏实现………………………………………………………….……….………42
4.2.1系统连接…………………………………………………….……….………….42
4.2.2 DGUS屏的串口通讯……………………………………………….……………43
4.2.3程序…………………………………………………………………………..………45
第五章 总结与展望……………………………………………………………….……………47
致 谢………………………………………………………………………….………………..48
参考文献………………………………………………………………….……………………..49
第一章 绪论
剩余内容已隐藏,请支付后下载全文,论文总字数:28504字
该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;