May
2006, Issue 190
ARM-Based
Modern Answering Machine
Philips
ARM Design Contest 2005 First Prize
TONE
DETECTION
Tone
detection enables the system to detect when a caller
hangs up. After a while, the phone company sends a dial
tone, which in the U.S. is the combination of frequencies
350 and 440 Hz. In some countries, a cadenced busy tone
is sent that would require a slightly different implementation
with cadence detection.
The
DTMF detection works well. Because the buffering system
was already in place, I used the same algorithm for
tone detection. I increased the detection time to about
1 s (40 buffers of 205 samples). The detection process
has to run concurrently with the wave recording. Because
only two frequencies have to be detected, the processing
is four times lighter than what’s required for DTMF.
Speech can easily trigger one of the two filters. It
could trigger both filters, but because the detection
has to happen without a single miss for 1 s, this event
is unlikely.
While
recording a wav file, at the end of the interrupt routine
that outputs the samples, an ugly goto instruction sends
the program flow to the DTMF processing where the samples
are gathered in packets of 205. The buffers are then
sent to the tone detector by the background processing.