Hello Ian
Thanks for taking interest in my post :smileyhappy:
Well actually, even a 64 byte LUT would be sufficient to get a passable Sinewave for me.
What i am doing in my Overflow interrupt is below
#define TIMER_START 0x49 //8MHz/2= 4MHZ = 250ns
#define Channel0_Start 0x24
#define TIMER_OVERFLOW 256 //256x250ns=64usec = 15625 Hz
interrupt 7 void TimerCH0 (void)
{
// Ack Timer
TPMSC_TOF =0;
TPMC0V=sinewave[iteration++];
if(iteration==256)iteration=0;
}
So now what is expected is that the Duty cycle is varied at each overflow to get me a 50Hz output wave.
The ADC input should come in picture if i have to vary the output frequency to say 100Hz or 25Hz or whatever is scaled by the ADC input.
Can you define a standard approach which i am not able to understand here?