1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

[HELP] Anyone know how to make sound/noise?

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by rezurrekta, Apr 23, 2005.

  1. rezurrekta

    rezurrekta New Member

    Joined:
    Apr 14, 2005
    Messages:
    7
    Likes:
    0
    I have a PIC16F877, and need to know a program on how to make a beeping nose when a certain parameter is met.

    The code can be in assembly or C.

    Thanx!
     
  2. theimperia

    theimperia New Member

    Joined:
    Feb 20, 2005
    Messages:
    39
    Likes:
    0
    You can just connect one of the output pins to a beeper and send 1kHz (or more) bursts. To do that, just set that output pin high, wait 1 uS, then set it low, wait another 1uS. Do this for some time (1 second), and you'll have a 1-second high-pitched noise.

    If you don't know how to write delays in PICs, then post here again. Include the operation frequency of your PIC and a free pin (that can be used as output).

    TI|CP
     
  3. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,392
    Likes:
    593
    Location:
    Peterhead, Scotland
    ONLINE
    Dont you mean 1mS ?

    1uS would give 1Mhz. A bit high to be audible.

    JimB
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA

    i think he meant 500uS :lol: 1mS between toggles would only give you 500Hz (2 mS per cycle)
     
  6. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,392
    Likes:
    593
    Location:
    Peterhead, Scotland
    ONLINE
    True!

    JimB
     

Share This Page