You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADC is a fantastic piece of code !
During my tests on my small domotic solution, I found that the behaviour of 8 and 16 averaging are exchanged.
The problem comes from the ADC_Module::setAveraging method where the comments are OK but not the code :
} else if (num <= 8) {
num = 8;
// *ADC_SC3_avgs0 = 1;
// *ADC_SC3_avgs1 = 0;
setBit(ADC_SC3, ADC_SC3_AVGS1_BIT); // should be clearBit
clearBit(ADC_SC3, ADC_SC3_AVGS0_BIT); // should be setBit
} else if (num <= 16) {
num = 16;
// *ADC_SC3_avgs0 = 0;
// *ADC_SC3_avgs1 = 1;
clearBit(ADC_SC3, ADC_SC3_AVGS1_BIT); // should be setBit
setBit(ADC_SC3, ADC_SC3_AVGS0_BIT); // should be clearBit
The text was updated successfully, but these errors were encountered:
ADC is a fantastic piece of code !
During my tests on my small domotic solution, I found that the behaviour of 8 and 16 averaging are exchanged.
The problem comes from the ADC_Module::setAveraging method where the comments are OK but not the code :
The text was updated successfully, but these errors were encountered: