Cypress技术论坛
直播中

廖丽霞

7年用户 149经验值
私信 关注
[问答]

CY8CMBR3:pollig capsense只工作一次

你好,
我设计了一个使用CY8CMBR3108芯片的板,在CS0上用外部的ARDUINO UNO使用它制作了一个CAPSENSE按钮,我可以很容易地得到按钮状态,使用一个修改的版本,用于在做同样的事情时在网络上找到的ARBUDIO,但是有一个AtTyY85,我有一些麻烦:在第二次阅读中,我只能获得一次CAPSENSE按钮的状态。
也许我错过了一点,比如一些时间问题?
我使用的是“软件”I2C,但事实上,我至少可以读一次CAPSENSE状态,可能表明I2C是WorkIG,而我的问题来自其他地方。
提前感谢您的任何帮助!
Atsiyy85 I2CyCyPrimest.I.Zip
2.3 K

以上来自于百度翻译


     以下为原文
  Hello,

I designed a board using the CY8CMBR3108 chip, and made a capsense button on CS0
When using it with an external arduino UNO, I can get the button status easily , using a modified version of the MBR3_Read_Status for arduino found on the web
When doing the same thing, but with an attiny85, I have some troubles: I can get the status of the capsense button only once, at the second reading
Maybe I am missing a point, like some timing issues?

I am using a "software" I2C, but the fact that I can read, at least once, the capsense status may suggest that the I2C is workig, and my problem comes from somewhere else

Thank you in advance for any help given!


回帖(2)

李洪洋

2018-11-28 16:36:25
嗨,Iudovic,
不熟悉ARDIDO工具。
是否有LED指示按钮状态?如果LED闪烁可以跟随CAPSENSE按钮的ON/OFF状态,这个问题必须由主机固件或I2C总线引起。
联系ATITYY85/ARDUNO的技术支持如何?
谢谢,
赖安

以上来自于百度翻译


     以下为原文
  Hi Iudovic,
 
Not familiar with Arduido tools.
Are there any LED to indicates capsense button status? If LED blink can follow capsense button's ON/OFF status, this issue must be caused by host firmware or I2C bus
How about contacting attiny85/Arduino's tech support?
 
Thanks,
Ryan
举报

廖丽霞

2018-11-28 16:44:16
引用: pengzhongdianzi 发表于 2018-11-28 08:26
嗨,Iudovic,
不熟悉ARDIDO工具。
是否有LED指示按钮状态?如果LED闪烁可以跟随CAPSENSE按钮的ON/OFF状态,这个问题必须由主机固件或I2C总线引起。

嗨,赖安,
非常感谢你的回答!我发现问题出在哪里:
使用TyyWiRem库用于ATTENY85,当接收到0个值(例如,当轮询按钮状态并且没有人被触发)时,I2C中断。我还不知道为什么,但是会调查。
快速修复是在按钮读取之后重新初始化I2C(TinyWiReM.Read()),这就解决了问题。
希望有一天会对别人有用!
不管怎样,谢谢你给我的时间和其他答案(我以前没有谢谢你,对不起,很匆忙)

以上来自于百度翻译


     以下为原文
  Hi Ryan,
 
Thanks a lot for all your answers! I found out what the problem was:
Using the tinyWireM library for attiny85, when receiving a 0 value (e.g when polling the buttons status and no one is triggered), the I2C break. I don't know yet why, but will investigate.
A quick fix is to re-init the I2C ( tinyWireM.begin() ) just after a buttons reading, this fix the problem.
Hope it will be usefull for someone else one day!
 
Thanks you anyway for your time and for the other answers given ( I didn't thanks you before, sorry, was in a rush)
举报

更多回帖

发帖
×
20
完善资料,
赚取积分