ADC input error?
Posted: Mon Oct 10, 2011 8:10 pm
I wrote a piece of code using 4.5 that included two ADC inputs. One ADC input went to pin A0 on a PIC16F88. The other ADC input went to A4. I tried changing the ADC properties to match the A0 and A4 inputs. A0 worked fine, but ADC4 always defaulted to ADC1. So basically A4 was getting its data from ADC1 in the Flowcode code.
After spending a whole weekend trying to find out why the software runs fine, but the hardware refused to read anything on A0, I solved the problem by adding ADC1, ADC2, and ADC3 as 'dummies' in the code, but marked them as unconnected in the Properties. The hardware running the code in the PIC is now working fine.
I have added this information so that potential designers who need an ADC input are not caught out by this anomaly.
After spending a whole weekend trying to find out why the software runs fine, but the hardware refused to read anything on A0, I solved the problem by adding ADC1, ADC2, and ADC3 as 'dummies' in the code, but marked them as unconnected in the Properties. The hardware running the code in the PIC is now working fine.
I have added this information so that potential designers who need an ADC input are not caught out by this anomaly.