DTMF and PIC for Remote Control


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    7

    Default DTMF and PIC for Remote Control

    Recently started playing with PICs and am just fascinated at what they can do.

    I am trying to build a simple remote control system for an amateur radio remote receiver using a DTMF decoder chip like an 8870 and a PIC such as a 16F877A. Does anyone have a code example of how the PIC would handle the input lines from the DTMF decoder? There is a valid digit line and 4 "decode" lines from the decoder. All I need is the BASICPRO program which would strobe the input lines, and when the valid signal is received determine which digit it represents. I can write the code for passwords, and determining what function the received number is to execute. I have looked through the code example part of the site and found one for a matrix keypad, but it does not include the use of a "valid" signal line.

    There is at least one example on the web, but it is written in assembly language and I got too discouraged trying to "decode" it.

    Thanx

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There's an example for the LAB-XT Telephony Experimenter Board (MT8870) on the meLabs samples page.

    http://melabs.com/resources/samples.htm#xtpbp

    grabrxt.bas
    <br>
    DT

  3. #3
    Join Date
    Sep 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Dtmf

    Hello Doggitz
    I am just starting out on a DTMF for remote control via telephone.
    I am using 8870 DTMF receiver and PIC 16F628 to do the work.
    So far DTMF receiver works fine but as usual the software is slowing me down. I want to be able to enter a PIN code..>...then a Function code...>.. the the Action code. Stuck on first part, even using PBP hasn't made things easier. I gave up on assembler ages ago..too tricky to get right.
    If you have any shortcut ideas or pointers from your work I would be most appreciative.
    Rgds
    Mike
    12/2/2010

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


    Did you find this post helpful? Yes | No

    Default

    doggitz, Attached is a first cut program I wrote about 8 years ago for our repeater system. It is one of the first programs I wrote using PBP so don't laugh....It is a remote link control program that worked the first time.... I used a simillar tt decoder to the 8870. I hope this will help you get a start.

    Dave Purola,
    N8NTA
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by doggitz View Post
    Recently started playing with PICs and am just fascinated at what they can do.

    I am trying to build a simple remote control system for an amateur radio remote receiver using a DTMF decoder chip like an 8870 and a PIC such as a 16F877A.
    PICs are pretty amazing. Here is an application note from Microchip on using PIC18 devices to decode DTMF without a decoder chip. I still recommend the 8870, but thought you would be interested to know that it can.

    http://ww1.microchip.com/downloads/e...TMFDetv1.2.zip
    Attached Images Attached Images

  6. #6
    Join Date
    Sep 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default DTMF code

    Why doesn't
    pincode1 = PORTB && $0F...work in PBP ?

    When PORTB lower 4 bits are 0010 && 00001111 I should get 0010
    I get $9C...????
    How weird?

    Bob, from across the road, has gone on his final mission.
    Mike1939

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It doesn't work because you're using a logical operator instead of the bitwise operator.

    pincode1 = (PORTB & $0F) would return the right value.

    Logical operators can only return true or false.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8
    Join Date
    Sep 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default DTMF decoder using 16F628A

    I have new coding problem, using TMR0 I do not understand........put simply
    Code:
    loop1:
      if intcon.2 = 0 then loop1  
      intcon.2 = 0
      clicks=clicks+1
      if clicks >=1900 then
      clicks=0
      high pin11:pause 100:low pin11  'Flash LED for 10th of second
      secs=secs+1
      endif
      if secs>=5 then 
      high pin10:pause 100:low pin10
      gosub nowt
      secs=0 'Reset secs
      endif
      goto loop1  
      end
      nowt: 
      return
    
    But fails if 
                  gosub nowt
                  endif
                  goto loop1  
                  end
                  nowt: 
                  secs=0 'Reset secs
                  return
    The inclusion of any code in the sub-routine at nowt: causes whole to fail?
    Last edited by ScaleRobotics; - 21st July 2010 at 17:42. Reason: added code tags

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Can you post the whole code, using code tags, so we can see how everything is setup? TMRO is "normally" set to trigger an interrupt handler so I am not sure what you are doing with what I see posted.

    Might just be running out of time???
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mike1939 View Post
    Bob, from across the road, has gone on his final mission.
    Bob who???
    Dave
    Always wear safety glasses while programming.

  11. #11
    Join Date
    Sep 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Smile DTMF and PIC

    Thank you, & NOT &&, well spotted. Progress is being made, I learn a new thing every day

    Bob Pierson was a WW2 rear gunner in Lancasters, A "Tail End Charlie".
    Sad loss for us here.

    Mike

  12. #12
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Me respects to Bob.
    We owe so much to our Veterans.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. 8870/dtmf + Pic?
    By PIC_hobbyist in forum General
    Replies: 2
    Last Post: - 5th March 2013, 01:19
  2. PIC RS-232 to control Access database?
    By Angus Anderson in forum General
    Replies: 6
    Last Post: - 29th July 2007, 13:26
  3. Replies: 2
    Last Post: - 31st July 2006, 16:06
  4. Problems with DTMF Generatiom
    By Angus Anderson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2006, 21:12
  5. Shaping DTMF Signal out of PIC
    By charudatt in forum Schematics
    Replies: 1
    Last Post: - 8th October 2003, 10:09

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