Jonathan wrote: > 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.