Searching \ for 'DTMF generation on digital output' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/pots/dtmf.htm?key=dtmf
Search entire site for: 'DTMF generation on digital output'.

Truncated match.
PICList Thread
'DTMF generation on digital output'
1996\10\15@153221 by Zhahai Stewart

flavicon
face
Perusing, I've found one DTMF generation program for the PIC,
by Stephen Hardy of Canberra.  While this uses an interesting and
heretofore unknown to me method of sine wave generation, it
expects a DAC (typically 8 bits) to generate the summed sinewaves.

I notice that the Basic Stamp 2 has a BASIC command (DTMFOUT) to
generate DTMF via a single digital output (aka 1 bit DAC), which
it says can be turned into proper waveforms with filtering.  (It
also has a command to output one or two arbitrary tones).

My question is: How is this done?

I can see that a single tone can be done via a square wave (and
attenuating the 3, 5'th etc harmonics would approximate a sine wave).
But directly summing two square waves of equal amplitude and
different frequency would take a 3 level output.  I don't see how to
reduce it to 2 levels and keep the desired dual tones even
approximately.

My goal would be to transmit DTMF audio (via low powered radio) from a
PIC (not Stamp) monitoring a pumphouse, to be decoded with a standard
DTMF receiver chip (and a radio receiver) a few hundred feet away.  It
would be nice if I could avoid using a DTMF encoder chip (or 8 bit
DAC) at the pumphouse end.
  Zhahai

@ Zhahai Stewart       spam_OUTzhahaiTakeThisOuTspamhisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\10\15@183240 by John Payson

picon face
> I notice that the Basic Stamp 2 has a BASIC command (DTMFOUT) to
> generate DTMF via a single digital output (aka 1 bit DAC), which
> it says can be turned into proper waveforms with filtering.  (It
> also has a command to output one or two arbitrary tones).
>
> My question is: How is this done?
>
> I can see that a single tone can be done via a square wave (and
> attenuating the 3, 5'th etc harmonics would approximate a sine wave).
> But directly summing two square waves of equal amplitude and
> different frequency would take a 3 level output.  I don't see how to
> reduce it to 2 levels and keep the desired dual tones even
> approximately.

There are a number of methods for this.  Probably the simplest to understand
is something like the following:

Loop:
       bcf     PORTB,0
       btfsc   Phase1,7
        bsf    PORTB,0
       movf    Freq1,w
       addwf   Phase1
       nop

       movf    Freq2,w
       addwf   Phase2
       bsf     PORTB,0
       btfss   Phase2,7
        bcf    PORTB,0
       decfsz  OverallTime
        goto   Loop

When both waves are high, the output is [almost] constantly high; when both
are low, the output is [almost] constantly low.  When the two waves are
opposite each other, the output is a 50%-duty-cycle very rapid square wave.

1996\10\15@211532 by Steve Hardy

flavicon
face
> From: Zhahai Stewart <.....zhahaiKILLspamspam@spam@HISYS.COM>
>
> Perusing, I've found one DTMF generation program for the PIC,
> by Stephen Hardy of Canberra.  While this uses an interesting and
> heretofore unknown to me method of sine wave generation, it
> expects a DAC (typically 8 bits) to generate the summed sinewaves.
>
> I notice that the Basic Stamp 2 has a BASIC command (DTMFOUT) to
> generate DTMF via a single digital output (aka 1 bit DAC), which
> it says can be turned into proper waveforms with filtering.  (It
> also has a command to output one or two arbitrary tones).

No need to use PWM: you can construct a quick-and-dirty DAC by outputting
the sine values to, say, 4 bits of port B.  Use a binary weighted resistor
network (say 4.7K, 10K, 22K and 39K from the MSB to LSB) and feed the
output into the summing node of an op-amp or even a common emitter
transistor.

When amplified, the tone sounds awful, but the telecom equipment doesn't
seem to mind.  I successfully dialled from my phone by running the
resistor network directly into a pair of headphones held up to the
phone.  Entirely PIC-powered!

Regards,
SJH
Canberra, Australia

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...