CapSense PWM

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

cross mob
ViC_3886151
Level 3
Level 3

Greetings!

I'm using PSoC 5LP MCU in my project. I'm interfacing CY8CMBR3116 CapSense controller with PSoC through I2C communication.

My requirement is that the CapSense LEDs should glow at the beginning. When I touch a CapSense, the respective CapSense LED should keep blinking until the CapSense is pressed again.

But I'm unable to blink the CapSense LED. I tried to do it using PWM_DUTYCYCLE_CFG1 [for the CapSense at CS1 pin] register but the LED does not blink.

Any help is welcome. Thanks in advance.

Regards,

Vinay

0 Likes
1 Solution
ShanmathiN_06
Employee
Employee
100 replies posted 50 replies posted 25 replies posted

Hello Vinay,

You can enable TOGGLE_EN so that the LED turns ON/OFF on consecutive touches on the sensor.

As you have mentioned, you can control the active and inactive duty cycles through the PWM_DUTYCYCLE_CFG register. However, since the frequency is high, you could only vary the intensity/ brightness using this register.

In case, you would like to visually view the blinking effect in LEDs, I suggest you to enable host control and control the GPIOs in host firmware, depending on button touches.

Read the BUTTON_STAT register, when the HI pin goes low to find the detected button touches and control the GPIOs accordingly.

Thanks,
Shanmathi

View solution in original post

0 Likes
1 Reply
ShanmathiN_06
Employee
Employee
100 replies posted 50 replies posted 25 replies posted

Hello Vinay,

You can enable TOGGLE_EN so that the LED turns ON/OFF on consecutive touches on the sensor.

As you have mentioned, you can control the active and inactive duty cycles through the PWM_DUTYCYCLE_CFG register. However, since the frequency is high, you could only vary the intensity/ brightness using this register.

In case, you would like to visually view the blinking effect in LEDs, I suggest you to enable host control and control the GPIOs in host firmware, depending on button touches.

Read the BUTTON_STAT register, when the HI pin goes low to find the detected button touches and control the GPIOs accordingly.

Thanks,
Shanmathi

0 Likes