> I am trying to hack a mouse encoder to use as a shaft > encoder for a mobile robot. I removed the slotted wheel, > IR LED, and what I assume is a photo-transistor from a mouse. > The Phototransistor is housed in black plastic and > has three leads. I was wondering if anyone could give me > a circuit so I can interface the (photo-transistor ?) to > a PIC. I want to power the IR Led and then use the int on > change function of portb to record the pulses from the > photo-transistor. ( It mat not be a photo-transistor, > but that's my best guess) A phototransistor is like a regular bipolar transistor (usually NPN) except that it also turns on when light shines on it. The two important questions are how much current will it pass when light is shining on it in your application, and how much current will it leak when the light is being interrupted. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu