Em 26/4/2010 20:04, ivp escreveu: >> do you think it would draw to much current to drive an old speaker ? > > Ohm's Law again I'm afraid ;-) > > If it's an 8 ohm speaker, that's pretty much shorting the output > > V =3D I * R > 5 =3D I * 8 > I =3D 0.625A (625mA) > > Any port pin can supply only 25mA, the whole port perhaps 100mA > but that's really pushing the specs. Work backwards to find the minimum > speaker resistance which will (possibly) not munt the pin > > R =3D V / I > R =3D 5 / 0.025 > R =3D 200 ohms (that is the DC resistance, not Z, the impedance) > > If you want to use a speaker you should use a transistor as a current > amplifier or an audio amp IC. A piezo element will be OK as a sound > producer too (see attached). They have been discussed here often > > Google for > > microcontroller speaker > microcontroller piezo > Don't forget that for a magnetic speaker you will need to supply a symmetric wave (in the sense that current must flow in both directions). You could connect the speaker between two PIC pins (BTL - bridge tied load) and drive them complementarly (when on is low the other is high and vice-versa), or connect the speaker between a pin and a capacitor to ground. Regards, Isaac __________________________________________________ Fale com seus amigos de gra=E7a com o novo Yahoo! Messenger = http://br.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist