I would like to know firstly if its possible to create a sound on a chip
(not record a sound onto a chip)
I have tried to record a sound onto a chip and play back through amplifiers and can never get a clean sound because the sound is being amplified so much.
Its not possible to clean the sound any further with the limited resources i have, so i figured it may be possible to re-create the sound on the chip itself.:idea:
I presume your "chip" is a microcontroller or microprocessor.
Yes, you can program your microcontroller to generate audible tones using several methods.
One simple way is to send 50% duty-cycled pulses from I/O port pin down a low pass filter to get a sinusoidal signal or wave. This in turn is sent to a 8Ω speaker to play the tone. To change the tone, simply lengthen or shorten the period of the pulse signal you are sending.
for the lasting period you can use internal timer of PIC like TMR0. if your pic has got it. else you have to implement a timing routine. for example incrementing one or more variables (counter) every tot number cycles. in this case you have to try to guess period time or measure it and then calculate how many cycles for 1,5 seconds.