Hi - I'm just trying to get a PWM waveform going. I have a ATMega328P (on an Arduino Nano) running at 16MHz. I've set OCR0A to various values to no avail - output PD6 just stays low, looking with an o'scope. See anything obviously stupid here?
void Timer_Setup(){ DDRD = PORTD6; // set PD6 as timer output TCCR0A |= ((1<<WGM00) | (1<<WGM01) | (1<<COM0A1)); // Fast PWM mode TCCR0B |= ((1<<CS00) | (1<<WGM02)); // no prescaler }
thanks! paul