Digital Horn/Bell (PIC16F84A)

Free for educational and noncommercial use ! ! !
For commercial use you must contact the author ! ! !

DESCRIPTION: This is digital horn which I made for my motorcycle, it makes sound "meep meep" like road runner... :D You can also use this device as a door bell and you can program any sound you like.

Download Digital Horn schematic

HOW IT WORKS: There is a sample of "meep meep" stored in eprom M27C256, less than 4 KB size, 8 bit, 8000 bit rate, mono. So when you press horn switch, PIC16F84A counts up and is increasing address of eprom from 0x0000 to 0x0FFF, and D/A convertor is reproducing sound to output. D/A convertor is as simple as it can be... all you have to do is to trim resistors to proper value because quality of sound depends on that. You can play with this a bit and use other PIC with more I/O ports and you can reproduce bigger samples... I am using all 13 I/O ports of PIC16F84A, 12 for eprom address (12 bit 4096) and 1 port fot input switch. You have to connect output to audio amplifier and speaker.

SOFTWARE for PIC16F84A: Program code is written using MikroC. Code is so small and simple. When it detects state 0 on port A4 it begins a loop and counts from 0 to 3800 (end of samples), and resets to address 0 till next press of the switch.

Download hex file & Source(MikroC) for PIC

You'll need Eprom and PIC programmer to build this project.

AN589 PIC programmer             AllPIC programmer              Willem programmer

Links to some usefull web sites.
PICPgm                                  MikroC
Tip the dance girl.   ;)