|

DTMF Decoder IC like CM8870 is easily available in market so I have used it
,but no problem if you get any other like KT3170 only pin name will be
different. (Refer to datasheet for standard circuit)
The decoder uses digital
counting techniques to detect and decode all 16 DTMF tone pairs into a
4-bit code.
--------------
l l- d3
l DTMF l- d2
signal in -l Decoder l- d1 4-bit binary out
l chip l- d0
l l- strobe
--------------
CIRCUIT DESCRIPTION
After detecting presence of a
valid DTMF signal StD goes high for Short duration (Refer Data sheet) and
outputs Q1-Q4 gets latched according to received tone-pair (Refer
above table)
ALGORITHM
-
Poll for Ring Detection.
-
Activate of relay to place 220
Ohm (1/2 watt.) resistor in line so as to lift phone .(The 220-ohm loop on
telephone line disconnects the ringer from the telephone line in the exchange.)
-
Poll for StD and when it goes high Read
port 0 to find out received tone-pair from Q1-Q4.
-
Take control action according to
received tone & Poll for the strobe again if you wish and deactivate
relay when you finish.
The circuit below is my project
circuit named Tele Remote.

CODE EXAMPLE - FOR ABOVE
CIRCUIT
Condition: Make P1.0 high if Key 1 is
pressed otherwise terminate session directly.
|
|
|
|
|
mov p0
,#0ffh ; To configure P0 for
input
setb
p2.6
; To configure P2.6 (RING DETECT) for input.
AGAIN
jnb p2.6 ,
AGAIN ; Poll for ring detect signal
setb
2.7 ;
Activate relay to lift receiver
setb p0.3
POLL
jnb p0.3
POLL ;Poll for high
strobe
mov
a,p0
;Read P0
anl
a,#0f0h
;To get code (Q1-Q4 ) for Received
tone- pair in ACC.
xrl a,#01h
jnz TERMINATE ;If
0 is not received TERMINATE Session
setb
p1.0
;make P1.0 High if 1 is received
TERMINATE
clr
2.7
;Deactivate relay
|
|
|