mayankatacadence
Newbie level 6
multiple pwm
Hi,
I need to generate 3 PWM waveforms from TinyAVR which may be of any shape and at any phase angle from each other. I am using Win-AVR C compiler.
I have been able to generate the three PWM waveforms using the software routine and timer interrupts. I am also able to create the shape of the waveform using look-up table whose values are read with second timer interrupt. Now, how do I create the phase shift?
I want to know how I can create a data structure/logic that will read the values stored in a array in a loop? So if one waveform is created by reading values stored in locations 1,2,3,4,5 the second should be created by reading 3,4,5,1,2 and third by reading the array as 5,1,2,3,4.
Any ideas how I can do so?
Thanks
Mayank
Hi,
I need to generate 3 PWM waveforms from TinyAVR which may be of any shape and at any phase angle from each other. I am using Win-AVR C compiler.
I have been able to generate the three PWM waveforms using the software routine and timer interrupts. I am also able to create the shape of the waveform using look-up table whose values are read with second timer interrupt. Now, how do I create the phase shift?
I want to know how I can create a data structure/logic that will read the values stored in a array in a loop? So if one waveform is created by reading values stored in locations 1,2,3,4,5 the second should be created by reading 3,4,5,1,2 and third by reading the array as 5,1,2,3,4.
Any ideas how I can do so?
Thanks
Mayank