Occasional ADC read value errors
I get occasional ADC read errors with PIC24FV32KA302.
Occasionally (about 1 time in 3 hours), the first ADC value in the scan will read as 0xfff, or 4095 decimal.
MCC was used to configure and create the code to get the 3 channels to read, at 0.002 second intervals. The ADC scan is interrupt driven.
The reads are I2C in about 0.002 second intervals. The I2C is interrupt driven.
The main () loop gets the data ready to be read from the ADC values and puts the information into a buffer to be read by I2c.
Thanks,
Norrislte