Difference between revisions of "Component: LED Cube (Misc Circuit)"

From Flowcode Help
Jump to navigationJump to search
 
(5 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_LEDCUBE.fcfx FC_Comp_Source_LEDCUBE.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LEDCUBE.fcfx FC_Comp_Source_LEDCUBE.fcfx]
  
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LEDCUBE.fcfx FC_Comp_Source_LEDCUBE.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LEDCUBE.fcfx FC_Comp_Source_LEDCUBE.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
  
  
Line 48: Line 52:
  
  
''<span style="color:red;">No additional examples</span>''
 
  
  
==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;" | '''Clear'''
 
|-
 
| colspan="2" | Clears the contents of the display to 0x0000 &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone&nbsp;
 
|-
 
| 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''
 
|}
 
  
 +
''<span style="color:red;">No additional examples</span>''
  
{| 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;" | '''RotateShellXZ'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Direction
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Shell
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''RotateShellXY'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Direction
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Shell
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''DrawLine'''
 
|-
 
| colspan="2" | Draws a basic 3D line onto the LEDs&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''RotateShellYZ'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Direction
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Shell
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''RotateDisplay'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | X
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Y
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Z
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''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)&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
  
 +
==Macro reference==
  
 +
===Clear===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConvRGBToColour'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Clear'''
 
|-
 
|-
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions.&nbsp;
+
| colspan="2" | Clears the contents of the display to 0x0000 &nbsp;
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Red
+
| width="90%" | SwitchBuffers
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Green
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Blue
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ConvColourToRGB===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 285: Line 109:
  
  
 +
===ConvRGBToColour===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetColour'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConvRGBToColour'''
 
|-
 
|-
| 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&nbsp;
+
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions.&nbsp;
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
+
| width="90%" | Red
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
+
| width="90%" | Green
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Z
+
| width="90%" | Blue
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | 16-bit Colour Value (MSB B5, G6, R5 LSB)&nbsp;
 
|-
 
| 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;" | '''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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z
 
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 346: Line 138:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===DisplayCharacter===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid'''
 
|-
 
| colspan="2" | Draws a basic 3D cuboid onto the LEDs&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 462: Line 197:
  
  
 +
===DrawCuboid===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetRotations'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid'''
 
|-
 
|-
| colspan="2" | Resets the rotation count variables allowing for a new rotation to be started&nbsp;
+
| colspan="2" | Draws a basic 3D cuboid onto the LEDs&nbsp;
|-
 
|-
 
| 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;" | '''SwitchBuffers'''
 
|-
 
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | WaitForSwitch
 
|-
 
| colspan="2" | 0=DoNotWait, 1=Waits for switch to occur&nbsp;
 
|-
 
| 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;" | '''ShiftDisplay'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | X
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Y
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Z
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | DataMode
 
|-
 
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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" | Sets up the data memory and draws the simulated LED cube on the panel.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LEDs
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Width (X)
 
|-
 
| colspan="2" | The number of LEDs wide&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Depth (Y)
 
|-
 
| colspan="2" | The number of LEDs deep&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Height (Z)
 
|-
 
| colspan="2" | The number of LEDs tall&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | LED Count
 
|-
 
| colspan="2" | Number of LEDs required by the component&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | LED Type
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Common Type
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Wiring Order
 
|-
 
| colspan="2" | Specifies the order of the wiring of the LEDs from lowest bit to highest&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Driver Pre Delay
 
|-
 
| 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.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Driver Post Delay
 
|-
 
| 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.&nbsp;
 
|-
 
| 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%" | Clock Pin
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
 
| width="90%" | Data Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
 
| width="90%" | Enable Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | LED Size
 
|-
 
| colspan="2" | Size of each LED on the panel &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Spacing
 
|-
 
| colspan="2" | Number of units of spacing between each LED&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Transparent
 
|-
 
| colspan="2" | If set to yes then a LED which is completely switched off will be set to transparent, If set to no then the LED will be shown as black.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Toggle Pins
 
|-
 
| colspan="2" | Determines if the pins are toggled as part of the PWMTimer macro during simulation.  During simulation you probably don't want the pins toggling as it will slow down simulation.  The only exception may be if you want to see the signals in the scope window. Does not effect the compiled embedded code.&nbsp;
 
|}==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;" | '''Clear'''
 
