Shop OBEX P1 Docs P2 Docs Learn Events
dtmf 8870 to bs2 tone decoder — Parallax Forums

dtmf 8870 to bs2 tone decoder

electromanjelectromanj Posts: 270
edited 2010-03-20 21:04 in BASIC Stamp
Hello everyone!
I am trying to interface a cm8870 DTMF decoder to a BS2. I am still waiting for the·cm8870 chip so this is mainly a software question...
I would like to receive DTMF tones with a cm8870 decoder and then·output·the 4 digit code·to the bs2 then make an output·decision from the stamp depending on the·dtmf code that was·received by the cm8870.
Example: The cm8870 receives a touchtone sequence of 1111, the cm8870 outputs binary 0001,0001,0001,0001 to the stamp. The stamp takes that information and then makes the decision that 0001,0001,0001,0001 results in an output of pin 15 switching from low to high energizing a transistor driven relay to turn on a lightbulb.

I have no experiance with this kind of circuit or programing. I will attach schematics and code of the basic idea that I have in mind. I know that the code I am posting is ridicules and dumber than dumb, but that's where I am right now. I am really interested in learning about how you take a four bit (string)? and use that as an input to the bs2 and produce an output.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-03-20 03:29
    Tie the four bits to four pins on the stamp that form a nibble and read it as a digit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • electromanjelectromanj Posts: 270
    edited 2010-03-20 03:34
    Please elaborate.
  • FranklinFranklin Posts: 4,747
    edited 2010-03-20 03:45
    Read the manual about ina and inb.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • electromanjelectromanj Posts: 270
    edited 2010-03-20 04:02
    Which manual?
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2010-03-20 06:28
    · I'm sure you know about the Basic Stamp Syntax and Reference Manual...I'm just guessing by the fact you have been a forum member since 2006.·· But if not, you can download it free as a PDF ·from the Parallax.com website.·· You can also order the book· from the Parallax Store.· There is a 16 bit read-only register set aside for reading the state of the Basic Stamp's pins.· This will be useful for your purpose and you can find the info in Chapter Four of the Manual.· Good luck.

    Post Edited (Mikerocontroller) : 3/20/2010 6:34:21 AM GMT
  • electromanjelectromanj Posts: 270
    edited 2010-03-20 15:05
    Ok thanks! I should of been more clear. I have the what's a microcontroller·book,·basic stamp manual version 2.0b ( copyright 2000!), the propeller manual, the propeller·education lab, and the new propeller official guide book.

    I made a mistake in my learning process and just jumped around from project to project finding pieces of syntax as I went.jumpin.gif

    me var byte

    IF·me = Attention deficit disorder·THEN·GOSUB learn_high_low

    learn_high_low:·GOSUB learn_LCD_control

    learn_LCD_control:·GOSUB learn RCTIME

    Now I'm kinda lost and am lacking some of the most basic instructions that I'm sure will make the most complicated projects more simple.

    Thanks for all the help!
  • FranklinFranklin Posts: 4,747
    edited 2010-03-20 21:04
    All the manuals are online, I would recommend getting the latest manuals and updating your software while you are at it. A new version of the basic stamp software just came out this week.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.