ADC pins use a while loop during the read to wait for a certain bit. When one ADC pin is used, eveything worked fine, when two or more pins where used, it wouldn't work anymore as every read call would read out the data register to fast without letting the converter do its work. Changed the wait for COCO bit, tested thoroughly, everything works as it should.
ADC pins use a while loop during the read to wait for a certain bit. When one ADC pin is used, eveything worked fine, when two or more pins where used, it wouldn't work anymore as every read call would read out the data register to fast without letting the converter do its work. Changed the wait for COCO bit, tested thoroughly, everything works as it should.