Hi Dave
 
Here are some software routines I wrote for making A piezo do anything from sound like a siren
to the ringing sound of a telephone.It was intended for a presettable siren driver .
Written for a Pic16c84 but moved over to the 12c509 pic It can be copied and used on any pic
as long as the few general purpose registers used are defined as usual.
 
port_a bit RA0 is the pin connected to the piezo or transistor that drives it
 
port_b bits RB0 RB1 RB2 RB3 are connected to a 4 way dip switch with pullup resistors
to select 14 different sounds ,Note the code only reads the dipswitch on powerup so if you
change the dipswitch you nead to repowerup...
 
HAVE FUN !!!!
 
Regards Mark E'Silva
 
saver@pta.lia.net
http://www.pta.lia.net/saver
 
Content-Type: application/octet-stream; name="SIREN.ASM" Content-Disposition: attachment; filename="SIREN.ASM" Attachment converted: wonderland:SIREN.ASM (????/----) (0002A31F) Content-Type: application/octet-stream; name="SIREN.HEX" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="SIREN.HEX" Attachment converted: wonderland:SIREN.HEX (????/----) (0002A320)