完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,大家好。
我试着从比较器输出信号的上升沿产生一个中断信号。 我已经连接了60MHz时钟(我的PSoC5LP芯片的主时钟)到比较器的时钟输入和ISR组件到比较器的输出。 然而,ISR组件不会产生任何中断信号,尽管我正确地将类型设置为“上升沿”。 由于比较器的输入是60Hz整流正弦波,所以这个问题与输入信号的频率无关。 我找不到ISR组件不能检测比较器输出上升沿的原因。 谢谢您。 问候,Taehoon。 以上来自于百度翻译 以下为原文 Hi, all. I'm trying to generate an interrupt signal from the rising edge of comparator output signal. I've connected 60MHz clock(master clock of my PSoC5LP Chip) to the comparator's clock input and isr component to the output of comparator. However, the isr component does not generate any interrupt signal although I properly set the type as "rising edge". Since the input of comparator is 60Hz rectified sine wave, I think this problem has nothing to do with the input signal's frequency. I cannot find the reason why isr component cannot detect the rising edge of comparator output. Thank you. Regards, Taehoon. |
|
相关推荐
13个回答
|
|
是你
1)启动ISR? 2)启动比较器? 3)设置ISR,如果设置为级别,则在ISR例程中清除中断。 4)偏置比较器正确吗? 5)偏置输入整流60赫兹,使其在比较器允许的模拟输入范围内? 6)如果ISR设置ISR地址。 可能是项目后档案 “文件” “档案工程” 使用Firefox或IE,而不是Chrome发布。 问候,Dana。 以上来自于百度翻译 以下为原文 Did you 1) Start the isr ? 2) Start Comparator ? 3) Set ISR, if set to level you cleared interrupt in isr routine. 4) Bias comparator properly ? 5) Offset input rectifiled 60 Hz so its in the allowed analog input range of the comparator ? 6) Set address of isr if C isr. Maybe post archive of project - “File” “Archive Project” Use Firefox or IE, not chrome to post. Regards, Dana. |
|
|
|
你可以进行调试,比较器输出路由到一个引脚,并检查与范围(或逻辑测试)你是否得到正确的信号吗。
我猜它的错误的比较值(0V可能不会工作),一个没有开始的组件,或禁用全局中断。 以上来自于百度翻译 以下为原文 For debugging, you can route the comparator output to a pin, and check with a scope (or logic tester) whether you get a proper signal there. I would guess its either wrong compare value (0V probably wouldn't work), a not started component, or disabled global interrupts. |
|
|
|
Dana,我想你没有理由可以适用于我的情况。我已经把所有的东西都配置好了。Hli,我的比较器检测0v相当好(其实比0V点高)但似乎比较器输出不能上升沿触发中断服务程序。我目前正在使用PSoC的比较器。
以上来自于百度翻译 以下为原文 Dana, I think none of your reasons can be applied to my situation. I've already configured all things properly. Hli, my comparator detects 0V quite well(actually it a little bit higher than 0V) but it seems the rising edge of comparator output cannot trigger the interrupt service routine. I'm currently using the PSoC's comparator. |
|
|
|
1。我假设你观察到比较器改变状态。
2。你是否检查了从触发点附近的COMAPART输出只有一个“状态”改变了吗? 三。你检查电路是否工作时,时钟是较低的说,10米或5米? 以上来自于百度翻译 以下为原文 1. I assumed that you had observed the comparator does changes state. 2. Did you check if there is only "ONE" changed of state from the comapartor output near your trigger point? 3. Did you check if the circuit works when the clock is lower say 10m or 5m? |
|
|
|
这是我的项目文件。我已经观察到控制寄存器的输出是否正在产生中断。谢谢大家。问候,Taehoon。
莱德里克 3.1兆字节 以上来自于百度翻译 以下为原文 Here's my project file. I've observed the output of control register whether the interrupt is being generated. Thank you all. Regards, Taehoon.
|
|
|
|
因为你的程序不仅仅是检查那个中断:你能创建一个简化的例子,只使用比较器(和VDACACE用于设置参考),也许一个PIN是由比较器输出驱动的?然后ISR可以切换LED。
这样,您就可以确保它确实是ISR和比较器的问题,而不是您项目中的其他问题。它让我们更容易找到问题… 以上来自于百度翻译 以下为原文 Since your program does more than just checking for that interrupt: can you create a reduced example that just employs the comparator (and the VDAC used for setting the reference), and maybe the one pin the gets driven by the comparator output? The ISR then could toggle a LED. That way you can ensure that it really is a problem with the ISR and the comparator, and not something else in your project. And it makes looking for the problem easier for us... |
|
|
|
你有比较器设置为212毫伏行程(+有点歇斯底里)。
看起来不错。对我来说奇怪的是计时比较器。 在60 MHz时,其响应时间更像lt;10 MHz。但我可以 在COMP时钟上找不到任何AC规范。我心中充满疑虑。加上 这是一个浪费功率的60赫兹信号的兴趣。 另一个需要考虑的问题,如果你需要额外的高速比较器 恢复时间让它恢复运行,虽然我不认为这是 60赫兹的一个因素。正弦波的输入电压范围是多少? 关于地面?输入信号不应低于Vssa。 我想你看到“比较器跳闸60 Hz输出正常”? 问候,Dana。 以上来自于百度翻译 以下为原文 You have the comparator setup for 212 mV trip (+ a little hysterisis). Which seems OK. What looked odd to me is clocking the comparator at 60 Mhz, when its response time is more like < 10 Mhz. Yet I could not find any AC spec on Comp clock. Suspicious in my mind. Plus thats a waste of power in light of 60 Hz signal of interest. Another consideration, if you overdrive a comparator it takes additional recovery time to get it back in operation, although I do not think that is a factor at 60 Hz. What is the input voltage range of the sine wave, and with respect to ground ? The input signal should not go below Vssa. I presume you see "normal" output of comparator tripping on the 60 Hz ? Regards, Dana. |
|
|
|
另一个想法,如果你输入一个比较器或OpAmp
在它的CM范围之外,取决于体系结构,你可以得到相位。 输出反转是一种可能。一般不是闭锁状态, 一旦输入返回CM范围内的比较器输出报告正确 决定… 我也不认为你需要同步比较器作为唯一的驱动 ISR组件 最后,我注意到你用的不是造物主3,认真考虑 更新,因为每个版本的创建者包括错误修复。注意我有一个设置时间 在构建中警告应该清除。 问候,Dana。 以上来自于百度翻译 以下为原文 One other thought, if you take an input to a comparator or OpAmp outside its CM range, depending on architecture, you can get phase reversal in the output as one possibility. Generally not a latchup condition, eg. once input returns inside CM range comparator out reports correct decision..... Also I do not think you need to synch comparator as its only driving an ISR component. Lastly I noticed you are not using Creator 3.0, give serious consideration to updating as each version of Creator includes bug fixes. Note I am getting a setup time warning in build that should be cleared up. Regards, Dana. |
|
|
|
嗨,我做了以下几点
1)使用256 mV VREF作比较器 2)使用WaveDAC8来创建测试的正弦 3)在ISR中使用的修改变量是易失性的 4)消除比较器的同步(我不认为你需要它) 似乎起作用了。你有一个设置时间警告,我认为你应该照顾。 附上项目。 问候,Dana。 LeDyDelv.CyWrk.CaseV02.Zip 2.3兆字节 以上来自于百度翻译 以下为原文 Hi, I did the following - 1) Used a 256 mV Vref for comparator 2) Usede WaveDAC8 to creat a sine for testing 3) Modified variables used in ISR to be volatile 4) Eliminated synch of comparator (I dont think you need it) Seems to work. You have a setup time warning I think you should take care of. Project attached. Regards, Dana. |
|
|
|
谢谢你,Dana。
我确认你的项目运作良好。 然而,当我输入真正的、累加的、分压正弦波到比较器时,控制寄存器总是输出“高”。 在这种情况下,我观察到比较器的输出脉冲,因为它的输入连接到WDAC8,但ISR仍然不能正常工作。 不管怎样,我真的很感激你的帮助,我想我应该向柏树报告这个问题。 问候,Taehoon。 以上来自于百度翻译 以下为原文 Thank you, Dana. I've confirmed that your project works well. However, when I input the real, recitified, voltage-divided sine wave to the comparator, the control register always outputs "HIGH". In this case, I've observed the comparator outputs pulse as its input was connected to the WDAC8, but the ISR still does not work well. Anyway, I really appreciate your help and I think I should report this problem to Cypress. Regards, Taehoon. |
|
|
|
哦,我的上帝!
我终于成功地解决了我的问题。 它是函数AcdSARSISISTN转换的参数。 由于我将参数设置为AdcSARIAWAITYFURY结果,PSoC的CPU被卡在功能块上。 通过将参数更改为AdcSARRayReTurnStand,我可以解决这个问题。 感谢所有回答我愚蠢问题的人。 问候,Taehoon。 以上来自于百度翻译 以下为原文 Oh my god! I finally succeed to fix my problem. It was the parameter of the function ADC_SAR_IsEndConversion. Since I set the parameter as ADC_SAR_WAIT_FOR_RESULT, the cpu of PSoC was stuck on the function block. By changing the parameter to ADC_SAR_RETURN_STATUS, I could fix the problem. Thanks to all people who replied my silly problem. Regards, Taehoon. |
|
|
|
所以ISRID工作得很好,只是邮件循环中的代码没有正确读取结果?这就是为什么在调试过程中把问题简化为最简单的例子是非常重要的:
以上来自于百度翻译 以下为原文 So the ISR did work fine, and just the code in the mail loop did not read the results correctly? That's why reducing the problem to the most simple example is so important during debugging :) |
|
|
|
很高兴听到你的问题是固定的。
但是你的软件会被锁定在等待信号吗?然后旧版本的软件应该停止工作了。 以上来自于百度翻译 以下为原文 Nice to hear that your problem is fixed. But would your software locked up waiting for the signal? then the older version of software should had stopped working completely. |
|
|
|
只有小组成员才能发言,加入小组>>
750个成员聚集在这个小组
加入小组2054 浏览 1 评论
1809 浏览 1 评论
3621 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1746 浏览 6 评论
1499 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
484浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
337浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
400浏览 2评论
341浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
834浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-8 21:24 , Processed in 1.135758 second(s), Total 100, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号