现在用AT89C51 跟MT8880做电话自动拨号,可拨不出去,我并上一个电话能听到拨号音,但交换机无法识别,拨不出去!!
电路图在底下,请问该怎么改????
程序如下:speak equ p2.3 ;叫声 clr speak 时叫 tel equ p2.6 ;摘挂机控制 red equ p2.0 cs equ p1.2 ;片选 gree equ p2.1 have equ p1.1 ;拨号触发 yellow equ p2.2 org 0000h ajmp star org 0030h ;********初始化 star: clr have clr tel ;*********** main: ;jnb p1.0,putup jb have,putup ;P1.1高电平拨号 setb speak;关声音 setb yellow setb red sjmp main ;************* putup: clr speak setb tel ;摘机 acall delay2;停3秒 acall reset mov a,#20h ;拨号码2 mov p0,a acall delay ;停100ms后 acall delay ; mov a,#0a0h ;拨号码0 mov p0,a acall delay ;停100ms后 acall delay ; mov a,#10h ;拨号码1 mov p0,a acall delay ;停100ms后 acall delay ; acall delay2 acall delay2 acall delay2 acall delay2 acall delay2 clr tel ;挂机 ljmp main ;*********************************8 ;*********88 reset: ;**********初始化MT8880 mov a,#0d8h mov p0,a ;写入控制寄存器CRA 1001 (并设下个周期写CRB) acall delay ;必须停 mov a,#08h ;写CRB 0000 mov p0,a acall delay ret ;********88888
;**************delay: delay: loop3:mov r1,#150 loop:mov r2,#153 loop2:djnz r2,loop2 djnz r1,loop ret ;停4秒 delay2: acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay acall delay ret end 相关链接:https://bbs.21ic.com/upfiles/img/20095/2009527203231138.pdf |