-
Cricket Sound Effect
Good day Picers
I am trying to make a cricket sound effect using the PBP Sound command.
When using a larger Capacitor (100uF) I get higher notes, will this damage my speaker if I use a 100uF instead of a 10uF?
Thank you
koossa
<bgsound src="http://www.darreltaylor.com/files/cricket.wav" LOOP=5>
-
I think your speaker is safe, the capacitor value shouldn't be too critical in this case.
Good Luck!
Jerry.
-
Here is the code using a 100uF capacitor.
Code:
Include "Modedefs.bas"
DEFINE OSC 4 ' Set the Xtal frequency
CCP1CON = 0
SPEAKERPIN VAR PORTD.2
i var byte
Main:
for i = 0 to 8
SOUND SPEAKERPIN, [125, 1]
pause 7
next i
pause 150
for i = 0 to 8
SOUND SPEAKERPIN, [125, 1]
pause 7
next i
END