How to use Dual channel or triple ADC?

Hi, I'm using SDK17.02 on nRF52810,and I have enabled AIN6 reading the voltage of battery successfully.

Now I need to read another voltage outside at the same time, so what should I do?

Here is the ADC code:

  • You need to call nrf_drv_saadc_channel_init() on another channel, up to 7 more times, for a total of 8 channels.

    Once a channel is enabled it will, along any other enabled channel, get sampled once when the SAMPLE task is triggered. The result is stored sequentially in RAM once the buffer is full. See SAADC — Successive approximation analog-to-digital converter for more details. 

  • Hi, could you show me how to use dual channel in my project? I just want to read the voltage that both NRF_SAADC_INPUT_AIN6 and NRF_SAADC_INPUT_AIN7. I have tried but failed(Fatal Error).

  • Hi, and sorry for the long delay.

    This ticket seems to have slipped between the cracks. Do you still have an issue, or did you manage to resolve it on your own?

    Best regards,

    Didrik

  • Thanks for your reply.

    I still have this issue, I can not read two channels  voltage by that way. 

  • I notice in your code that you only init one of the channels. Have you tried to init the other channel as well?