|-
 
| colspan="2" | Clears the contents of the display to 0x0000 &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone&nbsp;
 
|-
 
| 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;" | '''RotateShellXZ'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Direction
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Shell
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''RotateShellXY'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Direction
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Shell
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''DrawLine'''
 
|-
 
| colspan="2" | Draws a basic 3D line onto the LEDs&nbsp;
 
 
|-
 
|-
 
|-
 
|-
Line 748: Line 235:
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 +
|-
 +
| 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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
Line 764: Line 256:
  
  
 +
===DrawLine===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateShellYZ'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine'''
 
|-
 
|-
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
+
| colspan="2" | Draws a basic 3D line onto the LEDs&nbsp;
 
|-
 
|-
 
|-
 
|-
 
| 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%" | X1
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Shell
+
| width="90%" | Y1
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| 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;" | '''RotateDisplay'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | X
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Y
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Z
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | SwitchBuffers
+
| width="90%" | Z1
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| 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;" | '''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)&nbsp;
 
|-
 
|-
 
| 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;" | '''ConvRGBToColour'''
 
|-
 
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions.&nbsp;
 
|-
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Red
+
| width="90%" | X2
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Green
+
| width="90%" | Y2
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Blue
+
| width="90%" | Z2
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| 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;" | '''ConvColourToRGB'''
 
|-
 
| colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue&nbsp;
 
|-
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
Line 873: Line 299:
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| 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;" | '''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&nbsp;
 
|-
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
+
| width="90%" | SwitchBuffers
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y
 
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | 16-bit Colour Value (MSB B5, G6, R5 LSB)&nbsp;
 
 
|-
 
|-
 
| 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 912: Line 310:
  
  
 +
===GetColour===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 940: Line 339:
  
  
 +
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawCuboid'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Draws a basic 3D cuboid onto the LEDs&nbsp;
+
| colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel.&nbsp;
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X2
 
|-
 
| colspan="2" | &nbsp;
 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| 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 998: Line 353:
  
  
 +
===PWMTimer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayCharacter'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMTimer'''
 
|-
 
|-
| colspan="2" | This macro allows a character to be displayed on the screen&nbsp;
+
| 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)&nbsp;
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Character
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | X pixel coordinate to set the output string position.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | Y pixel coordinate to set the output string position.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Font
 
|-
 
| colspan="2" | Size of the font - 0 = Normal, 1 = Double Width, 2 = Double Width and Height, 3 = Double Height&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Axis
 
|-
 
| colspan="2" | 0=XY, 1=XZ, 2=YZ&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Orientation
 
|-
 
| colspan="2" | 0=Normal, 1=HFlip. 2=VFlip, 3=HFlip & VFlip&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | Specifies the foreground colour&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
 
|-
 
|-
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| 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,056: Line 367:
  
  
 +
===ResetRotations===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,069: Line 381:
  
  
 +
===RotateDisplay===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SwitchBuffers'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateDisplay'''
|-
 
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | WaitForSwitch
 
|-
 
| colspan="2" | 0=DoNotWait, 1=Waits for switch to occur&nbsp;
 
|-
 
| 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;" | '''ShiftDisplay'''
 
 
|-
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
Line 1,109: Line 404:
 
|-
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | DataMode
 
|-
 
| colspan="2" | 0=ResetToZero, 1=WrapAroundDisplay, 2=Smear&nbsp;
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
Line 1,125: Line 415:
  
  
 +
