> 4. I could use ADC, but it seems inefficient to convert the voltage > into an 8 bit number just to turn it back into a one or zero That would give you an earlier warning of drift than a Schmitt trigger could. What you'd have with ADC is essentially an adjustable ST. Really it depends on the speed of transition between light and dark, ie how fast the robot is drifting and how quickly you want to respond and correct. Using the h/w of ST pins might be the more convenient solution but I'd have a look at ADC, JFTHOI -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist