Closed luiswirth closed 2 years ago
Why does the nop have a delay of T2 - 2 instead of T2 - 1?
nop
T2 - 2
T2 - 1
https://github.com/ithinuel/ws2812-pio-rs/blob/37ade6dd937c62c2b9c0b0fe212c291fe5f33317/src/lib.rs#L107
Usually it's T - 1 because the instruction itself uses a cycle and then you want to wait T - 1 more cycles.
T - 1
The offical raspberry pi pio ws2812 example also uses T2 - 1.
https://github.com/raspberrypi/pico-examples/blob/afd1d2008f3fb3fa7a837dd1bdf17a6fecbc57fe/pio/ws2812/ws2812.pio#L25
It is likely a typo. You're welcome to open a PR to fix that :)
Why does the
nop
have a delay ofT2 - 2
instead ofT2 - 1
?https://github.com/ithinuel/ws2812-pio-rs/blob/37ade6dd937c62c2b9c0b0fe212c291fe5f33317/src/lib.rs#L107
Usually it's
T - 1
because the instruction itself uses a cycle and then you want to waitT - 1
more cycles.The offical raspberry pi pio ws2812 example also uses
T2 - 1
.https://github.com/raspberrypi/pico-examples/blob/afd1d2008f3fb3fa7a837dd1bdf17a6fecbc57fe/pio/ws2812/ws2812.pio#L25