<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > stm8-MC KIT庫中的主動剎車

          stm8-MC KIT庫中的主動剎車

          作者: 時間:2016-11-28 來源:網(wǎng)絡 收藏
          剎車時間與剎車PWM可設.

          本文引用地址:http://www.ex-cimer.com/article/201611/322714.htm

          剎車函數(shù)如下:

          void BrakeMotor( void )
          {
          u16 brake_pwm_cnt;
          brake_pwm_cnt = (u16)(((u32)hArrPwmVal * BRAKE_DUTY) / 100);
          ToCMPxH( TIM1->CCR1H, brake_pwm_cnt );
          ToCMPxL( TIM1->CCR1L, brake_pwm_cnt );
          ToCMPxH( TIM1->CCR2H, brake_pwm_cnt );
          ToCMPxL( TIM1->CCR2L, brake_pwm_cnt );
          ToCMPxH( TIM1->CCR3H, brake_pwm_cnt );
          ToCMPxL( TIM1->CCR3L, brake_pwm_cnt );

          //Disable update interrupt
          TIM1->IER &= (u8)(~BIT0);

          TIM1->CCMR1 = CCMR_PWM;
          TIM1->CCMR2 = CCMR_LOWSIDE;
          TIM1->CCMR3 = CCMR_LOWSIDE;
          TIM1->CCER1 = (A_ON|B_COMP);
          TIM1->CCER2 = C_COMP;

          TIM1->EGR |= BIT5;

          #ifdef LS_GPIO_CONTROL
          LS_GPIO_BRAKE();
          #endif
          }

          比較簡單就是A上橋PWM,BC下橋全開.將電能轉(zhuǎn)為磁能,磁能之間互作用,實現(xiàn)主動剎車.



          評論


          相關推薦

          技術專區(qū)

          關閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();