完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我有一个小问题,我用一个PIN来检测两个方面,比如在前面,我的变量取1,在前面,我的变量取0。 但只有在上升和下降之间的时间非常小,比如3 /4min,我才能够工作,但是我希望它能在1小时前和前的时间内工作。 以下是我的代码: CysISR(SW2L处理程序) { 如果(SW2a读())=0) { 分支=1; PixGrimyLo写(on); } 否则,如果(SW2Bad Read()= 1) { 分支=0; 循环=循环+ 1; PixGrimIn写(OFF); } SW2~清除中断(); } 你能帮帮我吗? 谢谢 以上来自于百度翻译 以下为原文 Hi everyone, I've got a little problem, i use one pin to detect two fronts, like that in a up front my variable take 1 , and on the down front my variable take 0. But that only works when the time between up&down are very small like 3/4min but i want it to work with a time between up and front of 1 Hour. Here is my code : CY_ISR (SW2_Handler) { if (SW2_Read()==0) { branchement=1; Pin_Green_Write(ON); } else if (SW2_Read()==1) { branchement=0; cycles=cycles+1; Pin_Green_Write(OFF); } SW2_ClearInterrupt(); } Could you help me ? thanks |
|
相关推荐
5个回答
|
|
您是否配置了PIN驱动模式作为开漏驱动高或低?否则,当您的开关是打开的,没有真正的信号上的引脚读取。
鲍勃 以上来自于百度翻译 以下为原文 Did you configure the pin drive mode as open drain driving high or low? Otherwise when your switch is open there is no real signal on the pin to read. Bob |
|
|
|
它被配置在一个强大的驱动器上。 但我不知道这个问题是不是来自那个。我检测所有的上升和下降,但只有当一个上升时间和一个下降时间少于4分钟。 以上来自于百度翻译 以下为原文 It was configured on a Strong drive. But i don't know if the problem come from that. I detect all the up&down front but only when the time between an Up and a Down are less than 4 minutes. |
|
|
|
能否请您发布您的完整项目,以便我们都可以看看您的所有设置。为此,使用 创建者-gt;文件& gt;创建工作区束(最小) 并附加生成的文件。外部连接的一些示意图将是有益的。 请用“正面”这个词来解释你的意思,我不知道这意味着什么。 鲍勃 以上来自于百度翻译 以下为原文 Can you please post your complete project so that we all can have a look at all of your settings. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file. Some schematic for the external connections would be helpful. And please explain what you mean with the word "front", I don't know what it means in this context. Bob |
|
|
|
ncmza 发表于 2018-12-12 15:46 嘿, 原谅我前面的语言,我指的是边、边和上升边(上下)。 CyWrk.CaseV01.Zip 1.2兆字节 以上来自于百度翻译 以下为原文 Hey, Excuse me for my language by front i mean edge, falling and rising edge (up & down).
|
|
|
|
没有语言的借口,这里只有少数成员在本地讲英语。 尝试附加项目(未经测试) 鲍勃 CyWrk.CaseV01.Zip 699.9 K 以上来自于百度翻译 以下为原文 No excuses for the language, only a few members here are speaking English natively. Try attached project (untested) Bob
|
|
|
|
只有小组成员才能发言,加入小组>>
719个成员聚集在这个小组
加入小组1913 浏览 1 评论
1667 浏览 1 评论
3419 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1584 浏览 6 评论
1389 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
210浏览 2评论
195浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
342浏览 2评论
368浏览 1评论
76浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-5-14 18:45 , Processed in 0.914462 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号