Post Go back to editing

Can I use this circuit to use GPIO to control MUX ?

Thread Summary

The user wants to use a GPIO to control a MUX in SigmaStudio 4.7, where a hardware switch pulls the GPIO high or low to select between two sources. The final solution involves using a single MP pin with a counter to cycle through MUX inputs, and a debounce value of 20ms is recommended to stabilize the switch signal. For a 4-segment rotary switch, the user needs a method to encode the switch position into a 0-3 index to control a 4-to-1 MUX, ensuring no more than one MP pin is high at a time.
AI Generated Content
Category: Software
Product Number: adau1451
Software Version: SigmaStudio 4.7

I want to use a GPIO to control a MUX in DSP.

My GPIO connects to a hardware  switch, when switch to SRC1 , it pulls high , when switch to SRC2, it pulls low.

Then , I use this curcuit to control MUX in SigmaStudio 4.7. 

The idea is : comapre GPIO input with DC 0 , if greater than DC0, output DC 0 to control MUX. if equal or less than DC0, output DC1 to  control MUX.

It's seems work on my hardware.

But I want to make sure: Is this a stable solution?