> Two photo-sensitive inputs. Input will be sensitive to low audio frequency > pulses of light, rather than steady light levels. One LED output. > > With no input, the output flashes at a "rapid" but visible rate (1KHz?). > > If only one input is active, there is no change in the output. > > As the input frequency increases, assuming both inputs are activated, the > output frequency decreases. > > When both inputs are receiving "rapid" (1KHz?) pulses, the output is > completely suppressed. Oho.... Now that is definitely more interesting. 1KHz is much too fast to see. Maybe more like 20-30Hz max visible as 'blinking'. So, what you need is something like this: fmax = maximum output frequency loop forever: f1 = get frequency of first input if (f1 > fmax) then f1 = fmax f2 = get frequency of second input if (f2 > fmax) then f2 = fmax fout = fmax - min(f1,f2) end loop I would probably have interrupt level code maintain the values of (f1,f2) and control toggling the output based on fout. Bob Ammerman RAm Systems -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics