I'm trying to generate a 1Mhz sinewave using a tiny45 with its internal oscialltor and PLL.
I'm following Atmel's application note 131 and they say to update the timer OCR with the next value on the lookup.
I know how to build a lookup, but I don't know if it will be appropriated for the job since because I always need positive values and the one I was thinking will have negative values.
int8_t lookup; float j,inc = (flota)(M_PI*2)/(float)256; int i; for (i=0;i<256;i++,j+=inc) lookup[i]=sin(j);
I also didn't understand how the lookup value inserted in the OCR will influence the PWM to achieve the wanted results.
Can someone clarify me a little bit this method of sinewave generation?
With my best regards,