I am trying to construct a simple pump controller where the delay time and the pumping time are set on pots. This is the first time I have used analogue inputs on a PIC so I am very new to this. The schematic and the ASM code are attached.
The problem I am encountering is that the delay pot, connected to AN0 in this case, appears to affect the ADC reading from the pumping time pot connected to AN1. If, for example, AN0 is set for minimum time and AN1 set to maximum, the reading for AN1 is reduced by around half. If both are set at maximum everything works fine. Setting AN1 to minimum does not affect the reading of AN0 at all.
I am clearly doing something wrong and I have looked at it for days without finding an answer that works. I would very much appreciate some help.
Chris
The problem I am encountering is that the delay pot, connected to AN0 in this case, appears to affect the ADC reading from the pumping time pot connected to AN1. If, for example, AN0 is set for minimum time and AN1 set to maximum, the reading for AN1 is reduced by around half. If both are set at maximum everything works fine. Setting AN1 to minimum does not affect the reading of AN0 at all.
I am clearly doing something wrong and I have looked at it for days without finding an answer that works. I would very much appreciate some help.
Chris