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

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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…