Driving 8x8 WS2812 panel
Since Z80 bit-bang the serial transmitter, it is possible to bit-bang WS2812 LED in parallel. WS2812 needs much higher data rate, so the high frequency WS2812 output may cause little or no spurious data to the serial port. Conversely, the normal serial traffic may not generate valid data write to WS2812. The biggest challenge is 25MHz Z80 is just not fast enough to drive WS2812; the “out (SerTx),a” instruction required to bit-bang the serial transmitter already uses 11 clocks which is 436nS at 25.175MHz and that's already the entire budget of pulse width for WS2812.
Interestingly, 3 consecutive “out (SerTx),a” instructions at 25.175MHz is very close to WS2812's 800KHz pulse code modulation where “one-high-two-low” is a '0' and “two-high-one-low” is a “1”. So if we execute 24 triplets of “out (SerTx),a”, it will have the correct timing to drive a WS2812 with the 3-byte color data. Now all we need is a self-modifing program that alters the instructions according to desired color values.
To drive a panel of 8×8 WS2812, the attached program has 1536 triplets of “out (SerTx),a” (64LED x 3 colors/LED x 8 bit/color = 1536) that are first initialized according to the desired color pattern (a tree with white star at its tip) and then jump to execute the modified program.