中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 三相步進(jìn)電機(jī)驅(qū)動(dòng)

        三相步進(jìn)電機(jī)驅(qū)動(dòng)

        作者: 時(shí)間:2010-01-25 來(lái)源:網(wǎng)絡(luò) 收藏

        六拍工作方式,正轉(zhuǎn)的繞組通電順序:A、AB、B、BC、C、CA、A,反轉(zhuǎn)的通電順序:A、AC、C、CB、B、BA、B、A。

        本文引用地址:http://www.antipu.com.cn/article/173462.htm

        由于轉(zhuǎn)子有一定的慣性以及所帶負(fù)載的慣性,故的工作過(guò)程中不能及時(shí)的啟動(dòng)和停止,在啟動(dòng)時(shí)應(yīng)慢慢的加速到預(yù)定速度,在停止前應(yīng)逐漸減速到停止,否則,將產(chǎn)生失步現(xiàn)象。

        步進(jìn)電機(jī)的控制問(wèn)題可總結(jié)為兩點(diǎn):

        1、產(chǎn)生工作方式需要的時(shí)序脈沖;

        2、控制步進(jìn)電機(jī)的速度,使它始終遵循加速、勻速、減速的規(guī)律工作。

        系統(tǒng):

        接口:

        程序:

        C程序

        #includeio8515v.h>

        #includemacros.h>

        const char zhzhuan[7]={0x06,0x04,0x05,0x01,0x03,0x02,0x00};

        const char fanzhuan[7]={0x06,0x02,0x03,0x01,0x05,0x004,0x00};

        const int time[5]={4000,3200,2400,1600,800}; /*脈沖寬度:0.05m,0.04ms,0.03ms,0.02ms,0.01ms*/

        char num; /*將要轉(zhuǎn)動(dòng)的步數(shù)*/

        char direct; /*轉(zhuǎn)動(dòng)方向,0為反轉(zhuǎn),1為正轉(zhuǎn)*/

        char num_run; /*已經(jīng)轉(zhuǎn)動(dòng)的步數(shù)*/

        void main(void)

        {

        DDRA=0x07;

        TCCR1A=0x00;

        TCCR1B=0x09;

        TIMSK=0x10;

        SREG|=0x80;

        while(1)

        {

        ;

        }

        }

        #pragma interrupt_handler time1coma:5

        void time1coma(void)

        {

        char i,j;

        if(num>9)

        {

        if(num_run5) OCR1A=time[num_run]; /*增速*/

        else if(num_run>(num-5)) OCR1A=time[num-num_run]; /*減速*/

        }

        else

        {

        i=(num+1)/2;

        if(num_run(i)) OCR1A=time[num_run]; /*增速*/

        else OCR1A=time[num-num_run]; /*減速*/

        }

        if(num_runnum)

        {

        j=num_run%6;

        if(direct==1) PORTA=zhzhuan[j];

        else PORTA=fanzhuan[j];

        num_run+=1;

        }

        else

        {

        OCR1A=0x0fa0;

        }

        }



        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