I started with
Code: Select all
@rp2.asm_pio(out_init=(rp2.PIO.OUT_HIGH,)*6, out_shiftdir=rp2.PIO.SHIFT_RIGHT)
def prog0():
pull() # just hang
rp2.StateMachine(0, prog0, freq=2000, out_base=machine.Pin(4)).active(1)
I then moved on to
Code: Select all
@rp2.asm_pio(out_init=(rp2.PIO.OUT_HIGH,)*6, out_shiftdir=rp2.PIO.SHIFT_RIGHT)
def prog1():
mov(osr, 0xffffffff) # fill osr with all 1s
out(pins, 6) # output the 6 least-significant bits of osr to our 6 pins
pull()
rp2.StateMachine(0, prog1, freq=2000, out_base=machine.Pin(4)).active(1)
Why is that? Did I misunderstand how the OUT instruction works or how it interacts with the output shift register or out IO mapping?
Thanks!