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

PSoC™ 6 Forum Discussions

SaWr_4498541
Level 1
Level 1
Welcome!

Hi PSoC6 Community!

What is the order of button sensing in the PSoC6 when debounces is > 1 and there are more than 1 button widgets?

Say there are 2 button widgets and the number of debounces is 2.

Does widget number 1 get measured two times, then widget number 2 gets measured two times, then back to widget number 1 two times, etc.?

OR

Does widget number 1 get measured, then widget number 2, then widget 1 again, then widget 2, etc.?

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi SaWr_4498541​,

The scanning order is same as the widgets configured in the CapSense Configurator. Debounce is a software parameter that determines the no of scans the button should have difference counts greater than FT + hysteresis to report ON status. This doesn't affect the scanning which is hardware action. Scanning happens every time you call Scan API in the application.

Assume you are calling the Scan API every 10 ms in the application with n buttons. If you set the debounce parameter to 2, following happens:

pastedImage_1.png

Hope this answers your question.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi SaWr_4498541​,

The scanning order is same as the widgets configured in the CapSense Configurator. Debounce is a software parameter that determines the no of scans the button should have difference counts greater than FT + hysteresis to report ON status. This doesn't affect the scanning which is hardware action. Scanning happens every time you call Scan API in the application.

Assume you are calling the Scan API every 10 ms in the application with n buttons. If you set the debounce parameter to 2, following happens:

pastedImage_1.png

Hope this answers your question.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes