完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
if (motor->lsw == 0)
{ // during alignment, assign the current shaft position as initial position v->QPOSCNT = 0; v->QCLR.bit.IEL = 1; // Reset position cnt for QEP } // end if (motor->lsw=0) // ****************************************************************************** // Detect calibration angle and call the QEP module // ****************************************************************************** // for once the QEP index pulse is found, go to lsw=2 if(motor->lsw==1) { if (v->QFLG.bit.IEL == 1) // Check the index occurrence { motor->qep.CalibratedAngle=v->QPOSILAT; v->QPOSINIT = v->QPOSILAT; v->QEPCTL.bit.IEI = IEI_RISING; motor->lsw=2; } // Keep the latched pos(保持锁定位置). at the first index } if (motor->lsw!=0) { QEP_MACRO(v,motor->qep); } |
|
相关推荐 |
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
嵌入式操作教程_数字信号处理_音频编解码:3-6 AAC音频解码实验
408 浏览 0 评论
数字信号处理实验操作教程:3-3 mp3音频编码实验(AD7606采集)
1299 浏览 0 评论
嵌入式DSP教学实验箱操作教程:2-20 数模转换实验(模拟SPI总线输出电压值)
1216 浏览 0 评论
目前在2837x系列用的最多的、性能最好、性价比最高的是哪一款?
988 浏览 0 评论
国产嵌入式DSP教学实验箱_操作教程:22-AD采集DA输出实验(采集输出正弦波)
2174 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-19 04:17 , Processed in 0.417194 second(s), Total 41, Slave 33 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号