DTMF dialing MT8880 interface with PIC16F877A coding problem

General discussion on mikroC.
Post Reply
Author
Message
lazyhut
Posts: 7
Joined: 13 Feb 2011 03:21

DTMF dialing MT8880 interface with PIC16F877A coding problem

#1 Post by lazyhut » 26 Feb 2011 05:16

Hi, I'm currently doing a project using PIC16f877a interfacing with MT8880CE to produce a DTMF signal and make a dial out through telephone line. I've tried so many times but it still doesnt generate any DTMF tone. Is it because of my coding? I did follow the datasheet of MT8880 but it still doesnt work. Please HELP!!!

Circuit connection from PIC to MT8880:
RB0 = D0
RB1 = D1
RB2 = D2
RB3 = D3
RB4 = Read/Write
RB5 = RS0
RB6 = CS

Here's my coding in C language:

Code: Select all


void main() {
TRISB = 0;

while(1){
portb = 0x2d;         //Write to Control Register A
    delay_ms(250);

portb = 0x20;         //Write to Control Register B(burst mode)
    delay_ms(250);

portb = 0x0a ;         //Write to Transmit Data Register(digit 0)
    delay_ms(250);

portb = 0x30 ;         //Read the Status Register
    delay_ms(250);

portb = 0x01 ;         //Write to Transmit Data Register(digit 1)
    delay_ms(250);

portb = 0x30 ;         //Read the Status Register
    delay_ms(250);

portb = 0x06 ;         //Write to Transmit Data Register(digit 6)
    delay_ms(250);

         }

}

Post Reply

Return to “mikroC General”