Er - Put a resistor (10k?) between the PIC & the transistor. Without it the PIC only "sees" the b-e junction & the output current may cook the PIC! Darlingtons (with a resistor) or logic level FETs are generally a better choice if the current is likely to be high. You can "speed up" the switching with an approx. 4n7 cap in parallel with the base resistor if required. Probably only useful where you need fast switching - e.g. PWM control. Richard P > -----Original Message----- > From: Gennette Bruce [mailto:bruce.gennette@TAFE.NSW.EDU.AU] > Sent: Wednesday, December 08, 1999 7:49 PM > Subject: Re: Making Sound! > > > Uhm, PIC I/O pins can connect directly into the base of a > small transistor > (like a BC547). > > So if you connect the speaker between +5V and the transistor > collector and > run the transistor emmitter to 0V you will amplify the PIC > output by about > 75X. Not bad for a 10 cent investment. (You may even need to put a > resistor in series with the speaker or reduce the size of the > storage cap or > both to quiet it down). > > +5V > | > | 22uF > \---------|| |------------0V > | > | > /--------------\ > | speaker | > \------------- / > | > | c > | / > | / > b | / > PIC B3o----------| \ > | \ > | _\| e > | > | > \----------------------------0V > > > -----Original Message----- > > From: Mike M [SMTP:elektrikman@DYNAMITEMAIL.COM] > > Sent: Wednesday, 8 December 1999 15:01 > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Making Sound! > > > > Hey i been trying to create sound with a Pic and a speaker. > Just using > > simple statements like > > > > BSF PORTB, 3 > > ;;;delay 1ms > > call delay > > BCF PORTB, 3 > > > > well it works, but really really low sound. I expected > that. The speaker > > is 8ohm, one lead to ground, and the other lead to a 22uf > cap wit the pos > > side to the PIC pin 3. Now i got the basic idea from Dontronics pic > > source book. Wich is almost taken right out of the BASIC > STAMP 1 manual > > except for the actual code :). I would assume this setup > on a stamp > > would also produce very low sound without some sort of > amplifier or am i > > wrong? if so, why? > > > > Mike >