Hello, I would like know if it is possible to play a buzzer using the Low-power PWM Library ? I am using the nrf51 DK and Softdevice130. The SDK I use is version SDK V 12.3
Joseph Ayuk
Hello, I would like know if it is possible to play a buzzer using the Low-power PWM Library ? I am using the nrf51 DK and Softdevice130. The SDK I use is version SDK V 12.3
Joseph Ayuk
What do you mean, "play a buzzer" ?
If you just want a tone, you don't need PWM at all - just a timer.
I want to play a suitable melody on a speaker connected to my nrf51 dk. I am doubting if the PWM library will satisfy my needs. Is it possible to use a .wav file to play a melody on my speaker connected to the board ? Besides usng Low-power pwm library.
IIRC, the "Low-power PWM Library" does all its cycle-to-cycle updates in software - so is not suitable for constantly varying duty cycles like this.
I suggest looking at the 'PWM Driver' or 'PWM Library' examples instead
"The PWM Library Example demonstrates the use of the pulse-width modulation library by generating waveforms over a GPIO. The GPIO pin could drive a small speaker, for example"
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/pwm_example.html
Thanks for your reply awneil but can the PWM Driver or PWM Library play a suitable melody like maybe the Pirate of Carribean theme on my buzzer ? I really doubt that.
Thanks for your reply awneil but can the PWM Driver or PWM Library play a suitable melody like maybe the Pirate of Carribean theme on my buzzer ? I really doubt that.
I don't know - you'll have to investigate ...
What do you mean by, "suitable".
What kind of "buzzer" (sic?) are you using?
Clearly, it's not going to give you CD quality!!
I'd also missed that you're using nRF51. The nRF52 are more powerful, so would have a better chance; they also have I2S ...