Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problems in AVR C combining ADC readings to generate PWM output
- OCR2A = (sine_0 + sine_1) & 0xFF;
- uint8_t sine_0 = (pgm_read_byte(&sinewave_data[sample_0]) >> 5) * (adc_readings[1] >> 5);
- uint8_t sine_1 = (pgm_read_byte(&sinewave_data[sample_1]) >> 5) * (adc_readings[2] >> 5);
- OCR2A = (sine_0 >> 1) + (sine_1 >> 1);
Add Comment
Please, Sign In to add comment