Setup stack pointer and global interrup flag
This commit is contained in:
@@ -21,6 +21,15 @@ isr_stop_blink:
|
||||
reti ; Exit interrupt
|
||||
|
||||
main:
|
||||
; To compile on AtTiny25/45 comment out the SPH part
|
||||
; SPH is needed only on AtTiny85 which has >256b of SRAM
|
||||
ldi r16, lo8(RAMEND)
|
||||
out SPL, r0 ; Setup stack pointer LOW
|
||||
ldi r16, hi8(RAMEND)
|
||||
out SPH, r0 ; Setup stack pointer HIGH
|
||||
|
||||
sei ; Global interrupt flag
|
||||
|
||||
;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
|
||||
|
||||
Reference in New Issue
Block a user