PDA

View Full Version : SOUND problem



chip15
- 17th February 2006, 19:46
Hi,
I have tried it has to connect a BUZZER and after an Speaker to the Pic, the sound is low and then it is not stable.
If then I connect a condenser from 10 uF as from the manual of the Picbasic Pro doesn't work anymore!!



pin------------+ C ---------- BUZZER----------gnd or

pin------------+ C ---------- speaker 4 ohms----------gnd



HOW TO?

16f84a
LOOP:
PAUSE 1000
SOUND PORTB.0,[100,50,80,30]
GOTO LOOP

THX
CHIP

sougata
- 18th February 2006, 04:46
Hi,

You can directly connect a buzzer to a PIC I/O. However it is a good practice to have some sort of current limiting resistor in the line (say around 200 ohms). This prevents the PIC getting fried in case of accidental short-circuits in the output.

Buzzers generally work best in the mid-high freq. range. In the higher and lower frequency the outputs will vary. Also do not expect a very high volume with a 0-5v output toggle.

I did not understand what you mean by "not stable"

Regards

Sougata

chip15
- 18th February 2006, 08:02
Hi,
the frequency is not stable.



it would owe emetter a sound of height 100 and duration 50mS. In reality, if I program here the code under,
a sound first lower part sends forth me and then one tall.
Practically 2 sounds of which one don't have anything to do with it nothing.


LOOP:
Breaks 1000
SOUND PORTB.0,[100,50]
GOTH LOOP


best regards and THX

chip