This is 4 days late and 1 LED short, but I did it by bit-banging 65816's MX output to drive 16x16 panel of WS2812B RGB LEDs. The program itself is 52 bytes, but the data table is 224 bytes. Should be possible to pack the table to reduce its size by a factor of 8.
I showed it to my wife of 39 years, and she said "Wow!". Now that's a success!
Bill
Code:
000000r 1 ;Use MX output to bit-bang WS2912B 16x16 matrix
000000r 1 ;CPU clock is 14.7MHz
000000r 1
000000r 1 .p816
000000r 1 .ORG $1000
001000 1
001000 1 18 CLC
001001 1 FB XCE ;switch to native mode
001002 1 WSstart:
001002 1 C2 30 REP #$30 ;drive MX low to reset WS2812
001004 1 .i16
001004 1 .a16
001004 1 A2 00 01 LDX #$100 ;drive low for 50uS to reset WS2812
001007 1 WSrst:
001007 1 CA DEX
001008 1 D0 FD BNE WSrst
00100A 1 WSshow:
00100A 1 BD 33 10 LDA Grn-1,x ;lookup table for green
00100D 1 20 18 10 JSR showWS
001010 1 E8 INX
001011 1 E0 E0 00 CPX #$e0
001014 1 D0 F4 BNE WSshow
001016 1 80 FE BRA * ;stop here
001018 1
001018 1 showWS:
001018 1 ;shorter version
001018 1 ;Send a byte of color data to WS2812
001018 1 ;1 is 12 clock high, 6 clock low
001018 1 ;0 is 6 clock high, 12 clock low
001018 1 ;reg Y and A are modified
001018 1 .i16
001018 1 .a16
001018 1 A0 18 00 LDY #24 ;each LED needs 8 bits of green, red, blue
00101B 1 29 00 FF AND #$ff00 ; only show green, red and blue are zero
00101E 1 showWSnew1:
00101E 1 0A ASL A ;msb first
00101F 1 E2 30 SEP #$30 ;first 6 clocks is always high
001021 1 90 09 BCC bitLo
001023 1 80 00 BRA *+2 ;3 clock to execute
001025 1 EA NOP
001026 1 88 DEY ;problem?: Y reg is 8-bit at this point
001027 1 C2 30 REP #$30
001029 1 D0 F3 BNE showWSnew1
00102B 1 60 RTS
00102C 1 bitLo:
00102C 1 C2 30 REP #$30
00102E 1 EA NOP
00102F 1 EA NOP
001030 1 88 DEY ;problem?: Y reg is 16-bit here
001031 1 D0 EB BNE showWSnew1
001033 1 60 RTS
001034 1 Grn:
001034 1 ; Green color table
001034 1 00 00 00 00 .byte 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0
001038 1 00 00 00 01
00103C 1 01 01 00 00
001044 1 00 00 00 00 .byte 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0
001048 1 00 00 01 01
00104C 1 01 00 00 00
001054 1 01 01 01 01 .byte 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
001058 1 01 01 01 01
00105C 1 01 01 01 01
001064 1 00 01 01 01 .byte 0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
001068 1 01 01 01 01
00106C 1 01 01 01 01
001074 1 00 00 00 00 .byte 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0
001078 1 01 01 01 01
00107C 1 01 01 01 01
001084 1 00 00 00 00 .byte 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0
001088 1 00 01 01 01
00108C 1 01 01 00 00
001094 1 00 01 01 01 .byte 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
001098 1 01 01 01 01
00109C 1 01 01 01 01
0010A4 1 00 00 01 01 .byte 0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0
0010A8 1 01 01 01 01
0010AC 1 01 01 01 01
0010B4 1 00 00 00 00 .byte 0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0
0010B8 1 00 01 01 01
0010BC 1 01 01 01 01
0010C4 1 00 00 00 00 .byte 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0
0010C8 1 00 00 01 01
0010CC 1 01 00 00 00
0010D4 1 00 00 00 00 .byte 0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0
0010D8 1 00 01 01 01
0010DC 1 01 01 01 01
0010E4 1 00 00 00 00 .byte 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0
0010E8 1 00 01 01 01
0010EC 1 01 01 00 00
0010F4 1 00 00 00 00 .byte 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0
0010F8 1 00 00 00 01
0010FC 1 01 01 00 00
001104 1 00 00 00 00 .byte 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
001108 1 00 00 00 01
00110C 1 00 00 00 00