I agree with GMX. See this example from the RP2040 datasheet.
https://datasheets.raspberrypi.com/rp20 ... asheet.pdf page 317
Skip the extra delay if the bit was 0
https://datasheets.raspberrypi.com/rp20 ... asheet.pdf page 317
Skip the extra delay if the bit was 0
Code:
1 .program ws2812_led23 public entry_point:4 pull5 set x, 23 ; Loop over 24 bits6 bitloop:7 set pins, 1 ; Drive pin high8 out y, 1 [5] ; Shift 1 bit out, and write it to y9 jmp !y skip ; Skip the extra delay if the bit was 010 nop [5]11 skip:12 set pins, 0 [5]13 jmp x-- bitloop ; Jump if x nonzero, and decrement x14 jmp entry_pointStatistics: Posted by Gustavo_Murta — Wed Oct 01, 2025 2:49 am