Using PWM on GPIO on MPR121

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using PWM on GPIO on MPR121

跳至解决方案
1,523 次查看
paulwilson
Contributor I

Hello,

I am using an MPR121 with 5 touch pads and 5 LED outputs. The LED outputs are on lines LED1, LED2, LED3, LED3, LED5. I can turn all 5 LEDs on and off with the set and clear registers. However, when I attempt to use PWM on the LED outputs, LEDs 1 through 4 operate as expected but LED5 does not. Specifically, if the PWN is turned off (corresponding PWN nibble = 0), I can turn LED5 on and off but if I set the corresponding PWN nibble to any value other than 0, the LED is not illuminated. I have confirmed that there is no signal at all on LED under that condition by means of an oscilloscope. Does anyone else have any experience using the GPIO outputs on the MPR121 with PWM? If so, any ideas as to why I cannot get it to work for LED5.

标记 (5)
0 项奖励
回复
1 解答
742 次查看
paulwilson
Contributor I

Thanks Tomas, the timing works out well as we have a meeting this

morning to discuss transitioning the hardware from a prototype to the

final design.

Best Regards,

Paul

在原帖中查看解决方案

0 项奖励
回复
3 回复数
742 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Paul,

The PWM5 bit control has logic bug. Currently there is a workaround to set LED5 and LED6 with the same DAT setting (DAT[5] = DAT[6] = 1) or reconnect to ELE11/LED7 if possible.


Sorry about this. Both the datasheet and AN3894 needs to be updated to reflect this problem.


Regards,

Tomas

743 次查看
paulwilson
Contributor I

Thanks Tomas, the timing works out well as we have a meeting this

morning to discuss transitioning the hardware from a prototype to the

final design.

Best Regards,

Paul

0 项奖励
回复
742 次查看
djmitch
Contributor I

Hello Paul,

I use the mpr121 on my raspberry.

The touch sensors works well.

But how can i use the inputs

To connect a led.

I found no codes anywhere.

I use python.

Can you help me ?

Thank you.

0 项奖励
回复