完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个旧的(即将退休的)设计,使用PIC16C6A。我是逆向工程的旧汇编代码,它有一些好的注释部分,但不足以让我理解一些可能被调整的初始值背后的推理。目前的设计是一种光学旋转编码器,结合行星齿轮头旋转电机。当前的设计工作速度很慢,所以我知道它都与初始值有关。当我增加速度时,我的采样时间似乎不够。我使用计时器2作为一个中断,它在1:1预缩放,在1:10缩放后(给出一个2US嘀嗒,一个200毫秒的指令周期时间)。定时器2被初始化为计数50滴答,所以我有一个100US中断。对于较低的速度(0.5毫米/秒和1mm /秒),100MS的速度采样时间是足够的,基于每100MS的2滴答在低速和4滴答每100MS在高速。所以如果我增加速度,我需要增加哪些因素,以确保如果我加倍速度,我加倍我的频率,不错过任何状态的变化?随着状态变化递增和递减的DAC被设置为133MV。我根据编码器的直径和预期速度计算RPM。现在我只需要在范围内找到准确的频率:-)。当我尝试加倍速度时,哪些因素需要调整?谢谢你的帮助。
以上来自于百度翻译 以下为原文 I have an old (soon to be retired) design, using a PIC16C65A. I'm reverse engineering old assembly code, that has some good commented sections, but not quite enough for me to understand the reasoning behind some initial values that may have been adjusted. The current design is for an optical rotary encoder, combined with a planetary gearhead rotational motor. The current design is working at low speeds, so I know it's all related to initial values. When I increase the speeds, my sample time seems to be insufficient. I'm using timer 2 as an interrupt, which is pre scaled at 1:1, post scaled at 1:10 (giving a 2us tick, with a 200ns instruction cycle time). Timer 2 is initialized to count 50 ticks, so I have a 100us interrupt. For the lower speeds (0.5mm/s and 1mm/s), a 100ms speed sample time is sufficient, based on 2 ticks per 100ms at the low speed and 4 ticks per 100ms at the high speed. So if I increase the velocity, which factors do I need to increase to make sure that if I double my speed, I double my frequency and not miss any state changes? The DAC that increments and decrements with state changes is set to 133mV. I've calculated RPMs, based on the diameter of the encoder and expected velocity. now I just need to see accurate frequency on the scope :-). which factors will need to be adjusted when I try to double my speed? thanks for any help. |
|
相关推荐
2个回答
|
|
增加什么速度?电动机?此外,你似乎正在混合USEC和MSECS,所以对我来说,这有点混乱。
以上来自于百度翻译 以下为原文 Increase the speeds of what? The motor? Also you seem to be mixing usecs and msecs so to me it is a little confusing. |
|
|
|
MCC 是内存管理的么,这个单片机是没有的
|
|
|
|
只有小组成员才能发言,加入小组>>
5223 浏览 9 评论
2024 浏览 8 评论
1949 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3198 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2252 浏览 5 评论
767浏览 1评论
654浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
581浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
665浏览 0评论
568浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-15 14:05 , Processed in 1.201558 second(s), Total 50, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号