Guys,
I've been fiddling with FastPWM on Tiny13A to control a brightness of LED, but I haven't got it yet...
Any setting or missing code here ?
TCCR0A|=(1<<WGM00)|(1<<WGM01)|(1<<COM0A1)|(1<<COM0A0); TCCR0B|=(1<<CS00); DDRB = 0x3F; void PWMOut(uint8_t out) { OCR0A=out; } void LED_0_brightness() { uint8_t b=0; for(b=0;b<255;b++) { //set brightness with PWM PWMOut(b); _delay_ms(1000); } }
The LED is just ON without fading as I expected....do I miss something here ?
Thanks