===RotateShellXY===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateShellXY'''
|-
 
| colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LEDs
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Width (X)
 
|-
 
| colspan="2" | The number of LEDs wide&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Depth (Y)
 
|-
 
| colspan="2" | The number of LEDs deep&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Height (Z)
 
|-
 
| colspan="2" | The number of LEDs tall&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | LED Count
 
|-
 
| colspan="2" | Number of LEDs required by the component&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | LED Type
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Common Type
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Wiring Order
 
|-
 
| colspan="2" | Specifies the order of the wiring of the LEDs from lowest bit to highest&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Driver Pre Delay
 
|-
 
| 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.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Driver Post Delay
 
|-
 
| 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.&nbsp;
 
|-
 
| 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%" | Clock Pin
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
 
| width="90%" | Data Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-19-icon.png]]
 
| width="90%" | Enable Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | LED Size
 
|-
 
| colspan="2" | Size of each LED on the panel &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Spacing
 
|-
 
| colspan="2" | Number of units of spacing between each LED&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Transparent
 
|-
 
| colspan="2" | If set to yes then a LED which is completely switched off will be set to transparent, If set to no then the LED will be shown as black.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Toggle Pins
 
|-
 
| colspan="2" | Determines if the pins are toggled as part of the PWMTimer macro during simulation.  During simulation you probably don't want the pins toggling as it will slow down simulation.  The only exception may be if you want to see the signals in the scope window. Does not effect the compiled embedded code.&nbsp;
 
|}==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;" | '''Clear'''
 
|-
 
| colspan="2" | Clears the contents of the display to 0x0000 &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | 0=DoNotSwitch 1=SwitchAutomaticallyWhenDone&nbsp;
 
|-
 
| 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;" | '''RotateShellXZ'''
 
 
|-
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
Line 1,282: Line 439:
  
  
 +
===RotateShellXZ===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateShellXY'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateShellXZ'''
 
|-
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
Line 1,305: Line 463:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===RotateShellYZ===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawLine'''
 
|-
 
| colspan="2" | Draws a basic 3D line onto the LEDs&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,381: Line 487:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===SetColour===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RotateDisplay'''
 
|-
 
| colspan="2" | Shifts the contents of the display by the number of vertices specified&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | X
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Y
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Z
 
|-
 
| colspan="2" | Number of pixels to shift the display -7 to 7&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''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)&nbsp;
 
|-
 
|-
 
| 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;" | '''ConvRGBToColour'''
 
|-
 
| colspan="2" | Converts RGB values into a single UINT colour parameter to use with other functions.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Red
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Green
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Blue
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''ConvColourToRGB'''
 
|-
 
| colspan="2" | Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,506: Line 521:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===ShiftDisplay===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''DrawCuboid'''
 
|-
 
| colspan="2" | Draws a basic 3D cuboid onto the LEDs&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z2
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''DisplayCharacter'''
 
|-
 
| colspan="2" | This macro allows a character to be displayed on the screen&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Character
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X1
 
|-
 
| colspan="2" | X pixel coordinate to set the output string position.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y1
 
|-
 
| colspan="2" | Y pixel coordinate to set the output string position.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Z1
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Font
 
|-
 
| colspan="2" | Size of the font - 0 = Normal, 1 = Double Width, 2 = Double Width and Height, 3 = Double Height&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Axis
 
|-
 
| colspan="2" | 0=XY, 1=XZ, 2=YZ&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Orientation
 
|-
 
| colspan="2" | 0=Normal, 1=HFlip. 2=VFlip, 3=HFlip & VFlip&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Colour
 
|-
 
| colspan="2" | Specifies the foreground colour&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | SwitchBuffers
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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;" | '''ResetRotations'''
 
|-
 
| colspan="2" | Resets the rotation count variables allowing for a new rotation to be started&nbsp;
 
|-
 
|-
 
| 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;" | '''SwitchBuffers'''
 
|-
 
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | WaitForSwitch
 
|-
 
| colspan="2" | 0=DoNotWait, 1=Waits for switch to occur&nbsp;
 
|-
 
| 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;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,719: Line 560:
  
  
 +
===SwitchBuffers===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SwitchBuffers'''
 +
|-
 +
| colspan="2" | Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations.&nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Sets up the data memory and draws the simulated LED cube on the panel.&nbsp;
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | WaitForSwitch
 
|-
 
|-
 +
| colspan="2" | 0=DoNotWait, 1=Waits for switch to occur&nbsp;
 
|-
 
|-
 
| 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
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 13:11, 7 February 2023

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

