完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我想用50ms的定时器中断……如何配置这个…我没有逻辑,
我已经给1 MHz的时钟定时器模,,时期写的五万计数..所以是50ms计数周期。但我每次都被打断…我在TC模式下配置了中断… 所以我想我应该中断计数为零如果是计数器,,但是我不想.. 沙棘 16.7 K 以上来自于百度翻译 以下为原文 I want to use the timer interrupt of say 50ms... .. how to configure for this..i didnt ger the logic,,, i have give 1 Mhz clock to timer midule,, and write the 50000 count in period.. so it is 50ms count period.. but i am getting interrupt on every count... i have configured interrupt on tc mode... so i think i should get interrupt on zero count if it is down counter,, but i am not getting..
|
|
相关推荐
36个回答
|
|
但是,如果我改变PWM时钟,穿孔改变,,如果我增加PWM时钟,更高的RPM可以得到,所以什么是规则?
以上来自于百度翻译 以下为原文 but if i am changing the PWM clock, perforamance changed,,,, if i increse the PWM clock,, higher RPM can get,, so what is the rule? |
|
|
|
我需要搜索DFF的东西。例子中,创建者没有DFF。
我尝试了这两种方法,不管它有没有它,它们都不工作。用DFF,在TC配置页上取消TC中断,就像你在你的例子中那样,中断只触发一次,那么它就不会再触发了。我在TimeRiSISR内部有断点,它只停一次。 以上来自于百度翻译 以下为原文 I need to search the DFF thing. The example comes with creator does not have DFF. I tried both, with it or without it, neither of them works. With DFF, and uncheck Interrupt on TC in timer configuration page as you have in your example, the interrupt only triggers once, then it would not trigger any more. I have break point inside the timer_isr, and it only stops once. |
|
|
|
嗨,Dharmin,
步进电机的速度取决于两个后续步骤之间的延迟。延迟越小,步长越快,速度越快。 如果想要增加速度,则减少计时器组件中的时间段。 一旦从步进电机的数据表中得到步进电机的规格,计算就会变得直观。如果它每步移动1.8度,那么200个这样的序列将给出一个完整的旋转(360度)。 根据应用程序所需的速度,可以使用适当的时钟。 以上来自于百度翻译 以下为原文 Hi Dharmin, The speed of a stepper motor depends on the delay between two subsequent steps. Smaller the delay, faster the steps and hence higher the speed. If you want to increase the speed, then decrease the Time Period in the Timer Component. The calculation will become straight forward once you get the specifications of the stepper motor from its datasheet. If it moves 1.8 degrees per step, then 200 such sequence will give one complete rotation (360 degrees). You can use the appropriate clock depending upon the speed required in your application. |
|
|
|
我有连续运行模式,所以它不应该只是触发一次,然后停止。我的所有设置与你在例子中的方式相同,只是我的时钟慢,所以周期是500毫秒。
这是令人沮丧的…我正在附上主C文件,你能帮我看看吗? 谢谢, 主缆 873字节 以上来自于百度翻译 以下为原文 I have the Run Mode in Continuous, so it should not just trigger once then stop. I have everything setup the same way as you have in the example except my clock is slower so the Period is 500ms. This is frustrating... I am attaching the main.c file, can you help and take a look? Thanks,
|
|
|
|
我知道关于计时器改变RPM,但问题是PWM时钟,如果我改变计时器插脚根据150 rpm,电机扭矩减少,在200转每分钟它需要启动扭矩,如果我改变PWM时钟,复选变得更好,但没有适当的,仍然扭矩是如此之低。
以上来自于百度翻译 以下为原文 i know this about the timer to change the RPM, but the problem is with PWM clock,, if i change the timer interupt according to 150RPM ,torque of motor reduced, and at 200 RPM it need the starting torqe,, if i change the PWM clock,, the reulse get better,, but no proper,, still torque is so low.. |
|
|
|
更好地发布完整的项目,主体()看起来很好。我住在UTC + 1时区,所以我现在就上床睡觉。
直到明天 鲍勃 以上来自于百度翻译 以下为原文 Better post the complete project, the main() looks ok as far as I can see. I live in UTC+1 Timezone, so I'll go to bed right now. Until tomorrow Bob |
|
|
|
嗨,DASG,有没有关于如何使用计时器的完整的PSoC3/5示例代码?
以上来自于百度翻译 以下为原文 Hi dasg, is there any complete PSoC3/5 example code on how to use timers? |
|
|
|
这是整个项目。我尝试配置定时器作为固定函数和UDB,没有任何区别。
为什么我添加的定时器印在“原型”上面? 剩下的一个星期我都要休假了,所以下周我要试试你的解决方案,但是非常感谢你的帮助! 邮政编码 1.8兆字节 以上来自于百度翻译 以下为原文 Here is the entire project. I tried configuring timer as Fixed Function and UDB, did not make any difference. Why the timer I added imprint "Prototype" on top of it? I am off for the rest of the week, so I will have to try your solution next week, but thanks so much for your help!
|
|
|
|
PSoC定时器非常容易使用。我认为最好的方法是用一个定时器来构建一个简单的应用程序来打开/关闭LED。软件应该非常先进。而且应该得到你的经验。
以上来自于百度翻译 以下为原文 PSoC timer is very easy to use. I think the best way is to build a simple application with a timer to turn on/off an LED. The software should be very straght forward. and should get you hands on experience. |
|
|
|
1、对于固定函数计时器有一个硅bug,除非需要,否则使用UDB版本。
2。新芯片应该固定这个问题,但是ES1和ES2有这个问题。我会从CyPress获得最新的芯片,在这个问题上浪费时间。 三。问题是TC信号将是4个脉冲而不是1个脉冲。然而,如果你真的必须使用固定版本,现在没有新的芯片,你可以添加4个时钟周期的延迟(定时器时钟输入,而不是总线时钟),然后清除定时器状态寄存器(如果你使用计时器中断),那么你就不会有多个触发的中断。 4。最好把额外的中断信号附加到计时器的TC输出中,如所提到的添加延迟,并设置计时器以不产生中断。那你就不用担心计时器的状态了。在重新生成项目时它不会被覆盖。 以上来自于百度翻译 以下为原文 1.There is a silicon bug for the fixed function timer, used the UDB version unless needed to. 2. New chips should have this problem fixed, but ES1 and ES2 has this problem. I would get the latest chip from cypress then to waste time on this issues. 3. The problem is that the TC signal would be 4 pulses instead of 1 pulse. However, if you really have to use the fixed version now and don't have the new chip, you can add a delay of 4 clock cycle( the timer clock input, not the bus clock) then clear the timer status register ( if you use the timer interrupt), then you would not have multiple trigger of the interrupt. 4. It is best to attach an extra interrupt signal to the TC output of the timer yourself, add the delay as mentioned and set the timer to not generate interrupt. Then you don't need to worry about the timer status at all. and it would not be overwritten when re-generating the project. |
|
|
|
对于PSoC Creator中的每个组件,都有一个关联的简单代码示例。这可以找到如下,
组件(右击)-gt;找到示例项目。我希望这有帮助。此外,通过组件数据表读取将解释定时器组件的操作和配置。 以上来自于百度翻译 以下为原文 For each component in PSoC Creator, there is an associated simple code example. This can be found as follows, component (right click) --> Find Example project. I hope this helps. Moreover reading through the component datsheet will explain the operation and configuration of the timer component. |
|
|
|
你能解释更多关于你的4吗?
我仍然有产生不止一个中断的麻烦。我在UDB中配置了定时器,并且在配置菜单中不中断地中断了“TC”。我通过DFF将TC输出连接到TimeRISR,这是你额外入侵的方法吗? 我在中断例程和主程序中设置断点,看来程序只中断一次,那么它就不会停止了。 定时器 55.5 K 以上来自于百度翻译 以下为原文 can you explain more on your #4? I am still having trouble to generate more than one interrupt. I configured timer as UDB and I unchecked Interrupts "On TC" in the Configure menu. And I connected tc output to TimerISR through DFF, this is your way to do extra intrrupt? I set break point inside the interrupt routine and main routine, it seems the program only break once, then it will not stop any more.
|
|
|
|
我在DASQ的帖子里看不到任何图片,其他人有Selimar问题吗?
无论如何,我需要建立计时器,所以我把倒计时设置为0.5秒。但是中断中断在一段时间后被触发。如果我提高计时器优先级,那么UART中断就不会被触发。看来,我总是有问题的最低优先级中断。有什么建议吗? 以上来自于百度翻译 以下为原文 I can not see any pictures in dasq's post, does anyone else have silimar problem? Anyway, I need to build timer, so I configure the count down to be 0.5sec. However, the interrupt stop being triggered after a while. If I raise the timer priority, then the UART interrupt wouldn't be triggered. It seems that I always have problem with the lowest priority interrupt. Any suggestions? |
|
|
|
你不需要FF,只需将TC直接连接到ISR信号。
1。记住启用TimeRISR。 2。你应该使用上升沿为你的ISR信号。 三。如果你有CRO,在你的ISR中,发送一个脉冲输出到一个OP引脚并用CRO检查它。如果你不这样做,你可以在每个IpUPT上切换一个输出引脚,并连接一个LED来检查它。 以上来自于百度翻译 以下为原文 you don't need the FF, just connect the TC directly to the ISR signal. 1. remember to enabled the timerisr. 2. You should use rising edge for your isr signal . 3. If you have CRO, inside your ISR, send a pulse ouput to an op pin and check it with a CRO. If you don't, you can toggle an output pin every interupt and connect a LED to check that. |
|
|
|
有些更新,我把TimeRISR优先级改为5,高于UART中断和我的DACGII2C。当我在调试模式下运行时,中断触发很好,但是,如果我让它自由运行一段时间,那么我会暂停,然后在定时器中断内设置断点,它将不再触发。
以上来自于百度翻译 以下为原文 some update, I change the timerISR priority to be 5, higher than UART interrupt and my DAC_I2C. When I am running in debug mode, the interrupt triggered fine, however, if I let it run freely for a while, then I hit pause, then set break point inside timer interrupt, it will not trigger any more. |
|
|
|
在上传的项目中使用固定函数。首先尝试使用UDB类型。
以上来自于百度翻译 以下为原文 you use fixed function in your uploaded project. try to use UDB type first. |
|
|
|
尝试UDB,没有任何区别。
我在无限循环中加了一个TimeRe1a Read Valk(),它只减少了一个时间,就不会再改变了。不知道哪里出了问题: 以上来自于百度翻译 以下为原文 tried UDB, does not make any difference. I added a Timer_1_ReadPeriod() in the infinite loop and fund it only decreases one time, then wouldn't change any more. don't know where goes wrong:( |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2106 浏览 1 评论
1853 浏览 1 评论
3671 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
572浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
424浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
438浏览 2评论
386浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
916浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 23:54 , Processed in 1.286557 second(s), Total 108, Slave 91 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号