| ??? 05/07/03 20:44 Read: times |
#45042 - OK some suggestions on this Responding to: ???'s previous message |
Guys,,
i understand i will try to work hard on what you people say....iam trying to learn to use MT8816 through controller... off-hook detection is connected at P2.0 Address Lines of MT8816 P1.0 AY0 P1.1 AY1 P1.2 AY2 P1.3 AX0 P1.4 AX1 P1.5 AX2 P1.6 AX3 P1.7 DATA P3.5 STROBE CS pin is permittly High X2 Is connected with the Telephone via SLIC. now where ever the telephone goes off hook simply X2 gets connected with Y0 using the datasheet of MT8816 i have written the following code please suggest is it rite as i have worked out this with my hardware but its not working..if some one can just tell me that its rite then i may be sure that the software has no error... ; CHECKING ONE TELEPHONE LINE WITH MT8816 AND AT89C52 ; P2.0 FOR DETECTING OFF HOOK (1) AND ON HOOK (0) ; SLIC TO X2 PIN31 OF MT8816 ; ADDRESS LINE + DATA PIN OF MT8816 WITH P1 ; DIAL TONE IS ON Y0 PIN 31 OF MT8816 ORG 00H MOV P3,#00000000B ;STROBE IS CLEARED MOV P2,#00000000B ;RESETING THE PIN MOV P1,#00000000B ;RESETING THE PIN AJMP MAIN LOOP: MOV R6,#0FFH WAIT: DJNZ R6,WAIT RET MAIN: OFF: JNB P2.0,OFF ;WAITING FOR OFF-HOOK MOV P1,#10010000B ;ADDRESS LINE TO CONNECT Y0 WITH X2 SETB P3.5 ;STROBE IS SET HIGH CALL LOOP ;Delay for strobe CLR P3.5 ;STROBE GOES LOW DO: SJMP DO END |