Fc9-comp-macro.png Clear
Clears the contents of the display to 0x0000  
Fc9-u8-icon.png - BYTE SwitchBuffers
0=DoNotSwitch 1=SwitchAutomaticallyWhenDone 
Fc9-void-icon.png - VOID Return


ConvColourToRGB

Fc9-comp-macro.png ConvColourToRGB
Reads the individual RGB colour values from a single UINT colour value. Return Index: 0=Red, 1=Green, 2=Blue 
Fc9-u16-icon.png - UINT Colour
 
Fc9-string-icon.png - STRING Return


ConvRGBToColour

Fc9-comp-macro.png ConvRGBToColour
Converts RGB values into a single UINT colour parameter to use with other functions. 
Fc9-u8-icon.png - BYTE Red
 
Fc9-u8-icon.png - BYTE Green
 
Fc9-u8-icon.png - BYTE Blue
 
Fc9-u16-icon.png - UINT Return


DisplayCharacter

Fc9-comp-macro.png DisplayCharacter
This macro allows a character to be displayed on the screen 
Fc9-u8-icon.png - BYTE Character
 
Fc9-u8-icon.png - BYTE X1
X pixel coordinate to set the output string position. 
Fc9-u8-icon.png - BYTE Y1
Y pixel coordinate to set the output string position. 
Fc9-u8-icon.png - BYTE Z1
 
Fc9-u8-icon.png - BYTE Font
Size of the font - 0 = Normal, 1 = Double Width, 2 = Double Width and Height, 3 = Double Height 
Fc9-u8-icon.png - BYTE Axis
0=XY, 1=XZ, 2=YZ 
Fc9-u8-icon.png - BYTE Orientation
0=Normal, 1=HFlip. 2=VFlip, 3=HFlip & VFlip 
Fc9-u16-icon.png - UINT Colour
Specifies the foreground colour 
Fc9-u8-icon.png - BYTE SwitchBuffers
 
Fc9-void-icon.png - VOID Return


DrawCuboid

Fc9-comp-macro.png DrawCuboid
Draws a basic 3D cuboid onto the LEDs 
Fc9-u8-icon.png - BYTE X1
 
Fc9-u8-icon.png - BYTE Y1
 
Fc9-u8-icon.png - BYTE Z1
 
Fc9-u8-icon.png - BYTE X2
 
Fc9-u8-icon.png - BYTE Y2
 
Fc9-u8-icon.png - BYTE Z2
 
Fc9-u8-icon.png - BYTE DrawStyle
Sets the draw style - 0=Soild, 1=Edge, 2=Corners 
Fc9-u16-icon.png - UINT Colour
 
Fc9-u8-icon.png - BYTE SwitchBuffers
 
Fc9-void-icon.png - VOID Return


DrawLine

Fc9-comp-macro.png DrawLine
Draws a basic 3D line onto the LEDs 
Fc9-u8-icon.png - BYTE X1
 
Fc9-u8-icon.png - BYTE Y1
 
Fc9-u8-icon.png - BYTE Z1
 
Fc9-u8-icon.png - BYTE X2
 
Fc9-u8-icon.png - BYTE Y2
 
Fc9-u8-icon.png - BYTE Z2
 
Fc9-u16-icon.png - UINT Colour
 
Fc9-u8-icon.png - BYTE SwitchBuffers
 
Fc9-void-icon.png - VOID Return


GetColour

Fc9-comp-macro.png 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 
Fc9-u8-icon.png - BYTE X
 
Fc9-u8-icon.png - BYTE Y
 
Fc9-u8-icon.png - BYTE Z
 
Fc9-u16-icon.png - UINT Return


Initialise

Fc9-comp-macro.png Initialise
Sets up the data memory and draws the simulated LED cube on the panel. 
Fc9-void-icon.png - VOID Return


PWMTimer

Fc9-comp-macro.png PWMTimer
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) 
Fc9-void-icon.png - VOID Return


ResetRotations

Fc9-comp-macro.png ResetRotations
Resets the rotation count variables allowing for a new rotation to be started 
Fc9-void-icon.png - VOID Return


