A little DTMF help


Results 1 to 40 of 49

Threaded View

  1. #26
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Talking

    maybe:

    @ device pic16F876A, hs_osc, wdt_on, lvp_off, protect_off

    include "MODEDEFS.BAS"
    define OSC 20
    adcon1=7
    trisc = %00000000

    '_________pic to mc145436a assignments______________________
    dtmf_ready VAR PORTA.0 'pin 12 (DV)
    select_dtmf VAR PORTA.1 'pin 3 (Enable)
    reset VAR PORTA.2 'pin 5 (GT)
    DT0 VAR PORTB.4 'pin 2 (D1) ??
    DT1 VAR PORTB.5 'pin 1 (D2) ??
    DT2 VAR PORTB.6 'pin 14 (D4)
    DT3 VAR PORTB.3 'pin 13 (D8)
    ce var portA.3 'pin from isd chip

    '____________________variables____________________ ______
    dtmf VAR byte ' Stores most recent DTMF digit
    dtmf1 var byte
    password var byte [8]
    codeword var byte [8]
    codeword1 var byte [8]
    c var byte
    e var byte

    '___________________Initial Conditions__________________
    start:
    pause 100:high ce:high reset:Low select_dtmf:e = 0
    repeat
    until dtmf_ready
    portc = %00000000:ce = 0: pause 20:ce = 1: pause 2000:c = 0
    repeat
    Repeat
    until dtmf_ready 'waits for number to be depressed
    select_dtmf = 1 ' Enable the data output from the MT8870
    dtmf = 0:dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
    LookUp dtmf,["_1234567890*#"],dtmfassword[c]=dtmf
    Repeat : until dtmf_ready=0 ' Loop here until DTMF signal stops
    reset = 0: PAUSEUS 30:Reset=1 ' Hold GT for > 18mS
    select_dtmf = 0 ' Disable the MT8870 data output
    gosub Output_DTMF:c = c + 1
    until c > 7
    c=0:repeat:dtmf=password[c]:gosub output_DTMF: Pause 1000:c=c+1:until c>7
    goto start
    end

    Output_DTMF:
    Lookup dtmf-"0",[%10101001,%10010111,%10011001,%10011011,%10011101, %10011111,%10100001,%10100011,%10100101,%10100111],PortC
    pause 1:ce = 0: pause 1:ce = 1
    return
    Last edited by BigWumpus; - 27th May 2006 at 19:37.
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

Similar Threads

  1. DTMF on a 12V car system
    By Jumper in forum Schematics
    Replies: 1
    Last Post: - 7th December 2008, 14:41
  2. DTMF output
    By din_kt in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 28th February 2008, 14:24
  3. DTMF Decoding?
    By muddy0409 in forum General
    Replies: 1
    Last Post: - 19th December 2007, 15:28
  4. Replies: 2
    Last Post: - 31st July 2006, 16:06
  5. Problems with DTMF Generatiom
    By Angus Anderson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2006, 21:12

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