CY8CMBR3 - pollig capsense only work once

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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!

0 Likes
1 Solution
Anonymous
Not applicable

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)

View solution in original post

0 Likes
2 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

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

0 Likes
Anonymous
Not applicable

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)

0 Likes