DTMF and PIC 16F628A


+ Reply to Thread
Results 1 to 10 of 10
  1. #1

    Question DTMF and PIC 16F628A

    Hi
    I'm really new with DTMF staff and I have been trying to dial a number throught the telephone line, I had tried differents circuits but not one has work succesfully, with the one attached sometimes I have a response from the central but not able to complete the call never.... I'm using PBP with a 16F628A PIC @ 4MHz. any help what am I doing wrong??? Somebody has completed successfully this project with those components???. Is the pic able to give a clear DTMF tone or I have to implement something else besides what the PBP manual shows??
    Attached Images Attached Images  

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    347

    Smile

    Hello ultramegaok,

    Start by going to http://www.epanorama.net/circuits/te....html#audioint. This will be your wealth of knowledge on telephone line interfaces. I can guarantee that your circuit will NOT work. You have to be extremely careful on what you put on the telephone network. I only glanced through this site but I saw a very basic interface circuit that you should be able to construct without too much difficultly.

    You can find several PBP telephone line programs at www.melabs.com. Look under sample programs and you will find a program that lets your PIC dial in pulse and DTMF.

    I am going away for a few days so I'll check back in Tuesday night. Start reading and have some fun!!

    HTH,

    BobK

  3. #3

    Default

    tried this circuit which didn't work too...
    Attached Images Attached Images  

  4. #4
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    347

    Smile

    Hello, ultramegaok

    You will not be able to send any thing out to the phone line through a bridge rectifier!
    The only thing the bridge rectifier is good for, on a phone line, is drawing power FROM the phone line to power some circuitry. You need to use a 600:600 isolation transformer. Go to www.microchip.com and lookup application note AN854. There in Figure 1 is an example of what it takes (their engineer's opinion) to communicate over the phone lines using a PIC and a few discrete components.

    Pretty much any circuit today uses the transformer to isolate the product from the phone line. There are several alarm dialers on the market that use opto-isolators and P-mos relays to connect to the phone line. Did you look at the site that I listed on my first reply?

    BobK

  5. #5
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    984

    Default

    You'll be wanting to run your pic at 20MHz to stand a chance of your phone system
    recognizing the DTMF tones produced by PicBasic/Pro.
    Don't forget to DEFINE OSC 20
    The tones produced by the pic aren't a very pure sine wave.

    An external DTMF generator chip would be best,
    but I have used a 16F84 to dial numbers and navigate DTMF phone menu systems.
    One project was an automated thing to retrieve my bank balance over the phone on payday.

  6. #6

    Default

    Quote Originally Posted by BobK View Post
    Hello, ultramegaok

    You will not be able to send any thing out to the phone line through a bridge rectifier!
    The only thing the bridge rectifier is good for, on a phone line, is drawing power FROM the phone line to power some circuitry. You need to use a 600:600 isolation transformer. Go to www.microchip.com and lookup application note AN854. There in Figure 1 is an example of what it takes (their engineer's opinion) to communicate over the phone lines using a PIC and a few discrete components.

    Pretty much any circuit today uses the transformer to isolate the product from the phone line. There are several alarm dialers on the market that use opto-isolators and P-mos relays to connect to the phone line. Did you look at the site that I listed on my first reply?

    BobK

    Thanks BobK
    I have read the website from your first reply which helps me a lot to undertands how telephones work, I was trying to avoid the transformer because I don't have one on hand rigth now, but I think I need to go to radioshack and get one. That seams the most safest way to connect the pic...... I let you now my progress...Checking AN854.

  7. #7

    Default

    Quote Originally Posted by Art View Post
    You'll be wanting to run your pic at 20MHz to stand a chance of your phone system
    recognizing the DTMF tones produced by PicBasic/Pro.
    Don't forget to DEFINE OSC 20
    The tones produced by the pic aren't a very pure sine wave.

    An external DTMF generator chip would be best,
    but I have used a 16F84 to dial numbers and navigate DTMF phone menu systems.
    One project was an automated thing to retrieve my bank balance over the phone on payday.
    Thanks Art for the Tip
    I will try at 20MHz.....by the way , I like your website......

  8. #8

    Default Generating DTMF from a PIC

    Hi ultramegaok

    I have done a lot of development accessing the PSTN using Pics and PBP Pro
    First of all, the DTMF tones out of a PIC are dreadful as produced on the pin - you need to clean them up with an active low pass filter. This will remove all t he nasty higher order stuff that clogs it and will produce a pretty good DTMF waveform. Using a single opamp 2nd order filter, I was able to shape and send tones without problems, and have them accepted at destination. And yes, clock at 20Mhz minimum to make the waveforms acceptable

    Eish! (as we say in South Africa before the World Cup). You need an audio transformer and what is called an "active Gyrator" with a single transistor to match to a PSTN line. Will gladly send design tips

    You want to receive DTMF with a PIC? Good luck. It's vastly more complicated, so rather use an industry standard IC like the MT8870 decoder IC. The Microchip website has an application note that decodes DTMF, but it looks like complicated software

    Will gladly send u the details on the low pass filter if that interests you.

    regards

    Angus Anderson
    KwaZulu Natal, South Africa

  9. #9

    Default

    Quote Originally Posted by Angus Anderson View Post
    Hi ultramegaok

    I have done a lot of development accessing the PSTN using Pics and PBP Pro
    First of all, the DTMF tones out of a PIC are dreadful as produced on the pin - you need to clean them up with an active low pass filter. This will remove all t he nasty higher order stuff that clogs it and will produce a pretty good DTMF waveform. Using a single opamp 2nd order filter, I was able to shape and send tones without problems, and have them accepted at destination. And yes, clock at 20Mhz minimum to make the waveforms acceptable

    Eish! (as we say in South Africa before the World Cup). You need an audio transformer and what is called an "active Gyrator" with a single transistor to match to a PSTN line. Will gladly send design tips

    You want to receive DTMF with a PIC? Good luck. It's vastly more complicated, so rather use an industry standard IC like the MT8870 decoder IC. The Microchip website has an application note that decodes DTMF, but it looks like complicated software

    Will gladly send u the details on the low pass filter if that interests you.

    regards

    Angus Anderson
    KwaZulu Natal, South Africa
    Thanks for the information Angus, could you share the low pass filter circuit that you use before...my project is only to send DTMF (just Dialing)

    my email is [email protected].


    Greeting from Mexico!!!!

    I think my futbol team is going to be in the inaugural game against your team in the wolrd cup

  10. #10
    Join Date
    Jan 2013
    Posts
    1

    Default Re: DTMF and PIC 16F628A

    Quote Originally Posted by ultramegaok View Post
    Thanks for the information Angus, could you share the low pass filter circuit that you use before...my project is only to send DTMF (just Dialing)

    my email is [email protected].


    Greeting from Mexico!!!!

    I think my futbol team is going to be in the inaugural game against your team in the wolrd cup
    please if you got the solution please tell me too i am also stuck.. i also have to generate DTMF dail tone to call through phone line using pic.. i am using pic 16f877a with 20mhz crystal.. in my programmer i have dtmfout instruction.. i can write dtmfout porta.0, [3] and it will generate dtmf for numbe 3 at porta.0 and it is generating tones but those tones are not working properly.. with ptcl and even if i try to decode those tones using mt8870 the ic is not decoding the tones i don't know about how to filter those please mail me too about how to filter or how to make it work
    my email is
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts