Getting analog values from different channels using SAADC example

Hello ,

I want to read around 6 analog pins, not necessarily simultaneously. I could afford some delay in between them. i am using nrf52832 dev kit with sdk 15. How do i modify the SAADC example to achieve the same because the example only reads 1 channel. i did found this thread which looks similar but i was unable to open the GitHub link provided in the thread. Can you please direct me to the relevant examples. 

Thank you!

  • Hello,

    It should be fine to measure 6 ADC channels at once.

    Attached is a slightly modified project from the SDK15.0.0\examples\peripheral\saadc example. Only the main.c file is changed. It will measure the 6 pins AIN0 - AIN5, and print the values in the UART log.


    Remember that AIN0 is not the same as A0 printed on the PCB. The AINx pins are:

    AIN0 = P0.02
    AIN1 = P0.03
    AIN2 = P0.04
    AIN3 = P0.05
    AIN4 = P0.28
    AIN5 = P0.29

    Best regards,


Reply Children