Move COM0A0 setup to led.inc
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
; Timer0 is static and used for the led
|
; Timer0 is static and used for the led
|
||||||
timer0_set:
|
timer0_set:
|
||||||
ldi r16, (1 << WGM01) ; Load 00000010 to register (bit 1=CTC)
|
ldi r16, (1 << WGM01) ; Load 00000010 to register (bit 1=CTC)
|
||||||
out TCCR0A, r16 ; On T/C Control Register A, enable CTC and COM0A0
|
out TCCR0A, r16 ; On T/C Control Register A, enable CTC and
|
||||||
|
|
||||||
ldi r16, 244 ; Load counter target limit value (ticks)
|
ldi r16, 244 ; Load counter target limit value (ticks)
|
||||||
out OCR0A, r16 ; Compare target to current counter
|
out OCR0A, r16 ; Compare target to current counter
|
||||||
|
|||||||
Reference in New Issue
Block a user