完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好。我有一个CY8CKIT-050。我通过几个程序跑了。液晶显示字符,段,ADC。没问题。但是我似乎对按键的数字输入引脚的问题。我设置了一个控制登记控制一个LED,没有问题要改变状态。我接了一个中断的数字输入引脚和没有麻烦激活中断incerting输入引脚和中断之间没有逻辑。输入设置电阻拉和一个初始的“1”状态。我试着玩的状态,还没有运气与输入引脚。有什么想法吗?IM使用内置引脚P155。
以上来自于百度翻译 以下为原文 Hi. I got a CY8CKIT-050. I ran thru a few programs. LCD character, segment, ADC. No problem. However I seem to be having problems with the digital input pins for the push buttons. I set up a control register to control a LED and have no roblem getting that to change state. I connected a interrupt to the digital input pin and have no trouble activating the interrupt by incerting a not logic between the input pin and the interrupt. The input is set for resistive pull up and a initial "1" state. Ive tried playing with the states and still have no luck with the input pin. Any Ideas? Im using the built in pin P15_5. |
|
相关推荐
11个回答
|
|
请您发布您的完整项目,否则可能会妨碍您的中断的设置。
使用“文件-gt;创建工作区束(最小)”并上传生成的存档(DoOT使用Chrome,不工作) 鲍勃 以上来自于百度翻译 以下为原文 Will you please post your complete project, there might be settings that hinder your interrupt to be raised. Use "File -> Create Workspace Bundle(minimal)" and upload the resulting archive (DO NOT use chrome, does not work) Bob |
|
|
|
这是文件。推动一个按钮应该把LED和其他关。顺便说一句。为什么有一个小小的信息窗口??
设计:CyWrk.CaseV01.Zip 456 K 以上来自于百度翻译 以下为原文 Here is the file. Pushing one button should turn the LED on and the other turn it off. By the way. Why is there a little tiny window for messages??
|
|
|
|
关于项目:中断类型是“派生”,用于固定功能块。在这里使用“上升沿”。
您不需要使用控制寄存器,您可以删除“硬件连接”检查UNIN引脚并直接写入WITT PUNAMEXWRORE()。 关于“小窗口”:开启IE.的“兼容模式” 快乐编码 鲍勃 以上来自于百度翻译 以下为原文 Regarding Project: The interrupt type is "Derived" which is used for fixed-function blocks. Use "rising edge" here. You do not need to use a control register, you may remove the "Hardware Connection" check un a pin and write directly wit Pinname_Write(). Regarding the "Small Window": Turn on "Compatibility Mode" in IE. Happy coding Bob |
|
|
|
对于简单的项目,打开LED,你的方法可以。但是机械开关,
继电器等。有一个坏习惯,弹跳的接触和释放。因此考虑 处理此问题时使用故障部件。 问候,Dana 以上来自于百度翻译 以下为原文 For simple projects, turning on led, your approach OK. But mechanical switches, relays, etc.. have a nasty habit of bouncing on contact and release. So consider using the glitch component when handling this problem. Regards, Dana |
|
|
|
谢谢大家。
我把它都配置了逻辑和一个DeNunter。但是为了简化它,我除去了基本的东西。 不过,我认为董事会是不好的。似乎没有任何东西产生按钮的信号。 以上来自于百度翻译 以下为原文 Thanks folks. I had it all configured with logic and a debouncer. But to make it simple I removed all but the basic. However I think the board is no good. Nothing seems to generate a signal from the pushbuttons. |
|
|
|
我们没有像在论坛还描述你的情况。*所有*板已经工作,在最初的测试编程到你可以重新加载和重新运行。
你怎么确认没有产生中断?LED不工作或你在中断处理程序的断点? 你正确地支持所需的外部连接到LED的? 鲍勃 以上来自于百度翻译 以下为原文 We did not have a case like you describe in the forum yet. *ALL* boards have been working and there was initially a self-test programmed into which you may reload and run again. How did you confirm that no interrupt is generated? By LED not working or did you set a breakpoint in the interrupt handler? Did you correctly support the required external connections to the LEDs? Bob |
|
|
|
做一个快速测试与DVM看看按钮是否拉动引脚到地面。
问候,Dana。 以上来自于百度翻译 以下为原文 Do a quick test with a DVM to see if button is pulling pin to ground. Regards, Dana. |
|
|
|
已经检查了按钮。
焊接在CPU看起来很干燥没有流过旁边的IO我使用。我要回流,看看会发生什么。 鲍勃。我可以产生一个中断,LED的光线通过插入引脚和中断之间没有条件.. 谢谢你的惠普小费。 我不是最好的程序员。但情况也不坏。D 有没有设置防止IDE擦除用户代码? 吉姆 以上来自于百度翻译 以下为原文 Already checked the buttons. The soldering around the cpu looks very dry and un flowed on the side with the IO im using. Ill going to reflow it and see what happens. Bob. I can generate a interrupt and light the LED by inserting a not condition between the pin and the interrupt.. Thanks for the HW tip. Im not the best programmer. But not the worse either. :D Is there a setting to prevent the IDE from erasing user code? Jim |
|
|
|
当你用一个非门倒置PIN信号时,会有一个上升沿触发中断,相当于OK。
我总是使用CysIsRyStudio()和CysIsR()宏(所有在“系统参考指南”中可以从帮助菜单中访问的)和API ISRSARTXTEXE()描述。所以我把中断保存在我自己的文件中,而不是在可能被意外覆盖的生成的源内。 没有人质疑你的编程技巧和风格(所以)继续编码… 鲍勃 以上来自于百度翻译 以下为原文 Well, when you invert the pin-signal with a NOT-gate there will be a rising edge that triggers the interrupt, quite o.k. I always use the CY_ISR_PROTO() and CY_ISR() macros (all described in the "System Reference Guide" accessable from help menu) and the API isr_StartEx(). So I keep the interrupts in my own files and not within the generated sources which might be overwritten by accident. Nobody questioned your programming skills and style (yet) so keep on coding... Bob |
|
|
|
|
|
|
|
祝贺你!
我已经学会了(在一个PS速度慢很多的时候),从不把机械开关连接到中断,因为弹跳可以很容易地点燃几百个入口。 一个开关可以很容易地被轮询,并且当你设置一个计时器100秒的时候,你可以在计时器INT中轮询开关(ES),系统仍然没有太大的压力。此外,这可能被用来作为一个点来介绍一个自写的反弹跳程序。 鲍勃 以上来自于百度翻译 以下为原文 Congratulations! I have learned (at a time where µPs where a lot slower) to NEVER connect an mechanical switch to an interrupt because the bouncing could easily fire a couple of hundred ints. A switch can be polled easily and when you set up a timer that fires 100 times a second you may poll the switch(es) in the timer-int and still the system is not stressed much. Additionally this might be used as the point to introduce a self-written de-bounce routine. Bob |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2103 浏览 1 评论
1849 浏览 1 评论
3667 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1784 浏览 6 评论
1534 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
566浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
420浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
435浏览 2评论
381浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
913浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 18:13 , Processed in 1.020779 second(s), Total 63, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号