PDA

View Full Version : dtmf 8870 to bs2 tone decoder



electromanj
03-20-2010, 10:16 AM
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.

Franklin
03-20-2010, 10:29 AM
Tie the four bits to four pins on the stamp that form a nibble and read it as a digit.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

electromanj
03-20-2010, 10:34 AM
Please elaborate.

Franklin
03-20-2010, 10:45 AM
Read the manual about ina and inb.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

electromanj
03-20-2010, 11:02 AM
Which manual?

Mikerocontroller
03-20-2010, 01:28 PM
· 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

electromanj
03-20-2010, 10:05 PM
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.http://forums.parallax.com/images/smilies/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!

Franklin
03-21-2010, 04:04 AM
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