【正文】
5個(gè) 5V 蜂鳴器 1個(gè) STD51 芯片 1個(gè) ULN2020 芯片 1個(gè) 小結(jié) 基于 STC89C51單片機(jī)的步進(jìn)電機(jī)脈 沖分配器設(shè)計(jì) 18 參考資料 【 1】 徐瑋、徐富貴 . C51 單片機(jī)高效入門 [M] . 北京 : 機(jī)械工業(yè)出版社 . 2020. 5863 【 2】 劉剛等編著 . 單片機(jī)應(yīng)用技術(shù)教程 [M] . 北京 : 清華大學(xué)出版社 . 2020 . 【 3】 張毅剛等編輯 . MCS51單片機(jī)應(yīng)用設(shè)計(jì) . 哈爾濱 : 哈爾濱工業(yè)大學(xué)出版社 . 2020 【 4】 郭德?tīng)I(yíng)等編著 .單片機(jī)原理及接口技術(shù) [M] . 北京 : 中國(guó)水利水電出版社 . 2020 致 謝 時(shí)光如水,日月如梭,四年的時(shí)光猶如人生旅途劃過(guò)的一顆璀璨靚麗的流星。i++) revolve(0)。 } } /****************************************************** **函數(shù)功能:主函數(shù) **輸入?yún)?shù) :無(wú) **返回值:無(wú) ********************************************************/ main () { while(1) 基于 STC89C51單片機(jī)的步進(jìn)電機(jī)脈 沖分配器設(shè)計(jì) 16 { if(K0==0) revolve(0)。 delay2(60000 )。 P1=0xF6。 sbit K2=P3^3。 控制 器 一個(gè)完整的步進(jìn)電動(dòng)機(jī)控制系統(tǒng)包括控制器、驅(qū)動(dòng)器、電動(dòng)機(jī)三部分。以四相步進(jìn)電動(dòng)機(jī)為例,有四相四拍運(yùn)行方式,即 ABBCCDDAAB,也有四相八拍運(yùn)行方式,即 AABBBCCCDDDAA。相 B 相 A39。、 B39。對(duì)齊, 轉(zhuǎn)子不受力,以下均同。 在正確完成對(duì) BKZ51 開(kāi)發(fā)板的硬件設(shè)計(jì)以 后,把自己編好的程序輸入開(kāi)發(fā)板中,通過(guò)按鍵來(lái)控制步進(jìn)電機(jī)的旋轉(zhuǎn),本設(shè)計(jì)要求按下 K1 鍵時(shí),脈沖分配器產(chǎn)生脈沖能夠使兩相五線制步 進(jìn)電機(jī)正轉(zhuǎn)一圈,按下 K2 鍵時(shí),能夠使兩相五線制步進(jìn)電機(jī)正轉(zhuǎn)兩圈,按下 K3鍵時(shí)能夠使兩相五線制步進(jìn)電機(jī)一直正轉(zhuǎn)下去,按下 K4 鍵時(shí),使步進(jìn)電機(jī)反轉(zhuǎn)一圈。 實(shí)時(shí)時(shí)鐘控制芯片 PCF8536 :可進(jìn)行 I2C 總線通信及時(shí)鐘控 制實(shí)驗(yàn)。 關(guān)鍵詞: 步進(jìn)電機(jī) 單片機(jī) 脈沖信號(hào) 頻率 1 STC89C51based singlechip stepper motor control Zhao Guangming ( Yulin College Shaanxi Yulin 719000 ) Abstract: Stepper motor is the electrical pulse signal into an angular displacement or linear displacement ponents of the openloop control, when the stepper drive receive a pulse signal, it drives stepper motor to set a direction for a fixed angle of rotation. It is based on a fixed rotation angle of the operation step by step, it can control the number of pulses to achieve the purpose of precise positioning, as well as by controlling the pulse frequency to control the rotational speed and acceleration, in this experiment, we adopted for MSC51 Singlechip programming, the control pulse output signal frequency and the number of stepper motor to achieve precise control. Keywords: Singlechip stepper motor