Seconded -- you'll get more control over the thresholds/levels using the ADC, and it's quite simple coding. You shouldn't worry about inefficiency, as this is trivial for the PIC. IBYDKTA :) Jinx-4 wrote: > >> 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 > > -- View this message in context: http://www.nabble.com/Robot-Sensor-Question-tp17200962p17352176.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist