Page 1 of 1

Coconut song on PIC12F1822

PostPosted: Wed Nov 23, 2016 2:08 pm
by pcb_nl
My family uses this melody from "I've Got a Lovely Bunch of Coconuts" by Fred Heatherton. We write a new text and sing at family meetings, such as weddings.
To support the singing and tempo I made a music box with a PIC12F1822 to generate the notes and tempo with PWM.
The output from pin RA5 is tied to a piezo or in my case to a transistor feeding a small speaker.
It sounds a bit crappy but it worked great.

Feel free to post suggestions, improvements, or bugs.

main.c
(7.34 KiB) Downloaded 579 times


p.s. Is there a "Project Show Case" on microchip forum?