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

Adding a multiplexer on SAADC Example - nRF52840 SDK16

Hi everyone,

I was looking at the SAADC example and I need to modify it in order to fit my design. I want to perform analog readings from eight sensors using an eight-channel multiplexer.

I will keep the timer/PPI arrangement and I want after each successful sample event to change MUX's channel in order to read the next sensor. What is the most efficient way of doing this?

I mean, is it possible to fill in the buffer with all sensors' values before saadc_callback(). If yes, how could I switch the MUX channel after each sampling event (I'm looking to sampling at 100Hz)?

One solution I can figure out is to define SAMPLES_IN_BUFFER 1 (to read only one sensor) and change the MUX's channel each time inside the saads_callback()..but.. it sounds like a dodgy business Slight smile

Any suggestions?

Thanks in advance

Nick

Parents Reply Children
Related