Reading Audio Frequency

dynamic microphone feeding an audio signal to a LM324, with the
LM324 feeding a 74HC14 schmitt-trigger.· The output of the 74HC14 is then fed to a BS-2.· Instead of using a dynamic microphone feeding
an audio signal to the LM324,·I used a sign wave audio generator.
I got some really interesting results.· The frequency on the DEBUG screen was not the frequency value I was feeding in, it was way off.· As I
increased frequency from the audio generator, the DEBUG screen frequency decreased.· As I decreased frequency from the audio generator,the DEBUG screen frequency increased. Is this problem related to the 74HC14, because it inverts the signal?·

'{$STAMP BS2}
x VAR word
here:
PULSIN 0,1,x
x=x*2
DEBUG ? x
Pause 1000
SEROUT 8, 16468, [noparse][[/noparse]254,1]
SEROUT 8, 16468, [noparse][[/noparse]DEC x, "HZ"
GOTO here

Wonder if a simple inverter would solve the increase decrease problem?
Wonder why the book had the x=x*2 when this simply doubled what the audio frequency generator said it was putting out?· The SEROUT's where not in the book, I just included them to check the DEBUG screen.· THE LCD read the same as the DEBUG screen. I am trying to make me a guitar tuner that displays frequency on the LCD screen.

Post Edited By Moderator (Jon Williams) : 12/9/2004 2:48:44 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
in frequency and time in the input signal. I will check out COUNT, and check back with you. Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office