I don't understand what your code is doing, nor do I ever see you set the output values for port C pins (this is the port that has the analog inputs on it).
I don't understand what your code is doing, nor do I ever see you set the output values for port C pins (this is the port that has the analog inputs on it).