A little DTMF help


Closed Thread
Results 1 to 40 of 49

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Ok

    I guess I am just confused here. The led subroutines are merely a visual aid for the debuggin process. I have about 10 different program written for this contraption. I started with each section of the main program until it worked correctly. Then I moved to the next section and so forth. When I put them all together, they don't work. Like for instance, in the previous post, the branch command didn't work. The led didn't blink on and off for 3 seconds. I know this routine is good. Also, I shouldn't have to push a button twice to go from the if then statements of the password comparison to the menu_message, but it will just sit there until I press two buttons. I know that is no where in the code so I am confused as to why it is like that. Thanks for the help, and I am not uposed to learning. I do a couple of questions for you, in your code you wrote, you have this:

    Lookup dtmf-"0",[%10101001,....... My question is what is -"0" for?

    Also,

    dtmf = 0:dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
    LookUp dtmf,["_1234567890*#"],dtmf how does the lookup table know which number has been decoded by using this sequence: dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3

    Travin
    Last edited by Travin77; - 29th May 2006 at 00:23.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Travin77
    I do a couple of questions for you, in your code you wrote, you have this:

    Lookup dtmf-"0",[%10101001,....... My question is what is -"0" for?

    It's a trick !?!

    You have:
    an ASCII-character (a digit "0"..."9") inside the variable "dtmf"

    You want to get:
    a bitpattern for the isd-chip.

    Solution:
    I used the lookup-command to index an bit-pattern. If I subtract the numerical äquivalent of "0" (IMHO 048 dezimal) from the ASCII-character in dtmf, I get an index-number 0..9. The lookup-command gets the bitpattern out of the list (10 patterns) and put it into the portC.

    Quote Originally Posted by Travin77
    Also,

    dtmf = 0:dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
    LookUp dtmf,["_1234567890*#"],dtmf how does the lookup table know which number has been decoded by using this sequence: dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
    Travin
    Read it like:
    Clear all bits in dtmf
    Get the bit out out DT0 and put it into dtmf.0
    Get the bit out out DT1 and put it into dtmf.1
    Get the bit out out DT2 and put it into dtmf.2
    Get the bit out out DT3 and put it into dtmf.3

    So, the 4 bits are puzzled to the variable ! (index-number)
    The lookup-command gets an ASCII-character for this number and stores it into the variable.

    You love to work with ASCII-characters. It's not bad, but you have to convert sometimes from index-number to ASCII-character and back.
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  3. #3
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Assuming

    I assume here that when you say index number you mean a binary repesentation of that number. Does this make the pic run smother? By the way, I finally got your code to compile. It won't announce the digits as they decode not will it announce the array after the 8 digits are input. Still trying to make the program work like I need it to.

    Thanks

    Travin
    Last edited by Travin77; - 29th May 2006 at 21:07.

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