This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adjustable Volume for PWM Driven Piezo on 51422

I am driving a piezo at a fixed frequency but want to provide adjustable volume by adjusting the duty cycle. I would like to adjust it by setting the duty cycle to 5 levels. For simplicity, lets say 0, 12.5, 25, 37.5, and 50%. However, I am finding this is impacting stability of the Bluetooth communication. Is there any example code that could be used to provide such functionality.

Related