Got an answer from support again,
"
Please accept my apologies for the late response.
If you want to use different input for the OPAMP you only need to set the correct input on the OPAMP1_C2 register, I make a simple modification on the AN4508SW and I add
OPAMP1_C2 = (OPAMP_C2_AMPPSEL(7) | OPAMP_C2_AMPNSEL(7)); vfnThermistor_measuring(); in order to change the input for the OPAMP1 It works without problem. You do not need to disable the OPAMP Please check that the analog input is on the correct range.
I hope this will help you.
Please let me know if you have more questions Have a good day.
"
I modified my code to use the bitmasks like he suggested:
while(1) {
if((OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(1)) == OPAMP1_C2){
Bit1_NegVal(Bit1_DeviceData); // Signal beginning of input change
OPAMP1_C2 = (OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(2)); // Switch Input to OP1_DM2
}
else{
Bit1_NegVal(Bit1_DeviceData); // Signal beginning of input change
OPAMP1_C2 = (OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(1)); // Switch Input to OP1_DM1
}
_time_delay_ticks(1);
counter++;
}
Unfortunately, I get the same result that I did when I hard-coded the register values. I know my signals are in the correct range, I have swapped them back and forth and continue to get only one real signal to come out. I don't think I am going to spend anymore time on this since i decided my design will uses external muxes for more flexibility anyway. It was a nice dream though.