Hi,
I’m having trouble initializing a MUX on an ADC channel. I’m using a 4051 with 8 pots, output connected to ADC10 on the Seed, and mux select pins 0, 1 and 2 connected to daisy pins 14, 13 and 12 respectively.
I’m trying to initialize 8 single ADC channels and 1 MUX channel with the following:
//ADC
AdcChannelConfig adc[9];
//CV inputs
adc[0].InitSingle(hw.GetPin(15));
adc[1].InitSingle(hw.GetPin(16));
adc[2].InitSingle(hw.GetPin(17));
adc[3].InitSingle(hw.GetPin(18));
adc[4].InitSingle(hw.GetPin(19));
adc[5].InitSingle(hw.GetPin(20));
adc[6].InitSingle(hw.GetPin(21));
adc[7].InitSingle(hw.GetPin(22));
//Pots on mux
adc[8].InitMux(hw.GetPin(25),8,hw.GetPin(14),hw.GetPin(13),hw.GetPin(12));
hw.adc.Init(adc, 9);
hw.adc.Start();
And I’m attempting to get floats from the MUX inputs using the following (for the first MUX channel):
PotValue = hw.adc.GetMuxFloat(8,0);
This however results in none of the ADC channels working at all. When the .InitMux line is commented out the rest work fine. Any idea what I’m doing wrong? I’m totally stumped.
Thanks in advance!