My question is- is there a simple way to size a series resistor and capacitor for a typical A/D input for folks without an advanced degree in circuit design? Random selection seemed to work in this case but I'm hoping for some more scientific help. I read through Microchip's AN693 white paper and also looked at guidance on a low pass RC filters and downloaded Microchip's Filter Lab App. But none of that helped much. One of my goals is also to minimize space and components. Is there an easier or simpler starting point or some basic guidance on ways to select Resistor & Capacitor values for signal conditioning?

Thanks in advance for any help and guidance and for your general support-

Mark ]]>

This is actually a slower approach than what I am doing. It is more nicely coded - but the branching would greatly reduce the speed. I'm trying to run a loop that will iterate at over 100kHz, and I am not concerned with regular periodicity, ie if it runs a few times at 125kHz and a few periods are at 110kHz all is well.

i have proportional control running at 800kHz. However when i add the integral calculation, check for saturation and sum the result, it's at nearly 50kHz. I've managed to get the calculations as clean as possible, but the IF/THENs are killing me.

I was really hoping a CE out there would have a suggestion as to how to deal with this. For instance, the first condition in my current loop checks to see if the result is between 00 and FF, then writes it, then immediately returns to the sample. It only checks for saturation if that condition fails, resulting in an aperiodic signal, but it is only slow when the output is saturated - so I'm not worried about that.

Even if it requires raw assembly I'll be happy to implement it. I'm also trying to come up with a very long routine that would branch only once or twice while continusously resampling and writing when not saturated.Please start a thread in the appropriate forum for detailed technical help. This is just a chat box, your post will disappear quickly. ]]>