I'm making a circuit including a 555 timer controlled by an RC combination, where R is fixed and C is one of several capacitors (values around a few pF to a few hundred pF). I would like to connect the capacitors to the timer circuit using an analog-friendly multiplexer IC (like the 4051). This way, the 555 frequency can be set using any of the capacitors, depending on which is needed at the moment.
Would this actually work? Is this a correct use of a multiplexer chip? Does anyone have any recommendations on how to do this?
Edit: it needs to be controllable by a microcontroller, so a rotary switch won't work (at least rotary switches as I know them). Is there a better way--maybe a bunch of relays?