Closed ara9329 closed 3 years ago
Can you post a screenshot so I can see what the mux looks like in the SigmaStudio GUI. IIRC there are two types of demuxes that need to be controlled in two separate ways. One with index, another one without.
Thanks for reacting so fast
I don't have a Windows computer at hand, so I can't help you directly by looking at the SigmaStudio project file.
However, if you look at the SigmaStudio capture window you'll see that there are probably several registers changing when you change the demux state. This is the SigmaDSP::demux function:
I'll assume you'll refer to the one with three possible combinations, all the way to the right. This one has three indexes, not four. If you look in the capture window after you've compiled, you can see that it sends a sequence of three bytes depending on which position is set.
I'll guess the syntax would be something like dsp.demux(start_address, 1, 3);
to select the middle one of the three.
thanks again:
Ill give another try although I think ive tried that already.
void chng_output(int t){ //change output channel
switch (t){
Serial.print("output t =");Serial.println(t);
case 0: //AN1
dsp.demux(MOD_2XN_1_ALG0_STEREODEMUXSLEW10_ADDR, 1, 3);
Serial.println("dsp=1");
break;
case 1: //AN1
dsp.demux(MOD_2XN_1_ALG0_STEREODEMUXSLEW10_ADDR, 1, 3);
Serial.println("dsp=2");
break;
case 2: //DAC1
dsp.demux(MOD_2XN_1_ALG0_STEREODEMUXSLEW10_ADDR, 2, 3);
Serial.println("osp=3");
break;
}
This what i have tried
i hear output when downloaded
when the output is changed i can hear the slew
but when selecting the first again I do not get the output
back
I have made a copy of your volume example and changed it for testing de Demux volume_demux.zip
Hey great work I love to work with it at the moment with an ttgo t-display and a adau1701 as preamp xover eq 3d volume and input select MUX works perfect.
i am struggling with the demux syntax its 1 2xn so 2 in 3 out
Can you explain howto use the parameters?
Thanks