Noisy audio
John Jenkins
Posts: 12
Whenever I use any of the sound related functions (frequout, dtmfout, etc), there is an audible click right before the tone is produced. It's not too noticeble when only one or two tones are played, but run a random bunch of them out rapidly and the clicking is very distracting. I am using the std filter on the output of the stamp (shown in the Freqout section of help) consisting of a couple of 1K resistors, a .1 and a .01 uf cap, driving an audio amp.
I'm using a BS2sx.
Does anyone have any suggestion as to how to eliminate this extraneous noise?
Thanks!
John Jenkins
www.sparkmuseum.com
I'm using a BS2sx.
Does anyone have any suggestion as to how to eliminate this extraneous noise?
Thanks!
John Jenkins
www.sparkmuseum.com
Comments
sounds like the port might be set high at some point before you send out your audio. Essentially it could be putting a DC voltage on that pin and causing your speaker to 'pop'. You might have to put a LOW <pin> in before your audio out command. Just a thought.
If you post your code, someone might pick up on it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Additionally, what kind of output sound device are you using: audio speaker, piezo speaker, or earphone?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
' {$STAMP BS2sx}
·Randfreq1 VAR Word
·Freq1· VAR randfreq1.LOWBYTE
·freq2 VAR randfreq1.NIB0
·OUTPUT 12
·do
· GOSUB play
·loop
play:
RANDOM Randfreq1
DEBUG DEC freq1,CR
FREQOUT 12,100,freq1
RETURN
The cap should block an dc that might get to your speaker.
If you has a scope, I'd suggest scoping the output to see if you have a DC bias at the speaker. Essentially this means that when the amp conducts, it has some dc at its output and yet your AC audio will still drive the speaker...just at the DC level (does that make sense?).
If you had a 2Volt (peak to peak) sine wave....on a scope, you'd expect to see one half of the sine wave above ground and the other have below ground (1 Volt above and 1 Volt below)....if you have a DC bias, you'll still have the 2Volt (peak to peak) but the "ground level" will actually be the DC level...so, if you have a 3volt DC bias, you're sine wave will have an upper peak of 4 Volts (DC bias plus half your sine wave) and a lower peak of 2 Volts (DC bias minus the other half of your sine wave).....so, your speaker will be drive from this, but that sudden hit of DC voltage actually causes your speaker to 'pop'.
Hope that helps a bit....let us know!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Thanks for your help!
JJ
If you have a scope, then can you capture the "pop" and post that?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."