PIC&DTMF help


Closed Thread
Results 1 to 13 of 13

Thread: PIC&DTMF help

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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

Members who have read this thread : 0

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