Component: RGB LED WS2801 (LEDs): Difference between revisions
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 113: | Line 113: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawCuboid3D''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 3D cuboid onto the LEDs | | colspan="2" | Draws a basic 3D cuboid onto the LEDs | ||
| Line 177: | Line 177: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawLine2D''' | ||
|- | |- | ||
| colspan="2" | Draws a line on a 2D array of LEDs | | colspan="2" | Draws a line on a 2D array of LEDs | ||
| Line 226: | Line 226: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawLine3D''' | ||
|- | |- | ||
| colspan="2" | Draws a line on a 3D array of LEDs | | colspan="2" | Draws a line on a 3D array of LEDs | ||
| Line 285: | Line 285: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawRectangle2D''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 2D rectangle onto the LEDs | | colspan="2" | Draws a basic 2D rectangle onto the LEDs | ||
| Line 339: | Line 339: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetLEDColour''' | ||
|- | |- | ||
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. | | colspan="2" | Sets the colour of a single LED in RAM as a 1D array. | ||
| Line 363: | Line 363: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetLEDIndex2D''' | ||
|- | |- | ||
| colspan="2" | Sets the index of a single LED in RAM as a 2D array. | | colspan="2" | Sets the index of a single LED in RAM as a 2D array. | ||
| Line 387: | Line 387: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetLEDIndex3D''' | ||
|- | |- | ||
| colspan="2" | Gets the index of a single LED in RAM as a 3D array. | | colspan="2" | Gets the index of a single LED in RAM as a 3D array. | ||
| Line 416: | Line 416: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the WS2801 ICs in the chain. | | colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the WS2801 ICs in the chain. | ||
| Line 430: | Line 430: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Refresh''' | ||
|- | |- | ||
| colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM | | colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM | ||
| Line 444: | Line 444: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetAllLEDColour''' | ||
|- | |- | ||
| colspan="2" | Sets the colour of all the LEDs in RAM | | colspan="2" | Sets the colour of all the LEDs in RAM | ||
| Line 473: | Line 473: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetBrightness''' | ||
|- | |- | ||
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments. | | colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments. | ||
| Line 492: | Line 492: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetBrightnessByte''' | ||
|- | |- | ||
| colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments. | | colspan="2" | Allows the output colour brightness of the LEDs to be scaled down. For example to save current usage or to reduce brightness in dark environments. | ||
| Line 511: | Line 511: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetLEDColour''' | ||
|- | |- | ||
| colspan="2" | Sets the colour of a single LED in RAM as a 1D array. | | colspan="2" | Sets the colour of a single LED in RAM as a 1D array. | ||
| Line 545: | Line 545: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ShiftLEDs1D''' | ||
|- | |- | ||
| colspan="2" | Shifts the LED colours in 1D and wraps | | colspan="2" | Shifts the LED colours in 1D and wraps | ||
| Line 569: | Line 569: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ShiftLEDs2D''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** | | colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** | ||
| Line 598: | Line 598: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ShiftLEDs3D''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** | | colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** | ||
| Line 633: | Line 633: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | LED Properties | ||
|- | |- | ||
|- | |- | ||
| Line 656: | Line 656: | ||
| colspan="2" | X Spacing Between LEDs on the Panel | | colspan="2" | X Spacing Between LEDs on the Panel | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 665: | Line 665: | ||
| colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O | | colspan="2" | Sets the output mode used to drive the data to the LEDs Bit Banged Mode = Allows Any I/O Pin but may be slower SPI Mode = Fixed SPI Peripheral Pins but may be faster - Note that the SPI MISO pin will not be available for general I/O | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connection Properties | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 2.0 |
| Category | LEDs |
RGB LED WS2801 component
A simple chained RGB LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Allows RGB LEDs to be driven with full 24-bit colour depth. Allows single chains, 2D arrays and 3D cube formations to be simulated. Supports Bit Banged or SPI peripheral based data modes.
Detailed description
1D Configuration
In the 1D configuration each LED simply follows on from the last in a chain.
2D Configuration
In the 2D configuration each LED follows on from the last in a chain which travels back and forth through the columns a row at a time.
3D Configuration
In the 3D configuration each layer follows the 2D configuration with each layer then following on by mirroring the layer below. First layer connections are shown in Red and second layer connections are shown in Blue.
3V3 Microcontrollers
Note you may have to voltage shift the micro controller control pins to meet the 0.8 * VDD minimum requirement. E.g. if VDD is 5V then the input voltage needs to be at least 4V.
A simple buffer IC could be used to do the voltage shifting.
Examples
RGB Mood Light
A simple example using three potentiometers to set the individual Red, Green and Blue channels of the LED colour.
MoodLight
Animated Light
A simple example which picks a random colour assigns it to the first LED, then shifts and repeats.
AnimatedLightStrip
Animated Light Cascade
A simple example which picks a random colour assigns it to the first LED, then shifts and repeats.
AnimatedLightCascade
Macro reference
DrawCuboid3D
DrawLine2D
| DrawLine2D | |
| Draws a line on a 2D array of LEDs | |
| X1 | |
| Y1 | |
| X2 | |
| Y2 | |
| R | |
| G | |
| B | |
| Return | |
DrawLine3D
| DrawLine3D | |
| Draws a line on a 3D array of LEDs | |
| X1 | |
| Y1 | |
| Z1 | |
| X2 | |
| Y2 | |
| Z2 | |
| R | |
| G | |
| B | |
| Return | |
DrawRectangle2D
GetLEDColour
| GetLEDColour | |
| Sets the colour of a single LED in RAM as a 1D array. | |
| LED | |
| LED to change the colour / Range: 0 to (LED Count - 1) | |
| ColIdx | |
| 0 = R, 1 = G, 2 = B | |
| Return | |
GetLEDIndex2D
GetLEDIndex3D
Initialise
| Initialise | |
| Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the WS2801 ICs in the chain. | |
| Return | |
Refresh
| Refresh | |
| Clocks out the current colour data to the LEDs from the values stored in RAM | |
| Return | |
SetAllLEDColour
| SetAllLEDColour | |
| Sets the colour of all the LEDs in RAM | |
| R | |
| G | |
| B | |
| Return | |
SetBrightness
SetBrightnessByte
SetLEDColour
| SetLEDColour | |
| Sets the colour of a single LED in RAM as a 1D array. | |
| LED | |
| LED to change the colour / Range: 0 to (LED Count - 1) | |
| R | |
| G | |
| B | |
| Return | |
ShiftLEDs1D
| ShiftLEDs1D | |
| Shifts the LED colours in 1D and wraps | |
| Direction | |
| 0 = Forwards, 1 = Backwards | |
| DataMode | |
| 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear | |
| Return | |
ShiftLEDs2D
ShiftLEDs3D
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LED_WS2801.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LED_WS2801.fcfx


