I want to operate
Tries to operate a small speaker.
www.wvshare.com/.../Analog-Test-Board.htm
but I can not find the DAC function in nrf51822.
How do I create the Analog signal?
I want to operate
Tries to operate a small speaker.
www.wvshare.com/.../Analog-Test-Board.htm
but I can not find the DAC function in nrf51822.
How do I create the Analog signal?
There is no DAC on the nRF51. You have to use PWM on one of the GPIOs on order to get sound from the chip. We have a PWM library on Github here: github.com/.../nrf51-pwm-library, and it also includes a sound example.
If you want a simpler example, just how to set up the PWM and play back a sound clip, you can have a look at the following example code. It is based on SDK 6.1.0. The main.c file sets up the timer, GPIOTE and PPI to control the pulse width on one of the GPIOs (PWM). The sound clip is stored as an array of uint8_t type samples in the sound.h file
Download:
There is no DAC on the nRF51. You have to use PWM on one of the GPIOs on order to get sound from the chip. We have a PWM library on Github here: github.com/.../nrf51-pwm-library, and it also includes a sound example.
If you want a simpler example, just how to set up the PWM and play back a sound clip, you can have a look at the following example code. It is based on SDK 6.1.0. The main.c file sets up the timer, GPIOTE and PPI to control the pulse width on one of the GPIOs (PWM). The sound clip is stored as an array of uint8_t type samples in the sound.h file
Download: