完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好!如何在没有使用DigBuf模块的情况下从比较器的输出中产生中断?在路由到DigBuf之后,是否可以在使用之前和之前使用相同的转换来获得两个中断?我读过有关柏树文献的相关资料,但没能找到任何结论。我在开始时确实包含了PrimaDebug THANTHER。在Boo.tPL文件中,我试着把LJMP-COMP1(以COMP1命名),然后开始,在我的ISR中,我在C中编码,每当中断发生时,我试图改变一个LED的状态,但是不能成功。告诉我正确的顺序和/或相同的示例代码。谢谢。
以上来自于百度翻译 以下为原文 Hello! How to generate an interrupt from comparator's output without using any DigBuf module? Can I get two interrupts using the same transition before & after routing to a DigBuf ? I read related stuff on cypress documentation but wasn't able to figure out anything conclusive. I did include pragma interrupt_handler in the beginning. I tried incorporating ljmp _Comp1 (taking Comp1 as the name) in boot.tpl file & then to begin with, in my ISR, which I'm coding in C, I tried to change an LED's status everytime an interrupt occurs but couldn't succeed. Tell me the correct sequence and/or example code for the same. Thanks a lot. |
|
相关推荐
13个回答
|
|
您可以参阅应用笔记AN2108中提出的设计2——实现滞后比较器-HTTP://wwwyCysP.COM/?RID=2780
除了为设计2编写的代码外,还添加以下内容以实现中断/ ********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************从下面的列表中选择一个指令,这取决于SC块放置在哪里*/tnSk0}=0x02;/ /如果SC块放置在列0中,则将此用作IntMsK0=0x04;/ /如果SC块放置在列1中,则使用此,如果Sc块放置在列2中(0)=0x10;/(如果SC区块列在第3栏/ ******************************************************************************************************************************************************************************************************************************************.) 以上来自于百度翻译 以下为原文 You can refer Design 2 presented in application note AN2108 - Implementing Hysteresis Comparator - http://www.cypress.com/?rID=2780 In addition to the code written for Design 2, add following to enable the interrupt - /*****************************************************************************/ M8C_EnableGInt ; //enable global interrupt /* enable comparator interrupt. Select an instruction from the list below depending on where SC block is placed */ INT_MSK0 |= 0x02; //use this if SC block is placed in column 0 INT_MSK0 |= 0x04; //use this if SC block is placed in column 1 INT_MSK0 |= 0x08; //use this if SC block is placed in column 2 INT_MSK0 |= 0x10; //use this if SC block is placed in column 3 /****************************************************************************/ |
|
|
|
不要忘记用LJMP ISR名称修改Boo.tPL,项目的根目录
对于该专栏- org 08h;模拟列0中断向量@ @中断t2’ReTi org 0CH;模拟列1中断向量@ @中断t3’ReTi org 10h;模拟列2中断向量@ @中断t4’ReTi org 14h;模拟列3中断向量@ @中断t5’ReTi 你用“-@中断”来代替 “LJMP ISRNAMED”(如果ISR是C解决方案,比如COMPISR,然后用它的名字,LjMP-COMPISR) 问候,Dana。 以上来自于百度翻译 以下为原文 And don't forget to modify boot.tpl, root directory of project, with ljmp ISR name for that column - org 08h ;Analog Column 0 Interrupt Vector `@INTERRUPT_2` reti org 0Ch ;Analog Column 1 Interrupt Vector `@INTERRUPT_3` reti org 10h ;Analog Column 2 Interrupt Vector `@INTERRUPT_4` reti org 14h ;Analog Column 3 Interrupt Vector `@INTERRUPT_5` reti You replace the "`@INTERRUPT_n`" contruct with - "ljmp ISRname" ( if ISR is a C solution, say COMPisr, then use as its name, "ljmp _COMPisr" Regards, Dana. |
|
|
|
到目前为止,我看不到比较器的任何缺陷:取决于模拟列,Boot.tpl中的适当中断必须改变(中断×2到5),并且中断必须通过API启用比较器。
我想,我来测试一下。 鲍勃 以上来自于百度翻译 以下为原文 I cannot see any pitfalls with the comparator so far: Depending on the analog column the appropiate interrupt in Boot.tpl has to be changed (Interrupt #2 to 5) and the interrupt has to be enabled for the comparator via the API. I think, I'll test that. Bob |
|
|
|
我测试过了,效果不错。
生成一个名为COMPUTIN .ASM的文件,其中必须进行修改。 附件是一个工作项目。外部连接需要从Poto0S0到Poto01,中断发生一次一次。 鲍勃 测试文件 121.2 K 以上来自于百度翻译 以下为原文 I tested --- it works fine. There is a file generated named COMP_INT.asm where the modifications have to be made Attached is a working project. External connection is needed from Port0_0 to Port0_1, interrupt occurs once a second. Bob
|
|
|
|
拉玛纳坦
欢迎您再来!你从哪里学会德语词汇的? 以上来自于百度翻译 以下为原文 @ramanathan You are always welcome! Where did you pick up your german vocabular? |
|
|
|
我在大学里有过一个学习德语的活动。甚至不是业余爱好者。你是个绅士——即使在被触发的时候也坚持英语:P
以上来自于百度翻译 以下为原文 I had an activity in college where I'd to learn a bit of german. Not even an amateur. You're a gentleman - sticking to english even when triggered :P |
|
|
|
所以你可以叫我温柔的程序员(宽泛的微笑)
鲍勃 以上来自于百度翻译 以下为原文 So you may call me GentleProgrammierer (broad smile) Bob |
|
|
|
鲍勃,
一个小疯狂从我身边-刚刚得到这个想法;我配置SC块作为比较器-我得到了一个近数字O/P,即边缘不是那么尖锐,如果比较器是用一个CT块,但噪音较小。这些从0到5V的原始转换,当直接路由到引脚时,触发GPIO中断吗? 丹克公羊 以上来自于百度翻译 以下为原文 Bob, A little madness from my side - just got this thought ; I configured SC block as a comparator - I got a nearly digital o/p. i.e the edges are not as sharp as it would be if a comparator is made using a CT block BUT with LESSER noise.. Can these raw transitions from 0-5 V, when directly routed to pins, trigger GPIO Interrupts ? Danke, RAM |
|
|
|
代替将基于SCLAMP的比较器输出路由到PIN,然后生成中断,可以将比较器输出直接路由到每个模拟列中存在的比较器总线。然后,可以启用比较器总线中断。
你可以参考AN2108实现迟滞比较器。 HTTP://www. CyPress?COM/?RID=2780 以上来自于百度翻译 以下为原文 Instead of routing the SCBLOCK based comparator output to a pin and then generating interrupt, you can route the comparator output directly to a comparator bus present in every analog column. You can then enable the comparator bus interrupt. You can refer AN2108 - Implementing Hysteresis Comparator - http://www.cypress.com/?rID=2780 |
|
|
|
我用SC块作为比较器。我已经把O/P路由到比较器的总线-这是什么意思,使比较器总线或有任何具体的指令来完成这一点吗?
皇家音乐学院 以上来自于百度翻译 以下为原文 I'm using an SC block as a comparator. & I've routed the o/p to the Comparator's bus - Is that what you mean by enabling the comparator bus or there are any specific instructions to accomplish this ? RAM |
|
|
|
这是正确的。您可以在PSoC设计器本身的芯片编辑器中实现这一点。
以上来自于百度翻译 以下为原文 That is correct. You can do this in chip editor of PSoC Designer itself. |
|
|
|
RJVB,
谢谢,但我不清楚的是,我问的是如何使用比较器Bo.0的O/P作为中断? (注意-我不想使用DigBuf路由,因为这使得我的O/P有噪声;我不使用CT比较器用户模块,而是在COMPUS上的SC块的模拟转换) 问候、公羊 以上来自于百度翻译 以下为原文 @ rjvb, Thanks but what's not clear to me is different - I'm asking how to use the o/p of ComparatorBus_0 as an interrupt ? (Note - I dont want routing using DigBuf as that makes my o/p noisy ; I'm NOT using a CT comparator user module but an SC block's analog transition on CompBus) Regards, RAM |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
749个成员聚集在这个小组
加入小组2054 浏览 1 评论
1809 浏览 1 评论
3621 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1746 浏览 6 评论
1499 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
483浏览 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 11:32 , Processed in 1.287247 second(s), Total 101, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号