-----Original Message----- From: Tracy Smith To: PICLIST@MITVMA.MIT.EDU Date: Sunday, November 14, 1999 6:01 PM Subject: Re: DTMF Tones? [Idea]How to produce sine wave >1 out of 3 pieces of information distributed on the >pic list is decent. :) I would say 1 out of 10. ;) > >> I think that my method resembles phase accumulator >> and table method except >> there is no table. The table is generated on the run >> and this is triangle. >> In my case error of triangle generation is lower, >> because there is no >> restriction to use only table values. Finally, this >> reduced error makes the >> sine wave frequency more stable. Certainly, the >> phase accumulator method is >> more straight-forward and simple, at the cost of >> frequency jitter. In case >> of DTMF this is mainly the frequency what matters, >> because DTMF frequencies >> are very close. > >True, butt, if you incorporate the proper >interpolation along with your look up table, then the >jitter effects are mitigated. Without any >interpolation, the sinewave output from the look-up >table is a stair-stepped waveform. The higher the >update frequency, the smaller the steps and the closer >to a sine wave approximation. This 'stair-stepped' This means a biggg table. Interesting, what size of table will be sufficient to minimize jitter enough for DTMF application. >So the next step is first order interpolation. For our >application, this is linear interpolation between >consecutive samples in the table. (For sampling >theory, there are some subtle but important >differences on the interpretation of a first-order >hold.) Which is to say, if you need a sample that is >not (exactly) at one of the sample points in your >table, then you approximate it by using linear >interpolation. For example, suppose you had a table >with 10 samples: f(i) is the function defined for i >=0..9 . Now suppose you need f(2.25)? Well, using >linear interpolation you'd approximate this: > >f(2.25) - f(2) f(3) - f(2) >-------------- = ------------- > 2.25 - 2 3 - 2 > >f(2.25) ~= f(2) + 0.25*(f(3) -f(2)) > Let me compare two methods of sine generation for DTMF application: 1)Triangle generation with subsequent integration. 2)Phase accumalator&table with linear interpolation; The first method doesn't have table, instead, triangle waveform is generated using addition of a fixed step to the previous sample. No need to use interpolation means faster execution time. To produce sine waveform integration is used - some degradation in the waveform, which is acceptable in DTMF. As a result, the first method generates efficiently jitter free, sine waveform signal. The second method has table, therefore it requires more ROM; needs linear interpolation - more computing time because of multiplication. Result is the same. What do you think? _ Nikolai Golovchenko, Electrical Engineering Student National Mining University of Ukraine www.nmuu.dp.ua Dnepropetrovsk, Ukraine E-mail: golovchenko@mail.ru