Content originally posted in LPCWare by afinezzo1968 on Mon Aug 25 08:10:10 MST 2014
Debugging the API function which reads the 6 allowable ADC pins, the DC voltage on 6 trimmers, and write them on 3 output channels, it seems that the ADC returns some peaks not reasonable admitted, considering the environmental electric noise.
Neither connecting the AD0.x pins to 6 bigger ceramic capacitors nor reducing the ADC clock speed by the CLKDIV bits the problem have been fixed.
The issue have been fixed by implementing a specialized function which removes the wrong values, stored in a big buffer, prior their usage.
The ADC is initialized to work in BURST mode (no interrupt and no DMA), so a function in the main loop calls periodically the readings of the 6 result registers when all the 6 DONE flags are ready.
Somebody know how it could be fixed in a different way, or explaining the cause?
Thanks in advance