Cricket Sound Effect


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default 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>

  2. #2
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    I think your speaker is safe, the capacitor value shouldn't be too critical in this case.
    Good Luck!

    Jerry.
    If your oscilloscope costs more than your car...

  3. #3


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by ScaleRobotics; - 19th January 2012 at 15:32.

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  2. new to PIC programming could really do with some help
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2008, 14:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. Sound and sound control with minimal parts
    By bartman in forum General
    Replies: 23
    Last Post: - 18th January 2005, 14:08
  5. Re: quick fix for sound command?
    By Melanie in forum Code Examples
    Replies: 0
    Last Post: - 9th July 2004, 01:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts