I am building an inverting amplifier with an op-amp to attenuate a signal (ie: gain < 1) and I would like to be able to change the gain electronically by connecting multiple resistors to a switch or a multiplexer (as in this excellent answer.
It is possible to put this switch on either of the resistors in the inverting amplifier, making two possible circuits:
Is there any reason to pick one of these circuits over the other? Are there any unexpected "gotchas" that I might be missing?
My gut tells me to go with circuit A because there is always feedback present – circuit B could have no feedback path while the switch changes positions.