Update setup operations

This commit is contained in:
2026-01-09 11:42:18 +01:00
parent 7c340694cf
commit eb2bcfa533
+11 -6
View File
@@ -41,16 +41,21 @@ main:
ldi r16, hi8(RAMEND)
out SPH, r0 ; Setup stack pointer HIGH
sei ; Global interrupt flag
; PB0 is also second button to use as start stop continue with int0 interrupt
; when playing one press is pause, another press is continue, a long press is always stop
cbi DDRB, PB1 ; Set EC11 clockwise on PB5 as input
cbi DDRB, PB5 ; Set EC11 counter-clockwise on PB3 as input
cbi DDRB, PB2 ; Set EC11 button (555 square wave) on PB2 as input
sbi PORTB, PB2 ; Enable pull-up on PB2
;cbi DDRB, PB1 ; Set EC11 clockwise on PB5 as input
;cbi DDRB, PB2 ; Set EC11 counter-clockwise on PB3 as input
;cbi DDRB, PB5 ; Set EC11 button (555 square wave) on PB4 as input
sbi DDRB, PB0 ; Set led on PB0 as output
;ldi r26, 60 ; Default BPM //TODO: save to eeprom not register, on runtime also ldi on r24 register
clr r0
ldi r1, 1
rcall timer0_set
;rcall timer1_set
rcall timer1_set
; loop: calculate tempo (high priority!) and save, led blinking, segment led writing