《基于单片机控制“航标灯”的控制系统设计与调试毕业论文》由会员分享,可在线阅读,更多相关《基于单片机控制“航标灯”的控制系统设计与调试毕业论文(26页珍藏版)》请在金锄头文库上搜索。
1、常州机电职业技术学院毕业设计(论文)题 目:单片机控制“航标灯”的控制系统的设计与调试 摘要单片微型计算机简称单片机。它是把组成微型计算机的各功能部件:中央处理器、CPU、随机存取存储器RAM、只读存储器ROM、I/O接口电路、定时器/计数器以及串行通信接口等制作在一块集成芯片中,构成一个完整的微型计算机。单片机主要应用于控制领域,由于其具有可靠性高、体积小、价格低、易于产品化等特点,因而在智能仪器仪表、实时工业控制、智能终端、通信设备、导航系统、家用电器等自控领域获得广泛应用1。步进电机是一种能将电脉冲信号转换成角位移或线位移的机电元件,实质上是一种数字/角度转换器步进电机控制系统主要由步进
2、控制器,功率放大器及步进电机等组成.步进控制器由缓冲寄存器,环形分配器,控制逻辑及正,反转控制门等组成,能把输入的脉冲转换成环形脉冲,以便控制步进电机,并能进行正反向控制.但由于步进控制器线路复杂.成本高.采用单片机控制,用软件代替上述步进控制器,使得线路简单,成本低,可靠性大大增加,灵活改变步进电机的控制方案,无需逻辑电路组成时序发生器.软件编程可灵活产生不同类型步进电机励磁序列来控制各种步进电机的运行方式并可实现一台单片机控制多台电机.提供灵活多样的控制手段和提高控制精度对复杂繁琐的控制易于实现,尤其在本系统中更显示出微机控制的优越性。本设计采用凌阳16 位单片机SPCE061A对步进电机
3、进行控制,通过IO口输出的具有时序的方波作为步进电机的控制信号,信号经过芯片L298N驱动步进电机;同时,用 4X4的键盘来对电机的状态进行控制,并用数码管显示电机的转速,采用74LS164作为4位单个数码管的显示驱动,从单片机输入信号;利用凌阳单片机的语音功能播报电机的转速。 关键词: 单片机 步进电机 ABSTRACT2 The single slice of microcomputers is abbreviated as the one-chip computer. It is every function part which makes up the microcomputer:
4、Central processing unit, CPU, arbitrary access memory RAM , read-only memory ROM, I/O interface circuit , timer / counter and serial communication interface ,etc. make in the integrated chip together, form an intact microcomputer. One-chip computer apply controlled field to mainly, because it have d
5、ependability high , small , price low , easy commercialization ,etc. characteristic, therefore won extensive application in fields of automatic control such as intellectual instrument and apparatus , real-time industrial control , intelligent terminal , communication equipment , navigation system ,
6、household appliances ,etc.It is that one kind can change the electric pulse signal into a electromechanical component of angle displacement or line displacement to walk into the electrical machinery, it is a kind of figure / angle converter that is walked into the control system of the electrical ma
7、chinery to mainly walk into the controller in fact, power amplifier and walking into the electrical machinery ,etc. make up . Walked into the controller to buffer the register , the annular distributor, control logic and, overturn , control door ,etc. make up , can change the pulse input into into a
8、n annular pulse , in order to control , walk into electrical machinery , can carry on positive and negative to control. But because walk into the controller circuit complicatedly. With high costs. Adopt one-chip computer control , replace with software described above to walk into the controller , m
9、ake the circuit simple, with low costs, dependability increases greatly, change the control scheme of walking into the electrical machinery flexibly , do not need logical circuit to make up the time sequence generator . Software programming very flexible to produce , walk into electrical machinery e
10、xcitation array come , control various operation way to walk into electrical machinery and can realize one machine control many sets of electrical machinery while being different kinds of. It is easy to realize to offer the flexible control means and improving the precision of controlling to complic
11、ated and tedious control, demonstrate the superiority that the computer controls especially in this system even more. Design , adopt , insult male genital 16 one-chip computer SPCE061A to walk into electrical machinery control originally, square wave with time sequence as the control signal of walki
12、ng into the electrical machinery through what IO mouth is outputted, the signal drives and walks into the electrical machinery through the chip L298N; Meanwhile , come state in electrical machinery go on , control with keyboard of 4X4 , in charge of rotational speed to reveal electrical machinery wi
13、th number, adopt 74LS164 urge as 4 single number display that in charge of , from the input signal of the one-chip computer; Utilize the pronunciation function of insulting the open one-chip computer to report the rotational speed of the electrical machinery.Keyword: One-chip computer Walk into the
14、electrical machinery绪论近十几年来,单片机在生产过程控制、自动检测、数据采集与处理、科技计算、商业管理和办公室自动化等方面获得了广泛的应用。单片机具有体积小、重量轻、耗能省、价格低、可靠性高和通用灵活等优点,因此也广泛应用于卫星定句、汽车火花控制、交通白动管理和微波炉等专用控制上。近几年来,单片机的发展更为迅速,它已渗透到诸多学科的领域,以及人们生活的各个方面。 单片机不求规模大,只求小而全。厂家在一个芯片上制成了CPU和一定容量的程序存储器和数据存储器以及一定数量的输入/输出接口(Intel)。在一个大规模集成电路芯片上构造了完整的计算机结构,故称之为单片机 MCS-51
15、系列中的一片8751芯片3,内部构造了完整的计算机硬件系统。从CPU、存储器到输入输出端口,一应俱全。只要写入程序,就可完成中央控制或数据采集、处理及通信传输的信息处理机,MCS-51单片机指令系统中为适应控制的需要设有极强的位处理功能,具有加、减、乘、除指令;CPU时钟高达12MHz,完成单字节乘法或除法运算仅需要4Ns;具有多机通信功能,可作为多机系统中的一个子系统。近年来,在国际上出现了Mechanics和electronics复合成Mechtronics这个新词,我国译为机电一体化。这种机械和电子技术、信息技术紧密结合的新的学科领域是先进制造技术研究和普及的结果。机电一体化产品要实现电
16、器控制的实时性、高可靠性、可编程和一定的人工智能。同时追求体积小、价格低,甚至低功耗等。正是针对上述种种要求而设计的单片机白然成为机电一体化控制器的最佳选择。 单片机出现的历史并不长,它的产生与发展与微处理器的产生与发展大体上同步,也经历了四个阶段4: 第一阶段:19711974年,4位微处理器工intel 4004及8位微处理器工intel 8008,这些计算机价格便宜、功能有限,只用于消耗类电子产品。 第二阶段:19741978年,初级单片机阶段,以工intel公司的MCS-48为代表,8位单片机。 第三阶段:19781983年,高性能单片机阶段。以工Intel公司的MCS-51, Motorola公司的6801和Zilog公司的Z8等为代表。这一阶段推出的单片机普遍带有串行口,有多级中断处理系统、16位定时器/计数