I've recently been moving from Arduino environments to AVR, and I'm programming a Tiny84 with the Sparkfun USBTiny programmer and Atmel Studio 7. For the life of me, I cannot figure out why I can't output a PWM signal.

I've tried so many different example codes, scoured the datasheet and set my own TCCR0A and TCCR0B bits to set the modes, but every program so far has either a) not lit the LED at all or b) lit the LED at full brightness, ie does not correlate to OCR0A at all. The LED MOSFET is on PB2 (OCR0A, right?) and works fine with a simple blink function. The code I'm trying currently: (this one outputs full brightness all the time. I've even tested with a normal 5V led on the output to make sure it wasn't the MOSFET having an extremely slow recovery time)

Hi...That AVR model series is pretty new. On the surface, 16-bit timers 1 and 2 look pretty much like any other "normal" AVR8 16-bit timer. Same modes, capabilities.The only addition I see at first glance is that instead of using the designated pin on the AVR for e.g. OC1A, you have the ability to map it to one of four possibilities using the TOCP registers.