Ok, I just ripped apart the 'buzzer' and it is not a piezio element at all-- it is electromechanical. (Two wires to the box, inside the box is a small signal transistor, a couple diodes, a fat coil, and a spring.) No wonder it wasn't working well. I guess I'll pick up a real piezio buzzer and hope it works better. As I want the thing for debugging, it would be very nice to be able to hear 50ms-100ms blips, like someone suggested. (I do not want to use interrupts to drive a debug device, especially since TMR0 is already used.) So I'm not much into the idea of having the target generate a carrier and modulation. (That's a job for a 12c508.. anyone want to build a quick & dirty audible logic probe?) 1-2Hz modulation seems a little slow, especially for debugging a state machine with 8-16 states! That's a lot of time to sit there counting buzzes. It beats an LED for debugging! > > So I stuck a piezio buzzer on PORTA. It works as a good in-circuit > > debug, but it is rather high overhead (ie: set the port pin, delay for > > 400ms, clear the port pin, delay for 400ms, repeat for more buzzes). > > It certainly does sound as if he is using a piezo "sounder" with an > internal self-excited oscillator, by which I mean it is a three-terminal > disc providing feedback to a (single) transistor. > > > The buzzer seems to have some odd characteristics also (I don't know > > much about piezo buzzers-- startup time seems a little long, etc). > > This characteristic is *typical* of self-excited oscillators with a > very high "Q" of the disc. OTOH, they are *very* efficient (noisy). > The "magnetic" type of buzzer (coil; magnet fixed to reed; plastic > diaphragm) using the same principle is also very slow to excite, maybe > just a little faster if you feed it plenty of power (and they consume > *much* more current). > > For these reasons, these devices are quite poor for Morse code. A > separate electronic oscillator, particularly of the "R-C" or > "relaxation" type rather than the various "tuned curcuit" (State > Variable, Wien, Twin-T) can be started much quicker, or a continuously- > running oscilaltor can be gated to your transducer. > > But this isn't what was wanted. Point is, you get the PIC to generate > both the "carrier", say 2kHz and gate it with the "modulation", say > 1.25 Hz as suggested, and feed that to the transducer. Unless you are > very lucky (or tune the latter!), it won't match the piezo disc > resonance, but it certainly will go on and off smartly. > > As such, it (or at least the continuous-wave 2kHz version) is a far > better diagnostic than a LED because the ear is *far* better at picking > interruptions and characterising brief transients than the eye. > > On another list I mentioned the virtues of an old-fashioned "crystal" > earpiece as diagnostic tool. I'll try and bring that up on my webpages > sometime! > > Cheers, > Paul B. >