>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >On Behalf Of John Chung >Sent: 02 April 2007 05:31 >To: Microcontroller discussion list - Public. >Subject: [EE] Buzzer puzzle. > > I checked the current >consumption during Q and it was draining about 32mA. > >Why do I need a resistor in >series? The PICs I/O pins have an absolute maximum rating of 25mA! Also if this is a magnetic device then you will probably be getting some nasty current spikes when you switch it off which could cause problems with the PIC. The resistor is limiting both the DC current and any transient currents when you set the port pin low. If you want to use this device purely as a buzzer then I suggest that you put a resistor in to limit peak current and also AC couple it (i.e. put a capacitor in series) to prevent excessive current being drawn if the PIC's ouput remains high. Connecting a diode accross the buzzer (cathode to PIC pin, anode to ground) will help suppress any spikes. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist