• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Data Converters » Audio Converters » Audio Converters Forum » Flexi Tone Generator TAS3204-EVM
Share
Audio Converters
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS
Check out
Analog Wire blog
  • $core_v2_blog.Current.Name

    RS-485 - Who says you can't teach an old dog new tricks?

    Posted 3 days ago
    by Neel Seshan
    Would you agree that RS-485 has turned out to be one of the most...
  • $core_v2_blog.Current.Name

    Filter for thought

    Posted 5 days ago
    by Soufiane Bendaoud
    Have you ever wondered how engineers designed active filters...
  • $core_v2_blog.Current.Name

    Let’s take this driver out for a spin

    Posted 10 days ago
    by Soufiane Bendaoud
    Before I suggest a suitable op amp to drive an ADC, I look at...

Forums

Flexi Tone Generator TAS3204-EVM

This question has suggested answer(s)
Thomas Deuble
Posted by Thomas Deuble
on May 02 2012 07:46 AM
Intellectual520 points

Hi there,

when I alter the frequency of the flexi tonegenerator during running in PPS on TAS3204-EVM two or three times no tone is produced any more.

Any idea?

Also I will have to alter the tone generator frequency by MCU via I2C. How does a frequency value lets say 0.008333 2(f0/fs) fit into the four byte hex coeficient?

Thanks for any response.

Thomas

TAS3204
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 16 2012 06:29 AM
    Intellectual520 points

    Susan,

    1) a  pfw with only the sinegenerator and an output does the same.

    2) My resource usage:

    24bit Delay Ptrs 4  (25,00%)
    48bit Delay Ptrs 0  (0,00%)
    Delay Memory (words) 4  (0,07%)
    DSP Code (words) 1478  (47,74%)
    DSP Coef (words) 470  (45,99%)
    DSP Data (words) 317  (41,38%)
    EPROM Image (bytes) 29107  (44,41%)
    Micro External (bytes) 445  (21,73%)
    Micro Internal (bytes) 145  (56,86%)
    Micro Program (bytes) 14816  (90,43%)

    3) Please find the component attached.

    Could you please find some time to spend on this. I now did spend already a lot of time and I get a little under pressure now.

    Thank you very much.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 16 2012 17:09 PM
    Expert3030 points

    Thomas,

    Please try the attached componet: I fixed couple of mistakes in the .asmx file, you could take a look to see the differences.  Also, I was wrong about the beta, it was scaled, so when you do the calculation, you need to put in the number *2^16.

    And also, remember to disable and enable the tone generator when you switch between different frequencies.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 18 2012 03:38 AM
    Intellectual520 points

    Does not change really, Susan.

    I made sure that the component you send is used by removing the old from the directories componentcach, componentlibrary and usercomponentlibrary.

    I can read the updated alpha and beta with the I2C memory tool but when the sinegenerator is enabled there is a strong increase in gain though the frequency is right and the beta changes every time I read the I2C address.

    Thanks for further help....

    Hoping...

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 18 2012 03:55 AM
    Intellectual520 points

    OOPS got the scaling of beta wrong, sorry...

    I be be back after correcting...

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 18 2012 04:24 AM
    Intellectual520 points

    All right, it is working now, Susan.

    There is one more thing.

    I acctually would have to do a so called warble sweep with the sine wave. This is sweeping the sine wave from 20 to 20000 Hz while swinging round the center sweep frequency with 1/3 octave.

    That means that I have to diable - update alpha beta - eable like ten times a second wich makes a horrible noise.

    Now, is there any chance to work with two alphabeta registers and a third register to tell wich alphabeta register to work from?

    This way I could update the alphabeta register A while the sinegenerator is working from the alphabeta register B

    then switch to A and update B.

    That would be realy a great thing.

    Any thoughts on this?

    Thanks,

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 21 2012 04:59 AM
    Expert3030 points

    Thomas,

    I think it's doable.  But it would require more changes than the previous change when converting from the existing FlexiTonGen.

    You would need to:

    1) change the two .xml files to add in the new alpha, beta and the selection

    2) change the .asmx file to add in the source code to swap between the two sets of alpha/beta based on the selection

    regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 22 2012 01:24 AM
    Intellectual520 points

    Thank you Susan.

    But do you think that it is possible to change alpha and beta on the fly or do we have to disable - select - enable?

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 23 2012 05:03 AM
    Expert3030 points

    Thomas,

    without disable/enable, that would be difficult.  Because we need that to restore the initial state.  I am trying to think of another way to do it, but no luck yet.

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on Jun 05 2012 08:09 AM
    Intellectual520 points

    Susan, I found a algorithm to calculate a sine wave but it is in C:

    // Input angle from -pi/4 to pi/4
    dsp16_t dsp16_op_kernel_sinfix(dsp16_t angle)
    {
      // Coefficients of the 5th order Tchebychev polynom to calculate a sine.
      const dsp16_t s1 = DSP16_Q(0.785369873046875);
      const dsp16_t s3 = DSP16_Q(0.322784423828125);
      const dsp16_t s5 = DSP16_Q(0.03875732421875);
      S32 z, suma;

      // Computation of the polynom
      z = (angle*angle) >> (DSP16_QB - 3);
      suma = s3 - ((z*s5) >> (DSP16_QB + 1));
      suma = s1 - ((z*suma) >> (DSP16_QB + 1));

      return (angle*suma) >> (DSP16_QB - 2);
    }

    Could this be translated int assembler for the TAS?

    Thanks,

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on Jun 06 2012 08:51 AM
    Expert3030 points

    Thomas,

    Have you tried to use this code to generate sine wave?  I am not 100% positive about it since usually polynomial approach is fine to calculate a sin(x) value based on the angle x, but when using it to generate sine wave, there might be discontinouity in the wave.

    If you've confirmed the wave form is ok, then this algorithm can be implemented in TAS3x.

    regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on Jun 13 2012 03:05 AM
    Intellectual520 points

    This is right Susan.
    If we want to generate a sinsweep with a continous waveform we would have to be able to alter the frequency with the right phase. The code that I found is only the sin function. But it is a start. So we would need something like sin(2*pi*f/fs*t + phase).

    Wouldn´t we?

    Thanks for any further idea.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on Jun 14 2012 10:04 AM
    Expert3030 points

    Thomas,

    That's right.  The problem with the polynomial approach is the possibility of discontinounity due to limited precision.  The most commonly used method on fixed-point DSP is lookup table, but indexing in TAX3x is very expensive, it's possible though.  So far, the IIR implementation in TAX3x is still the most efficient and simple method.

    But your requirment is beyond just generating a sine wave, so that's difficult to realize in TAS3x.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on Aug 01 2012 01:59 AM
    Intellectual520 points

    Susan, it´s me again.
    Is there any possibility to try the polynomial approach and find out if it is enough precise?
    If I can not solve this our customers would have to run long audio cables to the amp every time.

    Thanks for any thoughts on that.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on Aug 02 2012 06:50 AM
    Expert3030 points

    Thomas,

    There are many polynomial approches and all have limitations: the one you posted, for example, has to be within [-pi/4, pi/4], which can only be used to estimate small angles, not suitable for sine generator.   And since TAS3x is fixed point, that definitely added more constrains.

    The only way I could think of is how to make the one we have work by sending the disable/enable and change frequency fast enough to generate the sweep signal, other than that, I run out of ideas.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use