It's Friday afternoon and as everything in the project I'm supposed to be working on is working perfectly, here's another bit of 'fun' code :-
It takes an audio input (speech quality only) and encodes it onto an FM carrier signal, so basically it's a voltage controlled oscillator (VCO). This signal is in turn PWM encoded (31KHz) by timer0 so that a simple RC filter on the output pin gives you a cheap 8 bit DAC. You will have to play about with carrier frequencies/filtering/anti-aliasing/signal levels etc to get a decent signal through it.
If you mask out the FM parts of the code and enable the AM bits, then it will AM modulate a carrier frequency, so the AVR is acting as an OSC with voltage controlled gain.
I'm using the ATtiny24V - it's a cheap way of getting a bit of signal processing. What's the use, erm, got me there ? It could be a way of transmitting a telephone quality audio link on an IR diode ? Or a demostration of the principle to a student ? The main thing it demostrates is that you shouldn't leave designers alone with a lab full of equipment ?