PDA

View Full Version : DTMF Generation and DTMF Detection



william chan
04-30-2008, 02:08 PM
Hi,

How easy would it be to implement DTMF generation and DTMF detection code (using Sigma Delta ADC) on the propeller?
Would it be easier to implement than on the SX?

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my (http://www.fd.com.my)
www.mercedes.com.my (http://www.mercedes.com.my)

Praxis
04-30-2008, 06:42 PM
Hi William,

This should point you in the right direction;
http://en.wikipedia.org/wiki/Goertzel_algorithm

BTW do you have the Propeller Proto board & Plug in stock?

Azlan

Rayman
05-01-2008, 02:05 AM
I've got a dual tone generator here:

http://www.rayslogic.com/propeller/Programming/dac/dac.htm

I think Paul Baker posted some kind of spectrum analyzer code a while ago for use with sigma-delta ADC.


Those two things should do it, I think...

BTX
05-01-2008, 02:30 AM
@Rayman

Is there any possibility that use your "ASM WAV Player" as a DAC, to play the samples captured by the MIC of the demo board ??
Just like the "microphone to headphones demo" but using your asm code as a DAC....
Unless only one channel, & unless only 8-12 bits sampled. Although thinking to use it, with an external 16 bits A/D.

I tried to do this before but I can't, just using the Buffers[] as an input for the samples.
Sorry for OT for this thread.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Oldbitcollector (Jeff)
05-01-2008, 04:01 AM
Google is your friend here..

Here's the touch tone wav files. With Rayman's player this should solve the output side.

community.voxeo.com/library/audio/prompts/dtmf/index.jsp (http://community.voxeo.com/library/audio/prompts/dtmf/index.jsp)

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook 1.4 (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf)
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us (http://propeller.warrantyvoid.us)
Got an SD card? - PropDOS (http://www.orrtech.net/propdos/)
A Living Propeller FAQ - The Propeller Wiki (http://propeller.wikispaces.com/)
(Got the Knowledge? Got a Moment? Add something today!)

william chan
05-01-2008, 03:34 PM
Azlan,

Both Propeller Protoboard and Propeller Plug is in stock at our office.
How many pieces you need?

Thanks everyone.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my (http://www.fd.com.my)
www.mercedes.com.my (http://www.mercedes.com.my)

nutson
05-01-2008, 05:25 PM
Given the prop counters it seems easier to me to measure time between input signal zero crossings and decide on·the discrete frequency from that.

Ken Peterson
05-02-2008, 11:55 PM
nutson: that would be a lot simpler with a single tone. DTMF = Dual Tone Multiple Frequency, which results in a more complex waveform. Counting zero crossings may not get you what you want.· It may be necessary to use FFT.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

william chan
05-03-2008, 09:47 AM
How difficult would it be to "port" the SX dtmf detection virtual peripheral to an object in the propeller?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my (http://www.fd.com.my)
www.mercedes.com.my (http://www.mercedes.com.my)

Leon
05-03-2008, 06:24 PM
Ken Peterson said...
nutson: that would be a lot simpler with a single tone. DTMF = Dual Tone Multiple Frequency, which results in a more complex waveform. Counting zero crossings may not get you what you want. It may be necessary to use FFT.


The previously suggested Goertezel algorithm is related to the FFT.

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Rayman
05-07-2008, 10:53 PM
BTX said...
@Rayman

Is there any possibility that use your "ASM WAV Player" as a DAC, to play the samples captured by the MIC of the demo board ??
Just like the "microphone to headphones demo" but using your asm code as a DAC....
Unless only one channel, & unless only 8-12 bits sampled. Although thinking to use it, with an external 16 bits A/D.

I tried to do this before but I can't, just using the Buffers[] as an input for the samples.
Sorry for OT for this thread.


I think this is very doable...· You may be able to store a second or two in hub ram if you acquire at 8 bits/sample and 8ksps...· I have a SPIN wav player that can play this sort of data stored in hub ram on my web site.

But, if you want good quality, you will probably need to save to SD card.·

Just be carefull with the data format...· 16-bit data is stored as two's compliment (or you can think of it as 7FFF being the baseline, 0000 being the minimum possible value and FFFF being the maximum possible value).· But, 8-bit data is strored a different way...

BTX
05-07-2008, 11:09 PM
Thanks so much Raymond for the answer !!
I will try your suggests.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Rayman
05-08-2008, 06:25 AM
you could start by just saving to the sd card as a .wav file. see my apps for notes on the header format...· then, you can test the wav's out on a pc...