Skip to content

Commit d99f95f

Browse files
committed
pio_1hz.py: Fix off-by-one cycle issue
Fixes raspberrypi#55
1 parent c82971b commit d99f95f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pio/pio_1hz.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ def blink_1hz():
1515
nop() [29]
1616
jmp(x_dec, "delay_high")
1717

18-
# Cycles: 1 + 7 + 32 * (30 + 1) = 1000
18+
# Cycles: 1 + 1 + 6 + 32 * (30 + 1) = 1000
19+
nop() [29]
1920
set(pins, 0)
20-
set(x, 31) [6]
21+
set(x, 31) [5]
2122
label("delay_low")
2223
nop() [29]
2324
jmp(x_dec, "delay_low")

0 commit comments

Comments
 (0)