RotateDisplay

Fc9-comp-macro.png RotateDisplay
Shifts the contents of the display by the number of vertices specified 
Fc9-s16-icon.png - INT X
Number of pixels to shift the display -7 to 7 
Fc9-s16-icon.png - INT Y
Number of pixels to shift the display -7 to 7 
Fc9-s16-icon.png - INT Z
Number of pixels to shift the display -7 to 7 
Fc9-u8-icon.png - BYTE SwitchBuffers
 
Fc9-void-icon.png - VOID Return


RotateShellXY

Fc9-comp-macro.png RotateShellXY
Shifts the contents of the display by the number of vertices specified 
Fc9-u8-icon.png - BYTE Direction
 
Fc9-u8-icon.png - BYTE Shell
 
Fc9-void-icon.png - VOID Return


RotateShellXZ

Fc9-comp-macro.png RotateShellXZ
Shifts the contents of the display by the number of vertices specified 
Fc9-u8-icon.png - BYTE Direction
 
Fc9-u8-icon.png - BYTE Shell
 
Fc9-void-icon.png - VOID Return


RotateShellYZ

Fc9-comp-macro.png RotateShellYZ
Shifts the contents of the display by the number of vertices specified 
Fc9-u8-icon.png - BYTE Direction
 
Fc9-u8-icon.png - BYTE Shell
 
Fc9-void-icon.png - VOID Return


SetColour

Fc9-comp-macro.png SetColour
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 
Fc9-u8-icon.png - BYTE X
 
Fc9-u8-icon.png - BYTE Y
 
Fc9-u8-icon.png - BYTE Z
 
Fc9-u16-icon.png - UINT Colour
16-bit Colour Value (MSB B5, G6, R5 LSB) 
Fc9-void-icon.png - VOID Return


ShiftDisplay

Fc9-comp-macro.png ShiftDisplay
Shifts the contents of the display by the number of vertices specified 
Fc9-s16-icon.png - INT X
Number of pixels to shift the display -7 to 7 
Fc9-s16-icon.png - INT Y
Number of pixels to shift the display -7 to 7 
Fc9-s16-icon.png - INT Z
Number of pixels to shift the display -7 to 7 
Fc9-u8-icon.png - BYTE DataMode
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear 
Fc9-u8-icon.png - BYTE SwitchBuffers
 
Fc9-void-icon.png - VOID Return


SwitchBuffers

Fc9-comp-macro.png SwitchBuffers
Switches the current display buffer to the updated buffer to allow for seamless updates when undergoing heavy calcaulations. 
Fc9-u8-icon.png - BYTE WaitForSwitch
0=DoNotWait, 1=Waits for switch to occur 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png LEDs
Fc9-type-21-icon.png Width (X)
The number of LEDs wide 
Fc9-type-21-icon.png Depth (Y)
The number of LEDs deep 
Fc9-type-21-icon.png Height (Z)
The number of LEDs tall 
Fc9-type-21-icon.png LED Count
Number of LEDs required by the component 
Fc9-type-16-icon.png LED Type
 
Fc9-type-16-icon.png Common Type
 
Fc9-type-16-icon.png Wiring Order
Specifies the order of the wiring of the LEDs from lowest bit to highest 
Fc9-type-21-icon.png Driver Pre Delay
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. 
Fc9-type-21-icon.png Driver Post Delay
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. 
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png Clock Pin
 
Fc9-type-19-icon.png Data Port
 
Fc9-type-19-icon.png Enable Port
 
Fc9-conn-icon.png Simulation
Fc9-type-15-icon.png LED Size
Size of each LED on the panel  
Fc9-type-15-icon.png Spacing
Number of units of spacing between each LED 
Fc9-type-7-icon.png Transparent
If set to yes then a LED which is completely switched off will be set to transparent, If set to no then the LED will be shown as black. 
Fc9-type-16-icon.png Toggle Pins
Determines if the pins are toggled as part of the PWMTimer macro during simulation. During simulation you probably don't want the pins toggling as it will slow down simulation. The only exception may be if you want to see the signals in the scope window. Does not effect the compiled embedded code.