Can I use an amplifier as an attenuator?
That's an interesting question. It seems counter intuitive on the surface, but there are actually some very good reasons why one might want to do this. One very useful feature of an op amp is impedance transformation. Using a passive attenuator in front of an op amp, or using the amplifier itself as an attenuator takes full advantage of this feature. A few precautions must be taken, however.
When using an amplifier as an attenuator, the amplifier has less than unity gain (G < 1). Therefore the assumption is the amplifier must be configured as an inverter. This is because the inverting gain equation is G = –RF/RG, while the noninverting gain equation is G=(RF/RG)+1. A quick inspection indicates that the only viable configuration for an amplifier/attenuator must be inverting. Well not necessarily; as mentioned previously a passive attenuator in front of a noninverting amplifier would work and provide a noninverted output. You could also use a differential amplifier or a difference amplifier; both use the gain equation G = RF/RG. So you can actually use both inverting and noninverting op amp configurations as attenuators... or as amplifiers.
I mentioned that some precautions must be considered when using amplifiers as attenuators. The first is when very large values of feedback resistance are used. This has several implications: more system noise, larger offset voltages and stability. Large feedback resistors, along with the amplifier's input and stray capacitance, can introduce a pole in the amplifiers feedback response, this causes additional phase shift, which reduces the amplifiers phase margin and can lead to instability.
A more important consideration is noise gain and how it relates to amplifier stability. Remember that it is the noise gain, not the signal gain that determines amplifier stability. The noise gain, which is the same for both inverting and noninverting amplifier configurations, is equal to the noninverting gain equation. For example if an inverting amplifier has a signal gain of -0.5, it still has a noise gain of 1.5. Once the noise gain is determined it can be transposed to the open loop gain and phase plot to check for phase margin and stability. If there is at least 45° of phase margin at the selected noise gain, the amplifier will work fine, if less than 45° you might have trouble. There are other ways of increasing noise gain while keeping signal gain low, but that will have to wait for another RAQ.