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

nRF52840 DAC

Hi everyone,

I was looking nrf52840 datasheet for digital to analog converter but I couldn't fine. It isn't available?

In case that it isn't do you have any recommendations (=<12bit resolution)?

Thanks in advance

Nick

Parents
  • There's two options:

    1. Use the PWM peripheral with an external LF filter. The PWM peripheral has DMA so you can load waveforms into RAM and run them without using the CPU.
      The PWM peripheral is 15 bit, but as a DAC it's dependent on the PWM frequency, where a higher frequency == lower resolution. Base PWM frequency is 488Hz at 15 bit, a doubling of PWM frequency loses one bit in resolution. ie at 12bit the PWM frequency is 488Hz * 2^(15bit-12bit) = 488Hz * 8 = 3.9kHz. The maximum frequency/sample rate of the DAC is half that of the PWM. 

    2. Use an external DAC. 
      We've got an I2S peripheral that can be interfaced with audio DACs, otherwise, a TWI/SPI DAC can be used. We've got DMA with all our serial peripherals so interfacing with DACs requires very little to no CPU overhead, depending on peripheral and DAC chosen. 
Reply
  • There's two options:

    1. Use the PWM peripheral with an external LF filter. The PWM peripheral has DMA so you can load waveforms into RAM and run them without using the CPU.
      The PWM peripheral is 15 bit, but as a DAC it's dependent on the PWM frequency, where a higher frequency == lower resolution. Base PWM frequency is 488Hz at 15 bit, a doubling of PWM frequency loses one bit in resolution. ie at 12bit the PWM frequency is 488Hz * 2^(15bit-12bit) = 488Hz * 8 = 3.9kHz. The maximum frequency/sample rate of the DAC is half that of the PWM. 

    2. Use an external DAC. 
      We've got an I2S peripheral that can be interfaced with audio DACs, otherwise, a TWI/SPI DAC can be used. We've got DMA with all our serial peripherals so interfacing with DACs requires very little to no CPU overhead, depending on peripheral and DAC chosen. 
Children
No Data
Related