> I am confused about seperating the ranges and giving the > output.Suggestions are welcomed. Hi Yigit. First of all it would probably help to get better resolution - amplify the AC up to 5V pk-pk or use Vref+ To separate the ranges, 16-bit subtraction tests and gotos would be fairly straightforward And for the output, a resistive divider on each pin, multiplexed to a common point with output resistors, perhaps to a buffer amp. Only the active output is set as such and to '1', all others would be hi-Z The other option would be to use PWM into an RC filter and monitor/adjust the voltage with the ADC You don't give all the steps, perhaps there's a logic solution using resistors and 4066 gates -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist