This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/UCD3138: How long does it takes UCD3138 to handle the trigonometric function

Part Number: UCD3138

Tool/software: Code Composer Studio

If use UCD3138 to handle the trigonometric function, for example sin(x), how many clock cycles does it need to finish the calculation? I want to do the PLL to track the AC input signal. Is there any examples of PLL implemented by UCD3138?

Does the instruction cycle based on the 31.25MHz oscillator?

  • Hi Weijing, An AE will respond soon to your question.
  • Weijing, I don't know how long it takes, but it isn't too hard to find out. Just take whatever trig function you want to use and put code around it which turns an I/O line high at the beginning an low at the end. Or I guess you could read from the 24 bit timer at the beginning and the end.

    I don't know of anyone who has tried using trig functions and a PLL to sync to a sine wave. I think that people have tried using zero crossing detection to determine frequency, and then figured out how to step through a sine table. That is likely to use much less MIPs.

    I know of people who have tried this approach, but they gave it up. I suspect that the issues were not with ideal sinewaves, but with real world sine waves with noisy zero crossings, AC drop, and requirements for very low THD and power factor. Good luck.