Shop OBEX P1 Docs P2 Docs Learn Events
Tone Decoding help, Please? — Parallax Forums

Tone Decoding help, Please?

SSchaafSSchaaf Posts: 6
edited 2004-10-14 00:00 in BASIC Stamp
Hello,
Can anyone tell me, or better yet, POINT me to were I can find examples of code for a BS2 to decode 1400hz, 1800hz, and 2300hz tones, and possibly COUNT the number of these frequency pulses?

The usual sequence is to:
1. Decode the phone ring pulses, (20hz)
2. Answer and send a 1400hz tone for 1sec
3. Detect and count either a 1400 or 2300hz tones.
4. Detect if tones were sent at 10 pps, 20 pps, or 40pps.
5. Send 1400 or 2300hz kiss-off tone for 1 sec.

Any help would be GREATLY appreciated!

Thanks,
Scott...

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-13 17:41
    Ideas: You could use a modem to answer the phone (after the proper number of rings). Then, take the audio from the modem and square it up through a flip-flop. Use PULSIN to measure the frequency input. You can use (filtered FREQOUT) -- injected in to the audio input of the modem -- to send the tones back

    Have a look at our Modem AppMod and the commands referenced above.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • SSchaafSSchaaf Posts: 6
    edited 2004-10-13 18:48
    Thank you for the fast response! I have a couple more questions tho....

    1. Does the audio in and out of a modem allow all audio from the phone line thru?

    2. PULSEIN will read the freq, how do I count the pulses, and the pulse RATE?

    Thanks again,
    Scott...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-13 20:56
    The modem we use on our Modem AppMod does have audio in and out, but we don't bring those connections out to pins -- you'll have to add wires. Measuring frequency with PULSIN is done with the forumua F = 1 / T.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • SSchaafSSchaaf Posts: 6
    edited 2004-10-13 23:25
    Thanks again. How do I count the frequency PULSES tho? I need BOTH, the frequency AND the number of these pulses.

    Thank you so much so far,
    Scott...
  • K de JongK de Jong Posts: 154
    edited 2004-10-13 23:47
    Number of pulses = frequency x time

    Klaus
  • SSchaafSSchaaf Posts: 6
    edited 2004-10-14 00:00
    Thanks Klaus, BUT, I am already reading the frequency OF the pulses, How do I detect when one ends, and another begins, THEN how many total?

    Scott...
Sign In or Register to comment.