> > Also, for output you could tie one leg of the speaker to a port pin, and > > the other to a port pin via a cap. If both port pins switch simultaneously > > in opposite directions you could get +/- 6 volts on the speaker which should > > give it a louder drive than merely using a single port pin. > But why do I have to tie one leg of the speaker to a PIC pin _via a cap_? > It _is_ the advantage of a bridge speaker driver not to need any cap! True it's nice to avoid a cap, but you'll almost certainly need either a cap or a resistor to limit current, and if you use a cap it will allow a higher peak current initially, and store current fed to it during one cycle for out- put in the next. Thus, assuming an initial steady state with the cap's port pin high and the other one low, we have [all voltages relative to ground]: PIN CAP CAP [SPKR] PIN 3.0 3.0 0.0 0.0 If we switch the high/low on the port pins we then have 0.0 0.0 -3.0 3.0 [six volts one polarity on the speaker--twice Vdd] After a little while, the cap will equilibrate to 0.0 0.0 3.0 3.0 which after another click becomes 3.0 0.0 6.0 0.0 [six volts other polarity on the speaker--twice Vdd] So the effect of the cap is to double your peak voltage, though at the expense of horrendously distorting your frequency response (not an issue for a metronome producing "clicks")