亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? bldc.c

?? 無(wú)刷電機(jī)驅(qū)動(dòng)器源代碼。基于無(wú)傳感器方案的無(wú)刷電機(jī)啟動(dòng)器。核心是換向角度檢測(cè):即電機(jī)反電勢(shì)波形數(shù)據(jù)處理
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
{    //    // Is debug mode currently enabled or disabled?    //    if(g_bDebug)    {        //        // Disable debug mode.        //        g_bDebug = false;        //        // Restore the user interface display.        //        UIDisplay("\n");    }    else    {        //        // Enable debug mode.        //        g_bDebug = true;        //        // Start on a fresh line for the user interface.        //        UIDisplay("\r\n");    }}//*****************************************************************************////! Run command callback function.//!//! \param ulValue is ignored.//!//! This function is called when the run command is entered by the user.  It//! toggles the running state of the motor.//!//! \return None.////*****************************************************************************static voidRunHandler(unsigned long ulValue){    //    // Is the motor running?    //    if(g_iRunning == MOTOR_RUNNING)    {        //        // Have the UI indicate that the motor is stopped.        //        g_pcDisplay[2] = 's';        //        // Begin stopping the motor.  This prevents the QEI interrupt from        // changing the state of the PWM outputs.        //        g_iRunning = MOTOR_STOPPING;        //        // Disable the PWM outputs.        //        PWMOutputState(PWM_BASE, PHASE_A | PHASE_B | PHASE_C, false);    }    else    {        //        // Have the UI indicate that the motor is running.        //        g_pcDisplay[2] = 'r';        //        // Start the motor running.        //        g_bReverse = g_bReverse ? false : true;        g_iRunning = MOTOR_RUNNING;        //        // Turn off the inversion of all the switches.        //        PWMOutputInvert(PWM_BASE, PHASE_A | PHASE_B | PHASE_C, false);        //        // Fake an interrupt from the Hall effect sensors to get the correct        // PWM outputs enabled.        //        GPIOIntHandler();    }}//*****************************************************************************////! Speed command callback function.//!//! \param ulValue is the new target speed.//!//! This function is called when the speed command is entered by the user.  It//! causes the supplied speed to become the target speed for the motor.//!//! \return None.////*****************************************************************************static voidSpeedHandler(unsigned long ulValue){    unsigned long ulIdx;    //    // Enforce the upper and lower bound on the motor speed.    //    if(ulValue > MAX_APP_MOTOR_SPEED)    {        ulValue = MAX_APP_MOTOR_SPEED;    }    if(ulValue < MIN_APP_MOTOR_SPEED)    {        ulValue = MIN_APP_MOTOR_SPEED;    }    //    // Set the target speed in the display.    //    g_pcDisplay[6] = '0' + ((ulValue / 1000) % 10);    g_pcDisplay[7] = '0' + ((ulValue / 100) % 10);    g_pcDisplay[8] = '0' + ((ulValue / 10) % 10);    g_pcDisplay[9] = '0' + (ulValue % 10);    //    // Find range entry in speed mapping table.    //    for(ulIdx = 0; ulIdx < SPEEDMAP_ENTRIES; ulIdx++)    {        if(ulValue < g_psSpeedMap[ulIdx + 1].ulSpeed)        {            break;        }    }    //    // Perform a linear interpolation between the two selected entries of the    // speed map.    //    g_ulBaseDutyCycle = (((g_psSpeedMap[ulIdx].ulDutyCycle +                           (((ulValue - g_psSpeedMap[ulIdx].ulSpeed) *                             (g_psSpeedMap[ulIdx + 1].ulDutyCycle -                              g_psSpeedMap[ulIdx].ulDutyCycle)) /                            (g_psSpeedMap[ulIdx + 1].ulSpeed -                             g_psSpeedMap[ulIdx].ulSpeed))) *                          g_ulPwmPeriod) / 10000);    //    // Save the new target speed.    //    g_ulTarget = ulValue;    //    // See if open loop operation is enabled.    //    if(g_bOpenLoop)    {        //        // Set the PWM duty cycle based on the requested target speed.        //        SetPWMDutyCycle(g_ulBaseDutyCycle);    }}//*****************************************************************************////! Loop command callback function.//!//! \param ulValue is ignored.//!//! This function is called when the loop command is entered by the user.  It//! causes the control of the motor to toggle between open-loop and closed-loop//! operation.//!//! \return None.////*****************************************************************************static voidLoopHandler(unsigned long ulValue){    //    // Is the motor currently being driven open- or closed-loop?    //    if(g_bOpenLoop)    {        //        // Set the UI indicator for closed-loop operation.        //        g_pcDisplay[1] = 'C';        //        // Initialize the PID controller.        //        PIDInitialize(&g_sPID, 100000, -100000, g_lPGain, g_lIGain, g_lDGain);        //        // Indicate that the motor is now being driven in a closed-loop        // fashion.  Nothing further is done at this point; at the next QEI        // interrupt the PID controller will be run and start adjusting the        // duty cycle as it sees fit.        //        g_bOpenLoop = false;    }    else    {        //        // Indicate that the motor is now being driven in an open-loop fashion.        //        g_bOpenLoop = true;        //        // Set the UI indicator for open-loop operation.        //        g_pcDisplay[1] = 'O';        //        // Set the PWM duty cycle based to the base duty cycle.        //        SetPWMDutyCycle(g_ulBaseDutyCycle);    }}//*****************************************************************************////! Proportional gain callback function.//!//! \param ulValue is the new proportional gain factor.//!//! This function is called when the proportional feedback command is entered//! by the user.  It causes the supplied gain factor to become the proportional//! gain for the PID algorithm.//!//! \return None.////*****************************************************************************static voidPGainHandler(unsigned long ulValue){    //    // Save the new proportional gain factor.    //    g_lPGain = (long)ulValue;    //    // Adjust the settings of the PID algorithm.    //    PIDSetGains(&g_sPID, g_lPGain, g_lIGain, g_lDGain);}//*****************************************************************************////! Integral gain callback function.//!//! \param ulValue is the new integral gain factor.//!//! This function is called when the integral feedback command is entered by//! the user.  It causes the supplied gain factor to become the integral gain//! for the PID algorithm.//!//! \return None.////*****************************************************************************static voidIGainHandler(unsigned long ulValue){    //    // Save the new integral gain factor.    //    g_lIGain = (long)ulValue;    //    // Adjust the settings of the PID algorithm.    //    PIDSetGains(&g_sPID, g_lPGain, g_lIGain, g_lDGain);}//*****************************************************************************////! Derivitive gain callback function.//!//! \param ulValue is the new derivitive gain factor.//!//! This function is called when the derivitive feedback command is entered by//! the user.  It causes the supplied gain factor to become the derivitive gain//! for the PID algorithm.//!//! \return None.////*****************************************************************************static voidDGainHandler(unsigned long ulValue){    //    // Save the new derivitive gain factor.    //    g_lDGain = (long)ulValue;    //    // Adjust the settings of the PID algorithm.    //    PIDSetGains(&g_sPID, g_lPGain, g_lIGain, g_lDGain);}//*****************************************************************************////! Displays the current PID gain factors.//!//! \param ulValue is ignored.//!//! This function is called when the status command is entered by the user.  It//! displays the current PID gain factors.//!//! \return None.////*****************************************************************************static voidStatusHandler(unsigned long ulValue){    char pcBuffer[24];    //    // Set the basic format of the string to be displayed.    //    strcpy(pcBuffer, "\r\nP=000 I=000 D=000\r\n");    //    // Put the proportional gain factor into the string.    //    pcBuffer[4] = '0' + ((g_lPGain / 100) % 10);    pcBuffer[5] = '0' + ((g_lPGain / 10) % 10);    pcBuffer[6] = '0' + (g_lPGain % 10);    //    // Put the integral gain factor into the string.    //    pcBuffer[10] = '0' + ((g_lIGain / 100) % 10);    pcBuffer[11] = '0' + ((g_lIGain / 10) % 10);    pcBuffer[12] = '0' + (g_lIGain % 10);    //    // Put the derivitive gain factor into the string.    //    pcBuffer[16] = '0' + ((g_lDGain / 100) % 10);    pcBuffer[17] = '0' + ((g_lDGain / 10) % 10);    pcBuffer[18] = '0' + (g_lDGain % 10);    //    // Display the current gain factors for the user.    //    UIDisplay(pcBuffer);}//*****************************************************************************////! Hard fault handler.//!//! This is the handler for hard faults, if they occur.  Immediate action must//! be taken to shut off the PWM outputs to prevent any potential damage to the//! motor.//!//! \return None.////*****************************************************************************voidHardFault(void){    //    // Disable all the PWM outputs.    //    PWMOutputState(PWM_BASE, PHASE_A | PHASE_B | PHASE_C, false);    //    // Indicate that a hard fault has occurred.    //    UIDisplay("\r\nHard Fault!");    //    // Loop forever.    //    while(1)    {    }}//*****************************************************************************////! Program entry point.//!//! This is the entry point for the brushless DC motor control application.  It//! is responsible for getting the system setup and operational.  This is//! called at the base activation level, so any exception will preempt this//! function.//!//! \return Never returns.////*****************************************************************************intmain(void){    //    // Setup the device clocking.    //    SysCtlClockSet(SYSDIV | CLKUSE | SYSCTL_XTAL_6MHZ | SYSCTL_OSC_MAIN);    //    // Compute the PWM period based on the clock.    //    g_ulPwmPeriod = SysCtlClockGet() / 16000;#if (PWMDIV == SYSCTL_PWMDIV_2)    g_ulPwmPeriod /= 2;#endif    //    // Enable the GPIO peripherals.    //    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);    //    // Set the static portion of the user interface display.    //    strcpy(g_pcDisplay, "\rOs s:0000 a:0000");    //    // Enable processor interrupts.    //    IntMasterEnable();    //    // Initialize the user interface, GPIO, PWM, and QEI drivers.    //    UIInitialize(&g_sUI);    SetupGPIO();    SetupPWM();    SetupQEI();    //    // Set the priority of the UART interrupt.  This needs to be lower than    // the hall effect sensors and the QEI interrupt since it is the least    // critical operation in the system.    //    IntPrioritySet(INT_UART0, 0x80);    //    // The default motor speed is 1000rpm.    //    SpeedHandler(1000);    //    // Loop forever.    //    while(1)    {        //        // Update the user interface every 32nd time through the loop.        //        if((g_ulSpeedCount & 63) == 0)        {            //            // Set the current speed in the display.            //            g_pcDisplay[13] = '0' + ((g_ulSpeed / 1000) % 10);            g_pcDisplay[14] = '0' + ((g_ulSpeed / 100) % 10);            g_pcDisplay[15] = '0' + ((g_ulSpeed / 10) % 10);            g_pcDisplay[16] = '0' + (g_ulSpeed % 10);            //            // Update the user interface if not in debug mode.            //            if(!g_bDebug)            {                UIUpdate();            }        }        //        // Go to sleep.        //        // This makes it impossible to break into the processor via the        // debugger so it is commented out for now.        //        //SysCtlSleep();    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费成人性网站| 色婷婷av久久久久久久| 午夜免费久久看| 亚洲成人激情av| 午夜激情一区二区| 琪琪一区二区三区| 久久99精品国产麻豆婷婷| 免费观看一级特黄欧美大片| 蜜桃av一区二区三区电影| 蜜臀av一区二区| 国产一区二区三区不卡在线观看| 激情综合网av| 丁香五精品蜜臀久久久久99网站 | 欧美性生活一区| 欧美日韩免费视频| 日韩美女一区二区三区四区| 久久只精品国产| 国产精品久久久久久久久晋中| 成人欧美一区二区三区小说 | 99免费精品在线观看| 99久久综合色| 欧美性感一区二区三区| 91精品国产91久久久久久最新毛片| 日韩一级在线观看| 国产欧美日韩激情| 亚洲精品日韩一| 日韩国产精品久久久| 国内精品写真在线观看| 99在线精品视频| 欧美日本在线看| 精品成人私密视频| 亚洲欧洲一区二区三区| 日韩精品电影在线| 高清在线观看日韩| 欧美午夜不卡在线观看免费| 日韩一区二区在线看| 国产日韩欧美精品电影三级在线| 亚洲女爱视频在线| 蜜桃精品视频在线| 99热国产精品| 日韩精品自拍偷拍| 国产精品传媒入口麻豆| 日韩av电影免费观看高清完整版| 国产精品1区二区.| 欧美影院一区二区| 久久亚洲精精品中文字幕早川悠里| 亚洲欧洲韩国日本视频| 奇米综合一区二区三区精品视频| 国产成人啪免费观看软件| 欧美视频三区在线播放| 国产亚洲人成网站| 日韩精品一二三| 成av人片一区二区| 欧美久久久久免费| 国产精品视频一二三| 日韩av中文在线观看| 成人av小说网| 精品粉嫩aⅴ一区二区三区四区| 亚洲精品乱码久久久久久久久| 麻豆成人在线观看| 欧洲日韩一区二区三区| 亚洲国产成人午夜在线一区| 美女视频网站黄色亚洲| 91国偷自产一区二区三区成为亚洲经典 | 天堂蜜桃91精品| 波多野洁衣一区| 久久午夜免费电影| 婷婷中文字幕一区三区| 91在线一区二区| 久久婷婷成人综合色| 日韩福利电影在线| 在线观看精品一区| 亚洲欧美一区二区在线观看| 久久成人免费网站| 欧美日韩一级二级| 亚洲另类中文字| 精品盗摄一区二区三区| 亚洲一区二区精品久久av| 成人午夜碰碰视频| 久久欧美一区二区| 日韩电影在线观看网站| 欧美日韩一区二区在线观看| 中文字幕在线不卡一区二区三区| 狠狠色狠狠色综合日日91app| 欧美人伦禁忌dvd放荡欲情| 亚洲免费资源在线播放| 国产精品一区二区在线播放| 日韩美女天天操| 欧美a级理论片| 欧美精品vⅰdeose4hd| 一区二区高清免费观看影视大全| av中文一区二区三区| 国产欧美日韩视频在线观看| 国内久久精品视频| 久久日韩精品一区二区五区| 天天影视涩香欲综合网| 欧美日韩国产高清一区二区三区 | 一区二区成人在线视频| 不卡高清视频专区| 亚洲欧洲三级电影| 99久久精品国产一区| 亚洲欧洲性图库| 91麻豆精品一区二区三区| 亚洲欧美一区二区视频| 91亚洲精品一区二区乱码| 亚洲欧美一区二区久久| 91麻豆精品视频| 亚洲最色的网站| 欧美日韩精品二区第二页| 五月婷婷激情综合网| 666欧美在线视频| 奇米在线7777在线精品| 精品久久久三级丝袜| 极品少妇一区二区三区精品视频| 久久亚洲捆绑美女| 成人app在线| 一级女性全黄久久生活片免费| 欧美性三三影院| 蜜桃视频一区二区三区 | 免费高清在线视频一区·| 欧美一级在线免费| 韩国精品一区二区| 中文字幕一区二区三区av| 日本高清无吗v一区| 五月综合激情日本mⅴ| 欧美大片国产精品| 成人性视频免费网站| 亚洲免费av观看| 欧美人伦禁忌dvd放荡欲情| 精品一区二区三区不卡 | 五月开心婷婷久久| 午夜伦理一区二区| xnxx国产精品| 91在线国产观看| 肉色丝袜一区二区| 国产日韩欧美不卡在线| 91国偷自产一区二区使用方法| 免费精品视频在线| 中文字幕一区二区三| 精品视频一区三区九区| 国模套图日韩精品一区二区| 综合久久久久综合| 欧美一级日韩不卡播放免费| 国产99一区视频免费| 亚洲五码中文字幕| 亚洲精品一区二区在线观看| 91在线观看成人| 精品一区二区三区蜜桃| 亚洲欧美一区二区三区国产精品| 欧美一区二区三区四区五区| 成人sese在线| 久久精品国产一区二区| 亚洲色图第一区| 久久久综合网站| 欧美日韩一区久久| 不卡av免费在线观看| 欧美a一区二区| 亚洲三级电影全部在线观看高清| 欧美一区二区三区的| 91亚洲国产成人精品一区二三| 蜜臀av一区二区在线免费观看| 成人免费在线视频观看| 精品国产伦一区二区三区免费| 一道本成人在线| 国产成人综合亚洲91猫咪| 视频一区二区三区中文字幕| 中文字幕亚洲一区二区av在线| 这里只有精品99re| 91论坛在线播放| 国产精品996| 免费xxxx性欧美18vr| 色婷婷久久99综合精品jk白丝| 久久精品国产亚洲高清剧情介绍| 一区二区三区四区精品在线视频| 久久综合久久99| 欧美一区二区三区在| 欧美性生交片4| 97精品超碰一区二区三区| 国产一区二区三区视频在线播放| 午夜天堂影视香蕉久久| 亚洲综合色丁香婷婷六月图片| 国产精品免费久久久久| 精品va天堂亚洲国产| 欧美一区二区三区成人| 欧美久久久久久蜜桃| 欧美又粗又大又爽| 99精品久久久久久| 成人性生交大片免费| 国产不卡高清在线观看视频| 国产一区中文字幕| 另类小说综合欧美亚洲| 免费日本视频一区| 日本特黄久久久高潮| 五月天丁香久久| 婷婷开心激情综合| 亚洲图片欧美综合| 午夜伦理一区二区| 视频一区二区欧美| 美女视频网站黄色亚洲| 久久精品99国产国产精|