I am attempting to control the gain of an amplifier circuit I am building programmatically. I am using the atmega 32 MCU to control an LCD screen and take input from some buttons. Basically, I would like to include a volume up and down button that tell the MCU to change the amplifier gain.
I have thought of using a transistor to do PWM control in place of the 10k pot, but I was advised that this would not work and that I should use a resistor bank instead or perhaps a switch capacitor circuit.
Can anyone point me in the right direction, and is there any reason why I wouldnt be able to replace the potentiometer with a digital pot like this one: https://www.sparkfun.com/products/10613 ??