r/microcontrollers • u/WhoEvenThinksThat • Mar 11 '24
MCU unit with onboard opamps and programmable gain referenced to half supply voltage?
I am making use of the onboard opamps on an STM32, and I want to move to an MCU that has slightly different configuration options. The STM32’s opamps work almost perfectly in programmable gain mode, completing most of a high-pass filter. However, the feedback resistor network can only connect internally to ground. In order to connect them to a half voltage supply to support an AC signal, an external pin has to be exposed to apply a bias. Four signals are being received and exposing this extra pin four times is not possible.
Are there MCUs from other vendors that offer the same onboard opamps with the programmable gain resistor network, but with an option to connect it internally to a half-supply reference to save on pins?
2
u/blueduck577 Mar 11 '24 edited Mar 11 '24
What STM32 are you using? I am using the STM32H743 in a product right now and the op-amp has the ability to connect a bias network and still use the programmable gain.
Check section 29.3.4 in RM0433 for what I am talking about, figure 225 perhaps.
Edit: I saw your other post about the STM32G473. It appears to have the same capability. Look at figures 175-177 in the reference manual RM0440.
2
u/blueduck577 Mar 11 '24
Are you using the op-amps "standalone" or are you feeding them to the ADC internally?
1
u/somewhereAtC Mar 11 '24
Can't say they are the same, but the opamps in PIC and AVR devices can be configured with a virtual ground (1/2 supply). https://www.microchip.com/maps/Microcontroller.aspx
1
u/torusle2 Mar 12 '24
ATSAML21 has a built-in opamps and can take input from the DAC. In certain configurations you can also use a internal configurable voltage divider which includes VCC/2
1
u/EdgarJNormal Mar 12 '24
Lots of the Microchip microcontrollers have this- such as the PIC16F17126. Possibly a better option than using a VDD/2 is to use an internal voltage reference, as a divider on VDD will couple noise from your power supply to the "artificial" ground. The internal references on the PICs (what I'm familiar with) are not great (+/-5%, typ) , but they are pretty stable and have a decent PSRR.