Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
How can you get a sine wave out of a single bit... The mega hasn't got a dac... Are you trying to produce the sine wave externally?
i am using the pwm technique for generating sine wave........ya i want it externally......actually i want to make a sine wave inverter i know the programming of at mega but i some where lack in sine wave generation by pwm technique please let me know what should i do for that
index = index + step
if index >= numEntriesIn(pwm_lookup) then index = index - numEntriesIn(pwm_lookup)
setOutput(pwm_lookup[index])
uint16_t counter;
uint16_t step;
int8_t lookup[256];
update_pwm()
{
counter = counter + step;
PWM_VALUE = lookup[counter>>8];
}
Please tell me the calculation behind frequency adjustment a mathematical formula or something