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.
Hi,
I am using Tiva C series and Keil IDE and I want to generate a PWM signal by comparing the sine wave and triangular wave. Frankly speaking, I don't have much experience with the math functions especially trigonometric functions in C programming. So, can somebody suggest me the solution for this. By googling I had found documents related to this, but for TMS320 or other DSP processors and here I am looking for Tiva C series based solution.
Hi Luis,
Yes, the output should depend upon the two waves. Also I want to know the difference in using the IQMath library and normal math library. Here the sine pulse will update at regular time interval and the triangular pulse remains constant.
nithin kurian said:Hi Luis,
Yes, the output should depend upon the two waves. Also I want to know the difference in using the IQMath library and normal math library. Here the sine pulse will update at regular time interval and the triangular pulse remains constant.
??????????????
^???? what are you thinking about ?
from where are coming these two wave/signal, what is the goal?
Are you using analog to digital converter?
Are you using analog comparator or are you doing what?
Luis
Please tell how to generate sine wave in tiva c using math library. then i want to vary the duty of pwm on the basis of sine wave magnitude.
Well why did you reply to this thread then, with a (not totally, but mostly) different question? And Luis's request for a more clear description of what you want to do still applies.
Besides, your question is rather generic in nature - the target of this forum is not really 'all things microcomputing', but rather the specifics of the TM4C line of products. So please, think about what you want to do, search around the net how things like that are generally done, and when you have a clear understanding of what you need to do (what kind of peripherals you need to achieve the desired input/output functions, etc etc), take a look at the TivaWare manual, examples and the specific datasheet for your TM4C processor. Once you have done that, you should be able to either do what you want, or post a more specific question that will allow the forum members to help you further.
Well how would you like to generate a sine wave? Is it with an external DAC?
Well, I don't know any papers from TI nor did I find any in a quick search.
But check this one, it explains how to use a DAC to generate music, I think the "2.1.2 Digital Sine waveform pattern preparation" is what interests you:
I never used the iqmath library but it should have something to get sine functions so you should be able to do what's described on that guide
Hi Luis, I am clearing remained link to this forum.. REading again this hard to impossible to understand question I got some very old concept from early PWM theory at time called chopper. It is more than 40Yr old.
Old PWM regulator where generating PWM from an analog comparator where a voltage was setting the PWM duty cycle and the other input was feed by a triangular wave, the output was a rectangular wave with duty cycle proportional to input voltage.
I suppose in emerging country where culture has not evolved these old concept are obscuring pure math method so it can match some of errant writing and the lot of similar delirant requests.
So to generate sine wave with PWM inverter a sine wave from a generator was feed to PWM controller, I feel this can be the source of this worst confusion.
SO modern table driven sine generation is far from understanding if this old culture is in place. I seen some thing of this on some design and documents are recent to use that.
Luis I wish all friend here be better.