Searching \ for 'problem with pic outputs' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=output
Search entire site for: 'problem with pic outputs'.

Truncated match.
PICList Thread
'problem with pic outputs'
1997\08\10@161613 by Andre Abelian

picon face
HI PIC  Engineers.

I am using pic16c62 portb as output
I am driving LEDS and one buzzer.
Buzzer gets distorted signal.
I checked with digital scope I get this





-----------------|-|---------------
                | |
                | |
                | |
                | |
                |_|


I use  BSF    portb,RB3        ; sound when is high


My question is when you set any bit high shouldn't I get
clean 5 v signal or to have little distortion is normal.

How do you use buzzers with pics.


                               thank you

Andre

1997\08\10@172227 by Kalle Pihlajasaari

flavicon
face
Hii Andre,

> I am using pic16c62 portb as output
> I am driving LEDS and one buzzer.
> Buzzer gets distorted signal.
> I checked with digital scope I get this
>
> -----------------|-|---------------
>                  | |
>                  |_|
>
>  I use  BSF    portb,RB3        ; sound when is high
>
> My question is when you set any bit high shouldn't I get
> clean 5 v signal or to have little distortion is normal.
>
> How do you use buzzers with pics.

I always use a transistor to turn on buzzers.  Electromechanical
ones are not well suited to logic drive as they cause a lot of
inductive noise on the supply pin.  Some of the Piezo devices
do work ok with just 5V but still safer to use a Transistor
and a freewheeling diode for any thing with large inductance
or capacitance (Piezo).

Not 100% sure if you have a drive problem or a resonance problem.
Many buzzers will only work well close to their resonant
frequency, they sound horrible at other frequencies.

Cheers
--
Kalle Pihlajasaari   spam_OUTkalleTakeThisOuTspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

DonTronics, Silicon Studio and Wirz Electronics uP Product Dealer

1997\08\10@210132 by Jeff King

flavicon
face
At 01:11 AM 8/11/97 -0700, Andre Abelian wrote:
{Quote hidden}

Make sure you aren't exceeding the capacitance loading for the
particular part you are using. If its a piezo buzzer it likely
has a high capacitance across it. I've run into this and found was
able to get a higher sound level by putting a resistor in series
with the buzzer. I think I used 150 ohm. The buzzer I used required
me to clock out a 2khz signal.


Regards,

------------------------------------
| Jeff King      Aero Data Systems |
| .....jeffKILLspamspam@spam@mich.com  P.O. Box 510895   |
| (810)471-1787  Livonia, MI 48151 |
|F(810)471-0279  United States     |
------------------------------------

1997\08\10@223458 by Mike Keitz

picon face
On Sun, 10 Aug 1997 20:57:14 -0400 Jeff King <jeffspamKILLspamMICH.COM> writes:
{Quote hidden}

I assume it is a piezo buzzer with built-in oscillator.  These should
work fine directly from a port pin, as long as it uses less than 20 mA.
Electromechanical buzzers of the type with contact points are a definite
no-no since they will send nasty surges back into the PIC.  Bare piezo
elements need you to clock out a signal of the proper frequency.

Possible sources of your trouble:
(a) There is a bug in the software, setting the port pin low or
configuring it for input when it isn't supposed to.  This will naturally
turn the buzzer off.

(b) The buzzer is overloading the port pin.  Check that the voltage is
close to 5V when the buzzer should be on.  If not, other read-modify
write instructions to the port will turn it off even though they're not
supposed to.  If the buzzer contains a capacitor in series with its power
supply it can create a transient overload that would cause a following
bsf or bcf to malfunction.  My advice is not to use bsf/bcf [port pin],
xorwf [port],f etc. on ports that have any of their pins driving heavy
loads.

(c) The WDT is resetting the whole chip periodically.  This will make the
ports go to inputs and turn the buzzer off until the tris registers are
set up again.  Of course it will cause a lot of other problems as well,
which you may not be noticing because you're only trying to test the
buzzer now.  Make sure WDT Off is selected in your programmer unless you
have clrwdt instructions in the proper place in the program.  This is
about #2 on the list of PIC newbie mistakes.

1997\08\12@050948 by Steve Smith

picon face
Are you letting the WDT time out in your program causing it to reset your
program and reinitalise ? if so turn it off or clear it regularally this mabe
the fault

Cheers Steve

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...