|
|
| (13 intermediate revisions by 2 users not shown) |
| Line 15: |
Line 15: |
| A simple chained RGBW LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Compatible with the SK6812 RGBW Type Controller ICs. Allows RGBW LEDs to be driven with full 24-bit colour depth plus 8-bit white channel. Allows single chains, 2D arrays and 3D cube formations to be simulated. Requires a high speed microcontroller to generate the critical timings to drive the device. | | A simple chained RGBW LED controller IC allowing multiple LEDs to be controlled using a serial data stream. Compatible with the SK6812 RGBW Type Controller ICs. Allows RGBW LEDs to be driven with full 24-bit colour depth plus 8-bit white channel. Allows single chains, 2D arrays and 3D cube formations to be simulated. Requires a high speed microcontroller to generate the critical timings to drive the device. |
|
| |
|
| ==Component Source Code== | | ==Detailed description== |
| | |
| | |
| | |
| | |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LED_SK6812RGBW.fcfx FC_Comp_Source_LED_SK6812RGBW.fcfx]
| |
|
| |
|
| ==Detailed description==
| |
|
| |
|
|
| |
|
| Line 42: |
Line 44: |
|
| |
|
| ==Examples== | | ==Examples== |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 80: |
Line 88: |
| [http://led.linear1.org/1led.wiz LED Resistor Calculator Tool] | | [http://led.linear1.org/1led.wiz LED Resistor Calculator Tool] |
|
| |
|
| ==Macro reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | Scaler
| |
| |-
| |
| | colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour'''
| |
| |-
| |
| | colspan="2" | Sets the colour of a single LED in RAM as a 1D array.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | LED
| |
| |-
| |
| | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ColIdx
| |
| |-
| |
| | colspan="2" | 0 = Red, 1 = Green, 2 = Blue, 3 = White
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputLow'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | |
| | |
| | |
| | ==Macro reference== |
| | |
| | ===Delay_T0H=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightnessByte''' | | | width="90%" class="mtx-class-macrohead" | '''Delay_T0H''' |
| |- | | |- |
| | 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" | |
| |- | | |- |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Scaler
| |
| |-
| |
| | colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 154: |
Line 114: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Delay_T0L=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T0L''' | | | width="90%" class="mtx-class-macrohead" | '''Delay_T0L''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 167: |
Line 128: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Delay_T1H=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D''' | | | width="90%" class="mtx-class-macrohead" | '''Delay_T1H''' |
| |- | | |- |
| | colspan="2" | Draws a line on a 2D array of LEDs | | | colspan="2" | |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X1
| |
| |-
| |
| | colspan="2" | Start X Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y1
| |
| |-
| |
| | colspan="2" | Start Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" | End X Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" | End Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" | Red colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" | Green colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |- | | |- |
| | colspan="2" | Blue colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White colour channel
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 220: |
Line 142: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Delay_T1L=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputHigh''' | | | width="90%" class="mtx-class-macrohead" | '''Delay_T1L''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 233: |
Line 156: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===DrawCuboid3D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour''' | | | width="90%" class="mtx-class-macrohead" | '''DrawCuboid3D''' |
| |- | | |- |
| | colspan="2" | Sets the colour of a single LED in RAM as a 1D array. | | | colspan="2" | Draws a basic 3D cuboid onto the LEDs |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | LED | | | width="90%" | X1 |
| |- | | |- |
| | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) | | | colspan="2" | Start X pixel coordinate |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | R | | | width="90%" | Y1 |
| |- | | |- |
| | colspan="2" | Red Colour Channel | | | colspan="2" | Start Y pixel coordinate |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | G | | | width="90%" | Z1 |
| |- | | |- |
| | colspan="2" | Green Colour Channel | | | colspan="2" | Start Z pixel coordinate |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | B | | | width="90%" | X2 |
| |- | | |- |
| | colspan="2" | Blue Colour Channel | | | colspan="2" | End X pixel coordinate |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | W | | | width="90%" | Y2 |
| |- | | |- |
| | colspan="2" | White Colour Channel | | | colspan="2" | End Y pixel coordinate |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | Z2 |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | End Z pixel coordinate |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour'''
| |
| |- | | |- |
| | colspan="2" | Sets the colour of all the LEDs in RAM | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | DrawStyle |
| |- | | |- |
| | | colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| Line 292: |
Line 213: |
| | width="90%" | B | | | width="90%" | B |
| |- | | |- |
| | colspan="2" | Blue Colour Channel | | | colspan="2" | White Colour Channel |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | W | | | width="90%" | W |
| |- | | |- |
| | colspan="2" | White colour channel | | | colspan="2" | White Colour Channel |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 304: |
Line 225: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===DrawLine2D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T0H''' | | | width="90%" class="mtx-class-macrohead" | '''DrawLine2D''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Draws a line on a 2D array of LEDs |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | X1 |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | Start X Coordinate |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T1L'''
| |
| |- | | |- |
| | colspan="2" | | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" | Y1 |
| |- | | |- |
| | | colspan="2" | Start Y Coordinate |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | X2 |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | End X Coordinate |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh'''
| |
| |- | | |- |
| | colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" | Y2 |
| |- | | |- |
| | | colspan="2" | End Y Coordinate |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | R |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | Red colour channel |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
| |
| |- | | |- |
| | colspan="2" | Shifts the LED colours in 1D and wraps | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | G |
| |- | | |- |
| | | colspan="2" | Green colour channel |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Direction | | | width="90%" | B |
| |- | | |- |
| | colspan="2" | 0 = Forwards, 1 = Backwards | | | colspan="2" | Blue colour channel |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DataMode | | | width="90%" | W |
| |- | | |- |
| | colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear | | | colspan="2" | White colour channel |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 366: |
Line 279: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===DrawLine3D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D''' | | | 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 429: |
Line 343: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===DrawRectangle2D=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T1H''' | |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| |-
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="90%" class="mtx-class-macrohead" | '''DrawRectangle2D''' |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D''' | |
| |-
| |
| | colspan="2" | Sets the index of a single LED in RAM as a 2D array.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X
| |
| |-
| |
| | colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y
| |
| |-
| |
| | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
| |
| |- | | |- |
| | colspan="2" | Draws a basic 2D rectangle onto the LEDs | | | colspan="2" | Draws a basic 2D rectangle onto the LEDs |
| Line 523: |
Line 402: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetLEDColour=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D''' | | | width="90%" class="mtx-class-macrohead" | '''GetLEDColour''' |
| |- | | |- |
| | colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable*** | | | colspan="2" | Sets the colour of a single LED in RAM as a 1D array. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | X | | | width="90%" | LED |
| |- | | |- |
| | colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift | | | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | Y
| |
| |-
| |
| | colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DataMode | | | width="90%" | ColIdx |
| |- | | |- |
| | colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear | | | colspan="2" | 0 = Red, 1 = Green, 2 = Blue, 3 = White |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetLEDIndex2D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D''' | | | width="90%" class="mtx-class-macrohead" | '''GetLEDIndex2D''' |
| |- | | |- |
| | colspan="2" | Gets the index of a single LED in RAM as a 3D array. | | | colspan="2" | Sets the index of a single LED in RAM as a 2D array. |
| |- | | |- |
| |- | | |- |
| Line 568: |
Line 444: |
| |- | | |- |
| | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) | | | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Z
| |
| |-
| |
| | colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1)
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| Line 579: |
Line 450: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetLEDIndex3D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D''' | | | width="90%" class="mtx-class-macrohead" | '''GetLEDIndex3D''' |
| |- | | |- |
| | colspan="2" | Draws a basic 3D cuboid onto the LEDs | | | colspan="2" | Gets the index of a single LED in RAM as a 3D array. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | X1
| |
| |-
| |
| | colspan="2" | Start X pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Y1
| |
| |-
| |
| | colspan="2" | Start Y pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Z1
| |
| |-
| |
| | colspan="2" | Start Z pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" | End X pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" | End Y pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Z2
| |
| |-
| |
| | colspan="2" | End Z pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DrawStyle
| |
| |-
| |
| | colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" | Red Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" | Green Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the LED ICs in the chain.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs3D'''
| |
| |-
| |
| | colspan="2" | Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable***
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | X | | | width="90%" | X |
| |- | | |- |
| | colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift | | | colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1) |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | Y | | | width="90%" | Y |
| |- | | |- |
| | colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift | | | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1) |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | Z | | | width="90%" | Z |
| |- | | |- |
| | colspan="2" | Number of pixels to shift the display -1 to 1 / 0 = No Shift | | | colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1) |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | DataMode
| |
| |-
| |
| | colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| | | ===Initialise=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | 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 LED ICs in the chain. |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Controller IC
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | LED Controller
| |
| |-
| |
| | colspan="2" | Allows the user to select which LED controller IC they are using. The different controller ICs all work the same way but have different timing characteristics.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Data Order
| |
| |-
| |
| | colspan="2" | Configures the order the colour data is clocked out to the LEDs
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Reset Time (uS)
| |
| |-
| |
| | colspan="2" | Blanking reset period to reset the LED shift chain and start from the beginning
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | T0H (uS)
| |
| |-
| |
| | colspan="2" | Logic 0 high time in microseconds
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | T0L (uS)
| |
| |-
| |
| | colspan="2" | Logic 0 low time in microseconds
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | T1H (uS)
| |
| |-
| |
| | colspan="2" | Logic 1 high time in microseconds
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | T1L (uS)
| |
| |-
| |
| | colspan="2" | Logic 1 low time in microseconds
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | LED Arrangement
| |
| |-
| |
| | colspan="2" | Controls the arrangement of the LEDs on the panel. 1D - Creates a straight line of LEDs 2D - Creates an X by Y Array of LEDs 3D - Creates an X by Y by Z Array of LEDs
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | LED Count
| |
| |-
| |
| | colspan="2" | Total number of LEDs in the design
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Column Spacing
| |
| |-
| |
| | colspan="2" | X Spacing Between LEDs on the Panel
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | Data Pin
| |
| |-
| |
| | colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS821x IC.
| |
| |}==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | Scaler
| |
| |-
| |
| | colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 789: |
Line 493: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===OutputHigh=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDColour''' | |
| |-
| |
| | colspan="2" | Sets the colour of a single LED in RAM as a 1D array.
| |
| |- | | |- |
| |-
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | | width="90%" class="mtx-class-macrohead" | '''OutputHigh''' |
| | width="90%" | LED
| |
| |-
| |
| | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ColIdx
| |
| |-
| |
| | colspan="2" | 0 = Red, 1 = Green, 2 = Blue, 3 = White
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputLow''' | |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 825: |
Line 507: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===OutputLow=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.
| |
| |- | | |- |
| |-
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="90%" class="mtx-class-macrohead" | '''OutputLow''' |
| | width="90%" | Scaler
| |
| |-
| |
| | colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T0L''' | |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 856: |
Line 521: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Refresh=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine2D''' | | | width="90%" class="mtx-class-macrohead" | '''Refresh''' |
| |- | | |- |
| | colspan="2" | Draws a line on a 2D array of LEDs | | | colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X1
| |
| |-
| |
| | colspan="2" | Start X Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y1
| |
| |-
| |
| | colspan="2" | Start Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" | End X Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" | End Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" | Red colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" | Green colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |-
| |
| | colspan="2" | Blue colour channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White colour channel
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputHigh'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLEDColour'''
| |
| |-
| |
| | colspan="2" | Sets the colour of a single LED in RAM as a 1D array.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | LED
| |
| |- | | |- |
| | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" | Red Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" | Green Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |-
| |
| | colspan="2" | Blue Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 960: |
Line 535: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SetAllLEDColour=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAllLEDColour''' | | | 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 993: |
Line 569: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SetBrightness=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T0H''' | | | width="90%" class="mtx-class-macrohead" | '''SetBrightness''' |
| |- | | |- |
| | colspan="2" | | | | 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. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| | | width="90%" | Scaler |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T1L''' | |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| | | colspan="2" | Range: 0.0 to 1.0 Default: 1.0, 0 = Off, 0.5 = Half Brightness, 1.0 = Full Brightness |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 1,019: |
Line 588: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SetBrightnessByte=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Refresh''' | | | width="90%" class="mtx-class-macrohead" | '''SetBrightnessByte''' |
| |- | | |- |
| | colspan="2" | Clocks out the current colour data to the LEDs from the values stored in RAM | | | 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. |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs1D'''
| |
| |-
| |
| | colspan="2" | Shifts the LED colours in 1D and wraps
| |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Direction | | | width="90%" | Scaler |
| |- | | |- |
| | colspan="2" | 0 = Forwards, 1 = Backwards | | | colspan="2" | Range: 0 to 255 Default: 255, 0 = Off, 128 = Half Brightness, 255 = Full Brightness |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataMode
| |
| |-
| |
| | colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 1,055: |
Line 607: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SetLEDColour=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine3D''' | | | width="90%" class="mtx-class-macrohead" | '''SetLEDColour''' |
| |- | | |- |
| | colspan="2" | Draws a line on a 3D array of LEDs | | | colspan="2" | Sets the colour of a single LED in RAM as a 1D array. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | X1 | | | width="90%" | LED |
| |- | | |- |
| | colspan="2" | Start X Coordinate | | | colspan="2" | LED to change the colour / Range: 0 to (LED Count - 1) |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y1
| |
| |-
| |
| | colspan="2" | Start Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Z1
| |
| |-
| |
| | colspan="2" | Start Z Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" | End X Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" | End Y Coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Z2
| |
| |-
| |
| | colspan="2" | End Z Coordinate
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| Line 1,118: |
Line 646: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ShiftLEDs1D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay_T1H''' | | | width="90%" class="mtx-class-macrohead" | '''ShiftLEDs1D''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Shifts the LED colours in 1D and wraps |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex2D'''
| |
| |-
| |
| | colspan="2" | Sets the index of a single LED in RAM as a 2D array.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X
| |
| |-
| |
| | colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Y
| |
| |-
| |
| | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawRectangle2D'''
| |
| |-
| |
| | colspan="2" | Draws a basic 2D rectangle onto the LEDs
| |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | X1 | | | width="90%" | Direction |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | 0 = Forwards, 1 = Backwards |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Y1 | | | width="90%" | DataMode |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DrawStyle
| |
| |-
| |
| | colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 1,212: |
Line 670: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ShiftLEDs2D=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftLEDs2D''' | | | 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 1,240: |
Line 699: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===ShiftLEDs3D=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLEDIndex3D''' | |
| |-
| |
| | colspan="2" | Gets the index of a single LED in RAM as a 3D array.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | X
| |
| |- | | |- |
| | colspan="2" | LED Column to change the colour / Range: 0 to (LED Column - 1)
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''ShiftLEDs3D''' |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | |
| | width="90%" | Y
| |
| |-
| |
| | colspan="2" | LED Row to change the colour / Range: 0 to (LED Row - 1)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Z
| |
| |-
| |
| | colspan="2" | LED Layer to change the colour / Range: 0 to (LED Layer - 1)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid3D''' | |
| |-
| |
| | colspan="2" | Draws a basic 3D cuboid onto the LEDs
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | X1
| |
| |-
| |
| | colspan="2" | Start X pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Y1
| |
| |-
| |
| | colspan="2" | Start Y pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Z1
| |
| |-
| |
| | colspan="2" | Start Z pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | X2
| |
| |-
| |
| | colspan="2" | End X pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Y2
| |
| |-
| |
| | colspan="2" | End Y pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Z2
| |
| |-
| |
| | colspan="2" | End Z pixel coordinate
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DrawStyle
| |
| |-
| |
| | colspan="2" | Sets the draw style - 0=Soild, 1=Edge, 2=Corners
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | R
| |
| |-
| |
| | colspan="2" | Red Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | G
| |
| |-
| |
| | colspan="2" | Green Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | B
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | W
| |
| |-
| |
| | colspan="2" | White Colour Channel
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the LED ICs in the chain.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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 1,380: |
Line 731: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Controller IC | | | width="90%" class="mtx-class-propfolder" | Controller IC |
| |- | | |- |
| |- | | |- |
| Line 1,431: |
Line 780: |
| | colspan="2" | Logic 1 low time in microseconds | | | colspan="2" | Logic 1 low time in microseconds |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LED Properties | | | width="90%" class="mtx-class-propfolder" | LED Properties |
| |- | | |- |
| |- | | |- |
| Line 1,450: |
Line 799: |
| | colspan="2" | X Spacing Between LEDs on the Panel | | | colspan="2" | X Spacing Between LEDs on the Panel |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | | | width="90%" class="mtx-class-propfolder" | Connections |
| |- | | |- |
| |- | | |- |
| Line 1,459: |
Line 808: |
| | colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS821x IC. | | | colspan="2" | LED Data Pin - Connected to the Data In pin of the first WS821x IC. |
| |} | | |} |
| | |
| | ==Component Source Code== |
| | |
| | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LED_SK6812RGBW.fcfx FC_Comp_Source_LED_SK6812RGBW.fcfx] |
| | |
| | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LED_SK6812RGBW.fcfx FC_Comp_Source_LED_SK6812RGBW.fcfx] |