How To | Using GPIO configured as an analog input to control a Gain block
Learn how to use a GPIO-configured analog input to adjust the gain of a signal.
If you are not finding the results you need and still have questions, submit a request using the form below and our Tech Docs team will get right on it. Our goal is to provide the content you need!
Your engagement helps us create the content you need. Click here to review this article.
Table of Contents
When using the GPIO configured as an analog input to control gain with a potentiometer, you might find that the Gain knob only sweeps between the low and high voltages being input.
For example, on a CX-Q amplifier, the GPIO configured as an analog input controls the analog input level up to 3.3 V. This means that this knob will sweep between the values 0 and 3.3. If you try to wire that directly to a Gain control, you will find that the potentiometer will only control the gain from 0 to 3.3dB!
To control the full range of the gain knob using the potentiometer, simply wire a custom percent knob between the GPIO input and the Gain control. This will translate the GPIO analog input knob to a positional value rather than a numerical value.