I'm having a bit of trouble with this pin. I'm able to get the PWM working and put it out on PB1 but for some reason it won't come out of PB0. I try to connect PB0 to the PWM by setting the top 2 bits of TCCR0A.
Also I've checked that PB0 works as an output pin by toggling it directly.
I must be missing something but I"m not sure what. Can yall tell from the initialization code?
// Input/Output Ports initialization // Port B initialization // Pull-up initialization PUEB=0x00; // Func3=In Func2=In Func1=Out Func0=Out // State3=T State2=T State1=0 State0=0 PORTB=0x00; DDRB=0x03; // Break Before Make Mode PORTB: Off PORTCR=0x00; // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: 1 MHz // Mode: fast 15 - top=OCR0A // Input Capture on Falling Edge // Input Capture Noise Canceler: On // OC0A output: connected // OC0B output: connected // Fast PWM mode Channel A (PB1) TCCR0A= 0xF3; TCCR0B=0x9A; TCNT0=0x0000; ICR0=0x0000; OCR0A=0xfff0; OCR0B=0x0fff;