Skip to content

Commit

Permalink
pio_1hz.py: Fix off-by-one cycle issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stigbjorlykke committed Dec 15, 2022
1 parent c82971b commit d99f95f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pio/pio_1hz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() [29]
set(pins, 0)
set(x, 31) [6]
set(x, 31) [5]
label("delay_low")
nop() [29]
jmp(x_dec, "delay_low")
Expand Down

0 comments on commit d99f95f

Please sign in to comment.