Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • You can have the timer toggle the led, instead of doing it yourself (by using the COM1A1/COM1B1 bits in the TCCR1A register. To set the maximum value of the timer from 65535, set the timer to CTC mode, and set OCR1A to 1 (or maybe 0). If you want to do software PWM, just use while(true){PORTB ^= (1 << 0);}. Commented Feb 24, 2017 at 16:30