I'm trying to generate a tone whenever a specific event occurs using the code:
I have tried this code with both a speaker (with and without 22 uf capacitor) and two different piezo-speakers and neither has produced a tone. When I run the program I hear a "click" coming from the speaker, but then silence. I have changed the code for this program to:Code:SOUND PortA.1, [127, 255]
But I still only hear a click. I have defined OSC as 20 (PIC 18F252) but still nothing is generating a tone. I even tried:Code:main: sound PortA.1, [127, 255] goto main
But that also made a clicking noise, no tone. Shouldn't this work?Code:main: high PortA.1 pauseus 30 low PortA.1 pauseus 30 goto main




Bookmarks