> Using Wouter's idea of the comparator Internal comparator briefly flicked through my head. Got me to re-read the datasheet anyway ;-) I've used the comparators only once, a long time ago, as a motor stall detect. Not a feature that gets mentioned much. Less so than the ADC Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .