> The AND part is easy... the photo transistors just get hooked in series. This is _not_ true. You cannot ensure that the pulses come in at the same time on the two inputs. Here is a basic idea for an analog solution: For each input: Wire an opto detector as follows: Collector to R to +V Emitter to ground Now the collector will be pulled to zero at the start of each optical pulse. By differentiating this we can create a pulse of more or less known characteristics for each input cycle. We can do this as follows, for each of the inputs: Connect the common point between the R and opto to one end of a C. The other end of the C is connected to the anode of one diode and the cathode of another diode. The cathode of the first diode is connected to +V. The anode of the other diode is connected to one end of a C and one end of an R. The other end of the C is connected to +V. The other end of the R is connected to ground. Call the point at the junction of the last mentioned R, C and diode 'Xn', where n is the input number. At this point we have a circuit where the voltage at Xn will be inversely related to the input frequency. The higher the frequency, the lower the voltage. Connect the anodes of two diodes to X1 and X2. The cathodes of these two diodes connect to an R, the other end of which is connected to ground. Call the junction of these two diodes and the R 'Z'. 'Z' will now have a voltage inversely related to the lower of the two input frequencies. Now you just have to create a VCO driven by Z and you are done. Now doesn't the PIC solution look a lot nicer? (note: IANAEE, so don't laugh too hard!) Bob Ammerman RAm Systems -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.