Digital filter in High-Precision AD/DA Board

Hey everyone,

I am working with Waveshare’s High-Precision AD/DA expansion board and have a question about the digital filter.

Can anyone tell me if I can choose how many pins are connected to the filter, or is it automatically all of them? Or if I can change the value of the filter for each pin, or if I can only set the filter to one value that applies to everything?

(Here’s the datasheet - see page 18 for section of the digital filter: click here)

Thanks so much!!

Hi there @lezzlexx

You can change what pins are connected to the A/D converter (filter included) with the MUX register, in other words, you can cycle through the inputs and change the settings for each one with the input multiplexer, you can read more about this in page 21 of the datasheet. After changing which input is the one you want to read you can configure the DRATE register (used in the programmable filter) and other things like the PGA.

I hope that answers your question

2 Likes

Hey @geraldinebc15!!

Ahh right, gotcha. I can continually change the filter value, which only affects one pin because the mux only selects one at a time. So I take it I cannot set the filter to act differently for different pins. That makes sense - that should work!

Thanks so much you’ve been a huge help!! :smiley:

@lezzlexx

Hmm I’m not sure if I made myself clear because you said this:

So I take it I cannot set the filter to act differently for different pins

Yes, you can, you just have to modify the register each time you read a different input, something like what this person tried to do here.

Let me know if that made it a little more clear :smile:

@geraldinebc15

Yes, that is what I thought you meant - I think I am the one at fault for being unclear. I guess what I was imagining when I said “set the filter” was that I meant set it once, say at the beginning, to act differently for different pins, and then it doesn’t have to be touched anymore, and it stays “set” as opposed to having to keep changing it.

Nevertheless, I think I can make it work!

Thank you!

@lezzlexx

Oh, perfect! Then you have it all figured out :smile:

You’re welcome, if you come up with any other questions don’t be afraid to ask :wink: