1- WS281X Cube Controller
2- ======================
1+ NeoPixel LED Controller
2+ =======================
33
4- WS281X Cube Controller based on MAX10 FPGA.
4+ NeoPixel LED Controller based on MAX10 FPGA.
55
66## Main Features
77
8- * 4-wire SPI interface
9- * High refresh rate (up to 500fps@8x8x8)
10- * 8 parallel output data lines (64 LEDs per line )
11- * Configurable waveform generator (T0H, T0L, T1H, T1L)
12- * Configurable LED serial connection sequence (address linked list )
8+ * 4-wire SPI interface (SCLK, MOSI, CS, DC)
9+ * High refresh rate (500fps@8x8x8, 125fps@16x16x16 )
10+ * 16 parallel output channels (up to 256 LEDs per channel )
11+ * Each output channel has a programmable circular linked list
12+ * Each output channel has a programmable waveform generator (T0H, T0L, T1H, T1L )
1313
1414## Pinout
1515
16- | Input Port | FPGA Pin | Output Port | FPGA Pin |
17- | ---------: | :------- | :--------------: | :------: |
18- | clk_i | PIN_J5 | ws281x_code_o [ 7] | PIN_R5 |
19- | rst_n_i | PIN_R9 | ws281x_code_o [ 6] | PIN_L7 |
20- | dc_i | PIN_P15 | ws281x_code_o [ 5] | PIN_P4 |
21- | spi_sclk_i | PIN_R14 | ws281x_code_o [ 4] | PIN_L6 |
22- | spi_mosi_i | PIN_P12 | ws281x_code_o [ 3] | PIN_R3 |
23- | spi_cs_n_i | PIN_R11 | ws281x_code_o [ 2] | PIN_M5 |
24- | - | | ws281x_code_o [ 1] | PIN_P3 |
25- | - | | ws281x_code_o [ 0] | PIN_M4 |
16+ | Input Port | FPGA Pin | Output Port | FPGA Pin | Output Port | FPGA Pin |
17+ | ---------: | :------- | :----------------: | :------: | :----------------- : | :------: |
18+ | clk_i | PIN_J5 | neopixel_code_o [ 7] | PIN_R5 | neopixel_code_o [ 15 ] | PIN_C8 |
19+ | rst_n_i | PIN_R9 | neopixel_code_o [ 6] | PIN_L7 | neopixel_code_o [ 14 ] | PIN_B7 |
20+ | dc_i | PIN_P15 | neopixel_code_o [ 5] | PIN_P4 | neopixel_code_o [ 13 ] | PIN_D7 |
21+ | spi_sclk_i | PIN_R14 | neopixel_code_o [ 4] | PIN_L6 | neopixel_code_o [ 12 ] | PIN_E7 |
22+ | spi_mosi_i | PIN_P12 | neopixel_code_o [ 3] | PIN_R3 | neopixel_code_o [ 11 ] | PIN_B6 |
23+ | spi_cs_n_i | PIN_R11 | neopixel_code_o [ 2] | PIN_M5 | neopixel_code_o [ 10 ] | PIN_A7 |
24+ | - | | neopixel_code_o [ 1] | PIN_P3 | neopixel_code_o [ 9 ] | PIN_A5 |
25+ | - | | neopixel_code_o [ 0] | PIN_M4 | neopixel_code_o [ 8 ] | PIN_B4 |
2626
27- * SPI slave mode: MODE 0 , CPOL=0, CPHA=0, MSB first
27+ * SPI slave mode: F_MAX=33MHz , CPOL=0, CPHA=0, MSB first
2828
2929## Commands
3030
@@ -37,16 +37,15 @@ WS281X Cube Controller based on MAX10 FPGA.
3737| 2nd Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
3838| 3rd Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
3939| 4th Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
40+ | 5th Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
41+ | 6th Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
4042
41- * 1st Param: T0H time, range: 1-255, unit: 10 ns
42- * 2nd Param: T0L time, range: 1-255, unit: 10 ns
43- * 3rd Param: T1H time, range: 1-255, unit: 10 ns
44- * 4th Param: T1L time, range: 1-255, unit: 10 ns
45-
46- Limits:
47-
48- * T0H + T0L <= 257 = 2570 ns = 2.57 us
49- * T1H + T1L <= 257 = 2570 ns = 2.57 us
43+ * 1st Param: T0H time (10 ns), range: 0 - 255
44+ * 2nd Param: T0L time (10 ns), range: 0 - 255
45+ * 3rd Param: T1H time (10 ns), range: 0 - 255
46+ * 4th Param: T1L time (10 ns), range: 0 - 255
47+ * 5th Param: channel length, range: 0 - 255
48+ * 6th Param: channel count, range: 0 - 15
5049
5150### ADDR_WR
5251
@@ -57,15 +56,12 @@ Limits:
5756| ... | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
5857| Nth Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
5958
60- * 1st Param: 2nd LED address, range: 0-63
61- * 2nd Param: 3rd LED address, range: 0-63
62- * 3rd Param: 4th LED address, range: 0-63
59+ * 1st Param: channel 0, the next pointer of the 1st color data, range: 0 - 255
60+ * 2nd Param: channel 0, the next pointer of the 2nd color data, range: 0 - 255
6361* ...
64- * Nth Param: 1st LED address, range: 0-63
65-
66- * N = 64
62+ * Nth Param: ...
6763
68- * These configurations will be applied to all 8 layers
64+ * N_MAX = 256 x 16 = 4096
6965
7066### DATA_WR
7167
@@ -76,26 +72,21 @@ Limits:
7672| ... | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
7773| Nth Param | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |
7874
79- * 1st Param: 1st LED color byte 2, range: 0-255
80- * 2nd Param: 1st LED color byte 1, range: 0-255
81- * 3rd Param: 1st LED color byte 0, range: 0-255
82- * 4th Param: 2nd LED color byte 2, range: 0-255
83- * 5th Param: 2nd LED color byte 1, range: 0-255
84- * 6th Param: 2nd LED color byte 0, range: 0-255
75+ * 1st Param: channel 0, the 1st color data, byte 2, range: 0 - 255
76+ * 2nd Param: channel 0, the 1st color data, byte 1, range: 0 - 255
77+ * 3rd Param: channel 0, the 1st color data, byte 0, range: 0 - 255
78+ * 4th Param: channel 0, the 2nd color data, byte 2, range: 0 - 255
8579* ...
8680* Nth Param: ...
8781
88- * N = 8 x 8 x 8 x 3 = 1536
89-
90- * Layer data order: layer 7 first (layer 7 - layer 0)
91- * Color byte order: high byte first (byte 2 - byte 0)
82+ * N_MAX = 256 x 16 x 3 = 12288
9283
9384## Preparing
9485
9586### Obtain the source
9687
9788```
98- git clone https://github.com/redchenjs/ws281x_cube_controller_max10 .git
89+ git clone https://github.com/redchenjs/neopixel_led_controller_max10 .git
9990```
10091
10192### Update an existing repository
0 commit comments