Hi . I try to use a mt8888 for detecting tone from telephony line . unfortunatly i have had a lettel success since now. i think my problem is in initializing or the timing of the mt8888 . because sometimes it works , but most of time it does not work. i use microcontroller "dsPIC33FJ256GP710" in my circut. please help me about this problem . i initialize chip mt8888 as mentioned in its datasheet.
i use mikroC for compiling my program.
the section of my code for initializing the mt8888 is
CS=0 ;
RS0=1 ; WR=1 ; RD=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=1 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=1 ; RD=0 ;
CS=1;
After initilizing , by detecting dial tone , IRQ pin should go low , then by reading status register this pin should go back to high . i can not reach this stage. is it possible that initializing is not complete?as pin 24 of my mt8888 goes high by detecting dial tone it seems i should have IRQ interrpu but it does not happen.
it is appretiated that help me.
i use mikroC for compiling my program.
the section of my code for initializing the mt8888 is
CS=0 ;
RS0=1 ; WR=1 ; RD=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=1 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=0 ; RD=1 ; B3=0 ; B2=0 ; B1=0 ; B0=0 ;
RS0=1 ; WR=1 ; RD=0 ;
CS=1;
After initilizing , by detecting dial tone , IRQ pin should go low , then by reading status register this pin should go back to high . i can not reach this stage. is it possible that initializing is not complete?as pin 24 of my mt8888 goes high by detecting dial tone it seems i should have IRQ interrpu but it does not happen.
it is appretiated that help me.