I'm wanting to generate DTMF tone dialling (to dial a phone number) using an AVR micro with the timer in PWM mode. There's a description of how it supposedly works hereand some source code here
From looking at the code in the example, the CPU runs at 8 MHz and timer 1 interrupts every 510 cycles (256 + 254) i.e. a counter counts from zero up to 255 and back to zero and an interrupt occurs every time the counter reaches zero. The output that generates the waveform changes when the counter matches an output compare register. The value in the output compare register changes on each interrupt, to generate a varying duty cycle. At 8 MHz and with a prescalar of one, an interrupt occurs every 64 microseconds or so.
What I'm not sure I understand is what the idea of PWM mode with the AVR timer is. In non PWM mode, using output compare, you can also generate high/low pulses - the only problem is that for the short pulses, you have to be able to re-interrupt very quickly - too quickly - so PWM mode handles these short pulses. Is that right?
Wikipedia has a picture of the waveform for the dial-tone of a "1" hereDoes anyone have any experience of using the AVR micro to generate dial tones and does it work?