Component: LED Cube (Misc Circuit): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 75: | Line 75: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Clear''' | ||
|- | |- | ||
| colspan="2" | Clears the contents of the display to 0x0000 | | colspan="2" | Clears the contents of the display to 0x0000 | ||
| Line 94: | Line 94: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ConvColourToRGB''' | ||
|- | |- | ||
| colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | | colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | ||
| Line 113: | Line 113: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ConvRGBToColour''' | ||
|- | |- | ||
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions. | | colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions. | ||
| Line 142: | Line 142: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayCharacter''' | ||
|- | |- | ||
| colspan="2" | This macro allows a character to be displayed on the screen | | colspan="2" | This macro allows a character to be displayed on the screen | ||
| Line 201: | Line 201: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawCuboid''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 3D cuboid onto the LEDs | | colspan="2" | Draws a basic 3D cuboid onto the LEDs | ||
| Line 260: | Line 260: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawLine''' | ||
|- | |- | ||
| colspan="2" | Draws a basic 3D line onto the LEDs | | colspan="2" | Draws a basic 3D line onto the LEDs | ||
| Line 314: | Line 314: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetColour''' | ||
|- | |- | ||
| colspan="2" | Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | | colspan="2" | Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | ||
| Line 343: | Line 343: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel. | | colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel. | ||
| Line 357: | Line 357: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PWMTimer''' | ||
|- | |- | ||
| colspan="2" | Interrupt driven macro to clock out the signals to the LEDs in the cube. To be called as part of a high frequency hardware timer interrupt or software loop to drive the cube hardware, Min Frequency = 60(Hz) * 8(Height) * 32(5-bitColourChannelValue) | | colspan="2" | Interrupt driven macro to clock out the signals to the LEDs in the cube. To be called as part of a high frequency hardware timer interrupt or software loop to drive the cube hardware, Min Frequency = 60(Hz) * 8(Height) * 32(5-bitColourChannelValue) | ||
| Line 371: | Line 371: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ResetRotations''' | ||
|- | |- | ||
| colspan="2" | Resets the rotation count variables allowing for a new rotation to be started | | colspan="2" | Resets the rotation count variables allowing for a new rotation to be started | ||
| Line 385: | Line 385: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateDisplay''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 419: | Line 419: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellXY''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 443: | Line 443: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellXZ''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 467: | Line 467: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RotateShellYZ''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 491: | Line 491: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetColour''' | ||
|- | |- | ||
| colspan="2" | Sets a pixel colour in the none active buffer using a 16-bit colour value Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | | colspan="2" | Sets a pixel colour in the none active buffer using a 16-bit colour value Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | ||
| Line 525: | Line 525: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ShiftDisplay''' | ||
|- | |- | ||
| colspan="2" | Shifts the contents of the display by the number of vertices specified | | colspan="2" | Shifts the contents of the display by the number of vertices specified | ||
| Line 564: | Line 564: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SwitchBuffers''' | ||
|- | |- | ||
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations. | | colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations. | ||
| Line 583: | Line 583: | ||
{| 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" | LEDs | ||
|- | |- | ||
|- | |- | ||
| Line 636: | Line 636: | ||
| colspan="2" | Number of micro seconds to wait between switching off the driver and clocking out the new signals. Used to remove any ghosting effects visible on the display due to slow driver switch off times. | | colspan="2" | Number of micro seconds to wait between switching off the driver and clocking out the new signals. Used to remove any ghosting effects visible on the display due to slow driver switch off times. | ||
|- | |- | ||
| 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 655: | Line 655: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| 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" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Ben Rowland 2014 |
| Version | 1.0 |
| Category | Misc Circuit |
LED Cube component
LED Cube component for driving 3D arrays of LEDs. A typical cube could consist of 4x4x4 or 8x8x8 but does not necessarily need to be a cuboid.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LEDCUBE.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LEDCUBE.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Clear
| Clear | |
| Clears the contents of the display to 0x0000 | |
| SwitchBuffers | |
| 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone | |
| Return | |
ConvColourToRGB
| ConvColourToRGB | |
| Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue | |
| Colour | |
| Return | |
ConvRGBToColour
| ConvRGBToColour | |
| Converts RGB values into a single UINT colour parameter to use with other functions. | |
| Red | |
| Green | |
| Blue | |
| Return | |
DisplayCharacter
DrawCuboid
DrawLine
| DrawLine | |
| Draws a basic 3D line onto the LEDs | |
| X1 | |
| Y1 | |
| Z1 | |
| X2 | |
| Y2 | |
| Z2 | |
| Colour | |
| SwitchBuffers | |
| Return | |
GetColour
| GetColour | |
| Reads the colour value from a single pixel in the active buffer as a 16-bit value. Bits 0-4 = Red Bits 5-10 = Green Bits 11-15 = Blue | |
| X | |
| Y | |
| Z | |
| Return | |
Initialise
| Initialise | |
| Sets up the data memory and draws the simulated LED cube on the panel. | |
| Return | |
PWMTimer
ResetRotations
| ResetRotations | |
| Resets the rotation count variables allowing for a new rotation to be started | |
| Return | |
RotateDisplay
RotateShellXY
| RotateShellXY | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
RotateShellXZ
| RotateShellXZ | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
RotateShellYZ
| RotateShellYZ | |
| Shifts the contents of the display by the number of vertices specified | |
| Direction | |
| Shell | |
| Return | |
SetColour
ShiftDisplay
SwitchBuffers