In this paper,it introduced the composition principle of DC motor SR system which is mainly composed MCS-51 microcontroller series.It’s mainly study of the motor drive and speed data acquisition module based on Microcontrollers to designed the core control system, This control system mainly include hardware devices and software control two parts,This system mainly include MCS-51 Microcontrollers, imitate the control plank, PWM, Photoelectric Sensors and DC motor.and introduces some relative knowledge upon the DC motor, PWM adjust of the basic principles and methods.This system uses Infrared photoelectric sensor as speed detecting sensor,uses PWM signal as control output to regulate speed.and the corresponding electronic circuit and software flow are also given.
The adoptive electronics components is simple and widespread, and the circuit conjunction is simple, installing to adjust to try easy, measure result precision, therefore have the very high and practical value.
Key words:DC machines;PWM;photoelectric sensor;MCS-51
目 录
摘要 I
ABSTRACT II
第一章 绪论 1
第二章 单片机在课题中的应用 3
2.1 8051单片机功能简介 3
2.2 外部引脚说明 4
2.2.1 主电源引脚 4
2.2.2 外接晶体引脚 4
2.2.3 输入/输出引脚 4
2.2.4 控制引脚 5
第三章 方案设计 7
3.1 电路框图及PWM原理 7
3.1.1 电路框图 7
3.1.2 PWM控制原理 7
3.1.3 PWM实现方法 8
3.2 各部分原理图 9
3.2.1 光电脉冲检测与单片机接口 9
3.2.2 按键接口电路 10
3.2.3 功能指示灯电路及接口 11
3.2.4 电机驱动电路(H桥路)及控制接口 12
3.2.5 LED数码显示接口电路 13
3.2.6 单片机最小系统 13
3.2.7 整体系统电路图如下 13
第四章 程序设计 14
4.1 程序组成 14
4.1.1 主控程序 14
4.1.2 T0中断服务程序 14
4.1.3 显示子程序 14
4.1.4 速度采样子程序 14
4.1.5 功能主程序 14
4.1.6 键盘扫描程序 14
4.2 程序流程图 15
4.2.1 主程序流程图 15
4.2.2 速度采样程序流程图 16
4.2.3 键盘扫描主程序 17
4.2.4 功能程序的流程 17
4.3 重要源程序 19
第五章 结束语 25
参考文献 26
附 录 27