Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <avr/io.h>
- #include <avr/interrupt.h>
- int main (void)
- {
- DDRD |= _BV(6);
- OCR0A = 16; //PWM speed (percentage)
- //TCCR0B |= _BV(CS00) | _BV(CS02); prescaler 1024
- TCCR0B |= _BV(CS01); //prescaler 8
- TCCR0A |= _BV(WGM00) | _BV(WGM01) | _BV(COM0A1);
- for (;;);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement