Stephen Brown wrote: > > Hi, > > I'm interested in measuring the frequency of a pretty clean sine wave > (output from a switched cap (not to narrow bandwidth) bandpass filter) > using a 16c84. This is for a musical instrument tuning > application. Presumably I would need a 0-5v square wave coming into the > pic for a frequency counter routine. Any ideas on the best way to > convert a sine wave to a square wave for this purpose > (e.g. comparator, overdriven amplifier, PLL)? I played around with a > LMC568 PLL circuit to lock onto the sine wave signal and output a > pulse train, it works but the problem is that the lock in frequency > range for this device is +-60% of the center frequency -- too narrow > for this application. Ideally, I need to be able to handle a bit more > than an octave above and below 440 Hz (i.e. about 200Hz-1000Hz). The > CD4046 ?? PLL chip can be configured for a much wider range, but it > is my understanding that it needs a square wave input itself (am I > wrong?). The nice thing about these PLL things is that they can create > a logic signal indicating when they are locked onto a frequency signal > -- i.e. they can tell you when a valid input is there. > > Anyway, any hints would be appreciated. > > Steve Brown > > sbrown@ned.ara.com > browns@sover.net Why not simply drive it into a schmitt trigger inverter Peter ....... -- ================================== = New Ideas come from those who = = didn't know it wasn't possible = ==================================