From: Tobias Girstmair Date: Tue, 18 Dec 2018 14:11:30 +0000 (+0100) Subject: fix jitter X-Git-Tag: attiny9~6 X-Git-Url: https://git.gir.st/Chiptunes.git/commitdiff_plain/fef4b742c989e0f83c4f78a537ef21fc8db4bd35?ds=sidebyside fix jitter yeah...don't rjmp into interrupt instead of main loop m( --- diff --git a/foo.S b/foo.S index 054a32b..566d9fc 100644 --- a/foo.S +++ b/foo.S @@ -271,7 +271,6 @@ main: ; setup routine SEI #undef one #undef zero - RJMP sample loop: SLEEP ; wait for interrupt @@ -280,7 +279,6 @@ loop: sample: ; potential TODO: softcounter in r25 to only update duty cicle every n iterations ; potential TODO: save/restore status register (SREG=0x3f) (only if something in mainloop) - ; TODO: there is substantial jitter in the tim0_ovf interval -- are we clearing the interrupt flag correctly? OUT OCR0AL, acc ; start by outputting a sample, because routine has variable runtime SBI PORTB, 2 ; to measure runtime