Professional Documents
Culture Documents
DTMF V1.3
DTMF V1.3
Chapter 17
DTMF generation and detection
Dual Tone Multiple Frequency
Copyrig
Learning Objectives
A key stroke on
« 9 » will generate
2 added tones, one at
852Hz low frequency
and one at 1477Hz
m N -1 j2km
-
X( k)
m 0
x(m).e N
Tests:
Magnitude
Harmonic
Total Energy
Output Digit
fk
k N
fs
Where: fk = frequency of the tone.
fs = sampling frequency.
N is set to 205.
LD *AR2,16,A ;A=w(N-1)
MPYA *AR2- ;T=w(N-1) B=w(N-1)^2
MPY *AR2,A ;A=w(N)*w(N-1)
LD *AR3,T ;T=alphap
MPYA A ;A=alphap*w(N)*w(N-1)
SUB A,1,B ; substract with a left shift to ;obtain 2alphap
; B=w(N-1)^2-2alphap*w(N)*w(N-1)
LD *AR2,T ;T=w(N)
MAC *AR2,B ;B=w(N-1)^2-2alphap*w(N)*w(N-1)+w(N)^2
STH *AR4 ;save to Y
PORTW *AR4,101h ;copy output level