I can't help but think your solution is overly complecated...
if i got you right you've got POT's setup (6 i believe?) to measure some sort of angles () and feed these into a comparator which i'm assuming has some sort of reference pot so that you can tune it to the angle you want.
Your then reading the output from your comparators from your pic and controlling a set of motors...
Far too complecated...
if i may, can i surgest a more acurite way...
Something like a pic16F877A has 8 analogue ports that can read a POT directly...
So, use 10K or 100K pots, connect one end of pot to +5V the other to ground and the middle pin goes to your ADC port (acts as a voltage devider)...
In the program you read the ADC, if it's anything other than 2.5volts (50% of the ADC max value) then it's off center and you can take action directly with the pic...
You will find this method much more precise as it will measure less than 1 deg off center...
Also, if you are measuring say pitch and roll, you therefor only need two pots and 4 outputs (2 per motor)...
I'f i've got what your trying to do completely wrong then tell me...
:edit
Actually, the pic your using has 4 analogue lines...
Bookmarks