PIC&DTMF help


Closed Thread
Results 1 to 13 of 13

Thread: PIC&DTMF help

  1. #1
    Join Date
    Aug 2011
    Posts
    5

    Unhappy PIC&DTMF help

    I want the work of the electronic circuit with a program . I Beginner and I want to explain the program if possible
    Means. If I want to send the following numbers 8736 works the door.
    And I want to know where I can change my numbers, for example. the first door 2345 works. 765432 Part II works, and so on .....
    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    Hi, and welcome to the forum. I am not sure I understand exactly what you are trying to do, but hopefully I have the basics. Here is an example of a keypad http://www.picbasic.co.uk/forum/cont...Keypad-routine

    For the dtmf part, PBP has the DTMFOUT command as described in the manual.
    Last edited by ScaleRobotics; - 16th August 2011 at 14:13.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    Yeah, PBP does have a generator but, he has an 8870 decoder drawn connected to the PIC to activate the door. I think he is asking how to do it in software?
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    Decoding DTMF in software is harder. Here is one example in asm: http://www.instructables.com/id/DTMF...-Microp/#step1

    And here is Microchip's app note AN257 http://www.microchip.com/stellent/id...pnote=en024294

    00257a.pdf

    Probably easier to stick with your 8870, or something similar.

  5. #5
    Join Date
    Aug 2011
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    Thank you all. I want to program for PIC to receiv the DTMF
    My problem with the recipient

  6. #6
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    I've used Darrel's Instant Interrupts to capture an interrupt on PortB.0, this is connected to the StD pin on the 8870. Then the code is
    /Code
    'This is an interrupt on PortB.0, when there is a valid DTMF tone decoded
    DTMFINT:
    DTMF = 0 'RESET THE VARIABLE
    WHILE portb.0 = 1 ' depends on how long they press the dtmf buttons
    IF portc.0 = 1 THEN DTMF.0 = 1 'Ones Column
    IF portb.4 = 1 THEN DTMF.1 = 1 'Twos Column
    IF portb.2 = 1 THEN DTMF.2 = 1 'Fours Column
    IF portb.1 = 1 THEN DTMF.3 = 1 'Eights Column
    WEND
    @ INT_RETURN ; Returns with the new dtmf value stored in DTMF variable
    CODE/

    Then you can just read your variable. Hope this helps,

    Jerry

  7. #7
    Join Date
    Aug 2011
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    hello. I found this program. But I need to understand it. I do not know where I change my numbers received.
    Example I want to run the Circuit after the following order numbers 3432657
    Thank you
    ''''''''''''''''''''''''''''''''''''
    ' Receiver Basic Program
    ''''''''''''''''''''''''''''''''''''
    device = 16f628A
    config INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, BODEN_OFF, LVP_OFF, CP_on, MCLRE_ON
    all_digital true
    Dim Temp as byte
    Dim Time as byte
    Dim loop as byte
    Dim flag as bit
    ''''''''''''''''''''''''''
    SYMBOL NO = 5
    '************************
    Dim dat[NO] as byte
    '&&&&&&&&&&&&&&&
    dat[0]=1
    dat[1]=2
    dat[2]=3
    dat[3]=4
    dat[4]=5
    trisb = %00011111
    trisa = %11111111
    OPTION_REG = %11000000
    low portb.4
    low portb.6
    low portb.5
    '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    ' First Timer, Delay after starting
    '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    for Time = 1 to 120
    delayms 2000 ' 4 min. low speed flash delay
    toggle portb.5
    next Time
    for Time = 1 to 60
    delayms 500 ' 1 min. high speed flash delay
    toggle portb.5
    if Time > 50 then high portb.4
    next loop
    low portb.4
    low portb.5
    ''''''''''''''''''''%%%%%%%%%%%%%%%%%%%%%----------
    on interrupt ISR
    INTCON = %10011000
    portb.0 = 0
    loop = 0
    main:
    goto main
    disable
    ISR:
    if INTCON.1 = 1 then intf1
    goto Exit_ISR
    intf1:
    INTCON.1 = 0
    Temp = porta
    Temp = Temp & %00001111
    if Temp = dat[loop-1] and loop > 0 then
    goto Exit_ISR
    else
    loop = loop + 1
    if Temp <> dat[loop-1] then
    loop = 0
    else
    if loop = NO then high portb.6 : high portb.5 : delayms 10000 : low portb.6 : low portb.5 : loop=0
    endif
    endif
    goto Exit_ISR
    Exit_ISR:
    resume
    enable
    goto main

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    What compiler do you have? You would have to understand what this program does really well, then translate it to picbasic, if you have picbasic.

  9. #9
    Join Date
    Aug 2011
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    Thank you very much. On your answer to me. I do not understand the program. This is a program for the circuit received the symbols of the DTMF, but I do not know any figures must be sent to the program works. And I do not have the program the PICBasic.I want to know how can I control Electrical circuit through the numbers that I want to work. I want the appointing numbers,

  10. #10
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    There isn't enough commenting in the code for me to have a clue what it's doing, besides blinking some LED's. If you don't have PBP, I don't see how we are going to be able to help you, seeing as this is a PBP help forum and all. It is fairly common for people to come here not knowing much about PBP, and for them to ask us to program their project for them. But usually people helping here will just want to assist in a project, and not do the whole project for someone, for free. If you really want to do it, I suggest using a free product, like assembly, or purchasing a compiler you are interested in. And then get some code together (by reading it's manual, and learning all you can), then ask for help on the forum for that compiler, (whichever one you decide on). I also second the recommendation of using a tone decoder chip. They are pretty easy to work with.

  11. #11
    Join Date
    Aug 2011
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    I just want to know where I can change my DTMF codll even know what was sent from the figures.

  12. #12
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    My best guess is the array called dat. But its not really documented at all, so who knows. Its also not in picbasic, but I am unclear how you will compile it. Do you own any compiler?

  13. #13
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PIC&DTMF help

    For those following this thread, Attached are the schematics, code and some pic's of the repeater link controller I designed quite a few years back for the radio club I belong to. I see no need to keep these a under wraps any more as the repeater owner has sold the repeater's to another club. I was the custodian for about 8 years or so and we had at any one time about 8 of these links in operation between two different repeater systems. I just thought the gentelman could use this code as the basis or at least see how to connect an external tone decoder to a pic. Enjoy... I think the code is documented pretty well as far as I can see. Maybe it should be submitted or promoted as an article...
    Attached Images Attached Images    
    Attached Images Attached Images
    Attached Files Attached Files
    Dave Purola,
    N8NTA
    EN82fn

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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