You are here

Matrix Button on CY8CKIT-059 (PSoC 5LP) | Cypress Semiconductor

Matrix Button on CY8CKIT-059 (PSoC 5LP)

Summary: 4 Replies, Latest post by gani on 09 Nov 2016 03:07 AM PST
Verified Answers: 3
Last post
Log in to post new comments.
Hubert_69's picture
User
2 posts

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 ! 

yuva's picture
Cypress Employee
29 posts

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.

gani's picture
Cypress Employee
6 posts

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-m...

Thank you,

Ganesh.

Hubert_69's picture
User
2 posts

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.

gani's picture
Cypress Employee
6 posts

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.

Log in to post new comments.