From a8caf95cec88f722dd73ee8f298ffabd06e2139b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Thu, 15 Dec 2022 18:32:10 +0100 Subject: [PATCH] pio_1hz.py: Fix off-by-one cycle issue Fixes #55 --- pio/pio_1hz.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pio/pio_1hz.py b/pio/pio_1hz.py index f891a25..159fe66 100644 --- a/pio/pio_1hz.py +++ b/pio/pio_1hz.py @@ -15,9 +15,10 @@ def blink_1hz(): nop() [29] jmp(x_dec, "delay_high") - # Cycles: 1 + 7 + 32 * (30 + 1) = 1000 + # Cycles: 1 + 1 + 6 + 32 * (30 + 1) = 1000 + nop() set(pins, 0) - set(x, 31) [6] + set(x, 31) [5] label("delay_low") nop() [29] jmp(x_dec, "delay_low")