Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Issue successfully resolved

???
06/23/03 12:47
Read: times


 
#49073 - RE: Rob Redding and Michael Karas
Responding to: ???'s previous message
You appear to have the code already. Now you need to have a mechanism to take the two byte values and combine them together produce the resultant DTMF signal. Keep in mind that by the DTMF signal is actually an anlog signal and not a "TTL" signal. The two numbers produced by the code Rob presented are the amplitudes for the two sine waves of the DTMF at any given sample period. Rob has already suggested several of the ways that these values could be combined together to produce the analog DTMF signal.

One way was to connect an R/2R resister ladder network to 8 port pins of the microcontroller. The amplitude value gets outputted to the port and converted to the corresponding analog voltage by the resistors. The ladder output would need buffering via an OPAMP or something similar. If you use 8 bits output like this you need to heed Rob's note that you add the two individual 8 bit samples in the code together and divide by two to get the value you feed to the 8-bit port.

Another way he suggested was to connect a ready made D/A converter to the microcontroller via some interface means. Then the summed samples in the code are sent to the DAC to produce the required analog voltage. If a 10-bit DAC is used that would be cool. Once again if an 8-bit DAC is used then it is necessary to sum the two software samples together and divide by two before outputting to the port pin. When using a DAC for DTMF generation is it is probably best to use a parallel interface device. Highly likely a serial interface device will take longer than one of the sample periods to transfer the sample to the DAC. This would be particularly true for a bit banged I2C DAC.

The third way suggested by Rob is to use the PCA counters that are on many of the '52 clones these days and run a PWM algorithm. The PWM will come out a single port pin as a digital signal and vary in duty cycle according to the amplitude that the DTMF signal will have at any given time. It is necessary to use a filter circuit outside the microcontroller to produce the analog voltage from the varying duty cycle signal. WHen using the PWM concept it would also be possible to use two PCA channels (and two output pins) and use two PWM signals - one output for each frequency of the DTMF pair. Then two filters and an OPAMP summer can produce the DTMF analog voltage. This latter scheme has a slight advantage in that the filter for each of the two DTMF PWM outputs can be characterized to the high band and low band frequencies of the DTMF signals.

Michael Karas


List of 16 messages in thread
TopicAuthorDate
DTMF from 8052 pin            01/01/70 00:00      
   RE: DTMF from 8052 pin            01/01/70 00:00      
   RE: DTMF from 8052 pin            01/01/70 00:00      
   RE: DTMF from 8052 pin            01/01/70 00:00      
   RE:Rob Redding            01/01/70 00:00      
      RE: RE:Rob Redding            01/01/70 00:00      
         RE: Rob Redding and Michael Karas            01/01/70 00:00      
            RE: Rob Redding and Michael Karas            01/01/70 00:00      
            RE: Rob Redding and Michael Karas            01/01/70 00:00      
               RE: Rob Redding and Michael Karas            01/01/70 00:00      
                  RE: Rob Redding and Michael Karas            01/01/70 00:00      
                     RE: Rob Redding and Michael Karas            01/01/70 00:00      
      RE: RE:Rob Redding            01/01/70 00:00      
   RE: DTMF generation from ADuc812            01/01/70 00:00      
   RE: DTMF generation from ADuc812            01/01/70 00:00      
      RE: DTMF generation from ADuc812            01/01/70 00:00      

Back to Subject List