Timer in a CTC mode

Z MAM wiki

Přejít na: navigace, hledání

Today our goal is to start LED diode blinking slowly not just under software loop control, but with the aid of hardware timer.

Very nice and descriptive step by step procedure of this is available on [1].

First, try it with the aid of timer only (registers TCNT1, TCCR1B, OCR1A and TIFR), then use interrupt to handle this task (registers TIMSK and SREG). After you will have working GCC code, try the same in assembler.

New instruction: sei

Osobní nástroje