Continue to Site

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.

  • 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.

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

Status
Not open for further replies.

rezurrekta

New Member
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!
 
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
 
Dont you mean 1mS ?

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

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

True!

JimB
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top