摘 要
本
设计的主要思路是通过对DELPHI界面的控制,通过串行
通信实现对单片机的控制,由单片机产生脉冲信号,最终实现对步进电机的控制。同时由单片机把步进电机实时运行状况经串口反馈给
计算机,在所编写的DELPHI界面上显示和监控。项目主要涉及的
工作:对步进电机的简单介绍,软硬件设计,原理图及PCB图绘制,DELPHI及单片机
程序的编写,以及最终调试。
Delphi软件是Borland公司推出的快速应用开发工具。它具有功能强大、易于
学习和使用、编程效率高以及易于调试等特点。
串行通信是指外设和计算机间使用数据信号线,数据在数据信号线上按位进行传输,每一位数据都占据一个固定的时间长度。
步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。这一线性关系的存在,加上步进电机只有周期性的误差而无累积误差等特点。使得在速度、位置等控制领域用步进电机来控制变的非常的简单
关键词:Delphi 串行通信 单片机 步进电机
Abstract
The main idea of this design is the interface through the DELPHI control, serial communications through the realization of the MCU control, generated by the SCM pulse, and eventually realize the stepper motor control. At the same time by the stepper motor MCU operation of real-time feedback to the computer via serial port, prepared by DELPHI on the display and control interface. Mainly the work involved: the stepper motor of a brief introduction, hardware and software design, schematics and PCB mapping, DELPHI SCM procedures and the preparation and ultimately debugging.
Delphi has introduced software is Borland's rapid application development tools. It has a powerful, easy to learn and use, efficient and easy programming debugging and so on.
Serial communications and computer peripherals refers to the use of a data signal line data in an on-line data signals for trans
mission, every data occupy a fixed length of time.
Stepper motor is the electric pulse into angular displacement or displacement of the open-loop control devices. In the case of non-overloading, motor speed, and stop only depends on the location of the signal pulse frequency and pulses, without the impact of changes in load, that is to add an electrical pulse, the electrical, passed a step angle. The existence of this linear relationship, coupled with the cyclical stepper motor only accumulated error without error and so on. Makes the speed, location and other areas controlled by stepper motor control to change the very simple
Key
words:Delphi Serial Communication microcomputer stepping motor
绪 论
步进电机是纯粹的数字控制电动机,步进电机是将输入的电脉冲(数字控制信号)转换成角位移或直线位移的伺服电动机,因此非常适合单片机控制。它本身就是一个完成数字/模拟转换的执行元件。步进电机的定子上通常装有多相绕组,转子是带齿的铁心或是永久磁铁。只要实现各相绕组按一定规律轮流通电,就可产生步进运动。在实用的
系统中,用脉