Using multiple hardware switches to select output.

I am using an ADAU1452 with custom circuitry. I have one signal source, 5 hardware momentary switches connected to ADC inputs, and 5 output devices (speakers). I am trying to figure out how to use the switches to route the signal source to the respective output device. For example if button 3 is pressed then the signal source will be routed to output device 3.

I have searched the forums but I can't find anything quite similar enough to allow me to solve this on my own. Most of the existing post are about multiple inputs and a single output. How should I go about setting this up? If you can link me to a similar existing post that's perfectly fine. Thanks!

Parents
  • I was able to figure this out on my own if anyone is interested. I actually ended up using latching switches instead of momentary because it's easier to implement, since I don't have to worry about "holding" the switch in Sigma Studio. But essentially what I did was read the ADC inputs and used an abcd logic block to determine if the button is pressed. With +3.3Vdc the digital reading when a button is pressed is around 1020. So I just told it if greater than 1000 then output 1, otherwise 0. I used DC value blocks for the inputs to the comparison block. Then I used an index selectable signal router block to essentially mute (if 0, mix 0) or unmute (if 1, mix 1) the output. This allows multiple outputs to be activated at the same time but that's ok for my purpose. Attached is a screenshot of the first few channels. Hope someone may benefit from this.

Reply
  • I was able to figure this out on my own if anyone is interested. I actually ended up using latching switches instead of momentary because it's easier to implement, since I don't have to worry about "holding" the switch in Sigma Studio. But essentially what I did was read the ADC inputs and used an abcd logic block to determine if the button is pressed. With +3.3Vdc the digital reading when a button is pressed is around 1020. So I just told it if greater than 1000 then output 1, otherwise 0. I used DC value blocks for the inputs to the comparison block. Then I used an index selectable signal router block to essentially mute (if 0, mix 0) or unmute (if 1, mix 1) the output. This allows multiple outputs to be activated at the same time but that's ok for my purpose. Attached is a screenshot of the first few channels. Hope someone may benefit from this.

Children
No Data