niranjan23
Member level 5
I want to interface 8870 dtmf ic with 8051
what is the program for ....this when we press 1, 2... like this
thankyou
what is the program for ....this when we press 1, 2... like this
thankyou
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I want to interface 8870 dtmf ic with 8051
what is the program for ....this when we press 1, 2... like this
thankyou
INCLUDE reg_52.pdf
STD EQU P3.0 ;DTMF OUTPUT
Q3 EQU P3.1
Q2 EQU P3.2
Q1 EQU P3.3
Q0 EQU P3.4
RING EQU P3.5
DIS_A EQU P0.0
DIS_B EQU P0.1
DIS_C EQU P0.2
DIS_D EQU P0.3
DIS_E EQU P0.4
DIS_F EQU P0.5
DIS_G EQU P0.6
DSEG ; This is internal data memory
ORG 20H ; Bit adressable memory
DTMF: DS 1
D0 BIT DTMF.0
D1 BIT DTMF.1
D2 BIT DTMF.2
D3 BIT DTMF.3
CSEG ; Code begins here
;---------==========----------==========---------=========---------
; PROCESSOR INTERRUPT AND RESET VECTORS
;---------==========----------==========---------=========---------
ORG 00H ; Reset
MOV SP,#60H
MOV R2,#15H
CALL DISP ;Display - symbol on display
SETB STD ;Make STD pin as input
TOP: JNB STD,$ ;wait for new data
CALL READ ;Read Data
MOV R2,DTMF
CALL DISP ;Display Dialled Data
JB STD,$ ;Wait until the key is released
AJMP TOP ;Repeat the function
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; READ DTMF TONES
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
READ:
MOV DTMF,#00H
SETB Q0
SETB Q1
SETB Q2
SETB Q3
JNB Q0,VB1
SETB D0
VB1: JNB Q1,VB2
SETB D1
VB2: JNB Q2,VB3
SETB D2
VB3: JNB Q3,VB4
SETB D3
VB4: RET
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
; 7 SEGMENT DISPLAY ROUTINE
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
DISP:
CJNE R2,#00H,AAS1
CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_E
CLR DIS_F
SETB DIS_G
RET
AAS1: CJNE R2,#01H,AS2
CLR DIS_B
CLR DIS_C
SETB DIS_A
SETB DIS_D
SETB DIS_E
SETB DIS_F
SETB DIS_G
RET
AS2: CJNE R2,#02H,AS3
CLR DIS_A
CLR DIS_B
CLR DIS_D
CLR DIS_E
CLR DIS_G
SETB DIS_C
SETB DIS_F
RET
AS3: CJNE R2,#03H,AS4
CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_G
SETB DIS_E
SETB DIS_F
RET
AS4: CJNE R2,#04H,AS5
CLR DIS_B
CLR DIS_C
CLR DIS_F
CLR DIS_G
SETB DIS_A
SETB DIS_D
SETB DIS_E
RET
AS5: CJNE R2,#05H,AS6
CLR DIS_A
CLR DIS_C
CLR DIS_D
CLR DIS_F
CLR DIS_G
SETB DIS_B
SETB DIS_E
RET
AS6: CJNE R2,#06H,AS7
CLR DIS_A
CLR DIS_C
CLR DIS_D
CLR DIS_E
CLR DIS_F
CLR DIS_G
SETB DIS_B
RET
AS7: CJNE R2,#07H,AS8
CLR DIS_A
CLR DIS_B
CLR DIS_C
SETB DIS_D
SETB DIS_E
SETB DIS_F
SETB DIS_G
RET
AS8: CJNE R2,#08H,AS9
CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_E
CLR DIS_F
CLR DIS_G
RET
AS9: CJNE R2,#09H,AS10
CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_F
CLR DIS_G
SETB DIS_E
RET
AS10: CJNE R2,#15H,AS11 ;symbol for -
SETB DIS_A
SETB DIS_B
SETB DIS_C
SETB DIS_D
SETB DIS_E
SETB DIS_F
CLR DIS_G
RET
AS11:
CJNE R2,#16H,AS12 ;switch off all disp
SETB DIS_A
SETB DIS_B
SETB DIS_C
SETB DIS_D
SETB DIS_E
SETB DIS_F
SETB DIS_G
RET
AS12:
RET
;**********************************************************
END