; Interrupt for normal start/reset.ORG 0x00rjmp anf;Interrupt TCA Channel 0.ORG 0x12rjmp i_9anf:;TCA;Load adress on Yldi YL, 0x00ldi YH, 0x0A;store 0Fh on CTRLA for Enable and Prescaler 1024ldi r16, 0x0Fst Y, r16;store 10h on CTRLB for Compare 0 enableldi r16, 0x10std Y+0x01, r16;store 10h on INTCTRL to enable Interrupt Compare 0ldi r16, 0x10std Y+0x0A, r16;store 2000h on CMP0 ldi r16, 0x20std Y+0x29, r16ldi r16, 0x00std Y+0x28, r16;Data direction Port Eldi r16, 0xFFout DDRE, r16seie: rjmp ei_9:in r25, SREG ;invert LED state in r16, PORTE ldi r17, 4 eor r16, r17 out PORTE, r16 ;Reset Timer and Interrupt ldi r16, 0x08 std Y+0x05, r16 out SREG, r25reti
Could my arduino get bricked by setting the clock to 16MHz and setting a wrong fuse and if so, which fuse.
did I set up the Interrupts correctly?
Your ISR doesn't preserve any of the registers that it uses, even though they're also used in the main loop. That's a bug...
e: rjmp e