Rob wrote: >PROJECT: > Infared line detection circuit > >DESCRIPTION: > Ability to correctly identify a significant variance in contrast by >sampling at least 6-8 phototransistors while emitting infared light. > >PROBLEM: > Is there some way (using a flip-flop, or otherwise) to only use 2-3 >pins to sample all 8 inputs? I'm currently using a 16F84A to do this, >run some servos, an LCD, etc (yes, a "robot"). The line detection >routines I've seen on the net use a 1-1 sensor to pin configuration... >There just HAS to be a better way... :) You could use a shift register to pull in 8 lines quickly. That will use only 3 lines I think. (load, clock, data) It also has the advantage of being expandable to more inputs without using any more I/O pins. This is the way to go if digital inputs are what you need. If you want to sample analog voltages then you need a MUX (CD4051) but that will need 3 lines to select 1 of 8 inputs and one line for the selected input itself. Hope this gives you some ideas. >OTHER USES: > Obstacle detection. I've heard of a similar circuit altered slightly >to provide obstacle detection up to 1m or so. Modification was >something along the lines of sending a modulated pulse and "listening" >for that specific pulse, and computing the delay. Has anybody heard of >this? Any ideas, code, resources, etc. for either of these would be >greatly appreciated... > >P.S. I'm not necessarily looking for the solution, just a pointer in >the right direction on the best way of doing either or both of these. >Thanks. > >While I'm at it, where is the best place to pic up some ultrasonic >stuff for obstacle detection (might as well do both, this is a learning >experience, right?) Check piclist.com - there should be something in there about this... -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu