Pgina 1 de 2
8051 INTERFACING
Online FREE !
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
Condition: Make P1.0 high if Key 1 is pressed otherwise terminate session directly.
ASSEMBLY LANGUAGE
http://www.freewebs.com/maheshwankhede/dtmfdecoder.html 10/02/2010
8051 microcontroller hardware interfacing tutorials -interfacing to DTMF decoder 8870. Pgina 2 de 2
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
http://www.freewebs.com/maheshwankhede/dtmfdecoder.html 10/02/2010