cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Hello ! 

   

( First of all, sorry for my middle english 😕 )

   

Can somebody help me in my project please ? 

   

I've already made a tactile button (with a coppery touch) which switch on a LED when you put your finger on the touch (with CY8CKIT-059). Now, my goal is to realize the same thing but with matrix button 3x3. So with 9 touch on my PCB instead of 1. But I don't know how to configure the CapSense exactly and especially the C code program.

   

Thank you for your time ! 

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi,

   

 

   

To use CSD matrix buttons, you have to configure the CSD component (double click and make changes) to a have a 3x3 matrix widget. In the main.c the basic APIs for CAD will be same. In the place of check the status of the button you have to use the following API

   

CapSense_GetMatrixButtonPos(uint8 widget, uint8* pos)

   

 

   

This API will return 1 if any button is pressed also the position will be available in pos variable. You may find more abut this API in the component datasheet.

   

 

   

Thanks,

   

Yuva.

View solution in original post

0 Likes
Reply
4 Replies
Moderator
Moderator

Hi,

   

 

   

To use CSD matrix buttons, you have to configure the CSD component (double click and make changes) to a have a 3x3 matrix widget. In the main.c the basic APIs for CAD will be same. In the place of check the status of the button you have to use the following API

   

CapSense_GetMatrixButtonPos(uint8 widget, uint8* pos)

   

 

   

This API will return 1 if any button is pressed also the position will be available in pos variable. You may find more abut this API in the component datasheet.

   

 

   

Thanks,

   

Yuva.

View solution in original post

0 Likes
Reply
Moderator
Moderator

Hi,

   

You can easily configure matrix in CapSense module by selecting matrix in CapSense block GUI in PSoC creator.

   

Please go through the code examples and Cypress recommended layout pattern for CapSense Matrix sensors downloadable from the link below.

   

http://www.cypress.com/documentation/development-kitsboards/cy3280-bmm-matrix-button-module-kit

   

Thank you,

   

Ganesh.

Anonymous
Not applicable

Thanks you !

   

But I don't know how use this function : CapSense_GetMatrixButtonPos(uint8 widget, uint8* pos). What parameters I have to place in this function. I read the datasheet and I don't understand it. 

   

Thank you for your time !

   

Hubert.

0 Likes
Reply
Moderator
Moderator

Hi Hubert,

   

Please find the attached example PSoC Creator project. It has the the code that tells you how to use the CapSense_GetMatrixButtonPos() API. Please ensure right pins for colums and rows for your project. Please go through the comment lines in the project for understanding the API.

   

Thank you,

   

Best Regards,

   

Ganesh.