Difference between revisions of "Component: LED Matrix Dummy (HT16K33) (Outputs: LEDs)"
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 76: | Line 76: | ||
[https://www.digikey.co.uk/en/resources/conversion-calculators/conversion-calculator-led-series-resistor LED Resistor Calculator Tool] | [https://www.digikey.co.uk/en/resources/conversion-calculators/conversion-calculator-led-series-resistor LED Resistor Calculator Tool] | ||
+ | |||
+ | |||
Line 82: | Line 84: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | ===ClearLEDs=== | ||
+ | {| 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;" | '''ClearLEDs''' | ||
+ | |- | ||
+ | | colspan="2" | Sets all of the LEDs in the matrix to the off state. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
===DisplayString=== | ===DisplayString=== | ||
Line 116: | Line 132: | ||
|- | |- | ||
| colspan="2" | 0=Normal, 1=Rotated 90 Degrees | | colspan="2" | 0=Normal, 1=Rotated 90 Degrees | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===Initialise=== | ||
+ | {| 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" | Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs. | ||
+ | |- | ||
|- | |- | ||
| 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 160: | Line 190: | ||
− | === | + | ===WriteColumn=== |
+ | {| 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;" | '''WriteColumn''' | ||
+ | |- | ||
+ | | colspan="2" | Allows a single column of 8 LEDs to be controlled in a single action. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Column | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-15 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | Data to display on the column of LEDs | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===WriteCommand=== | ||
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteCommand''' |
+ | |- | ||
+ | | colspan="2" | Writes a command. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
+ | | width="90%" | Command | ||
|- | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| 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 226: | Line 285: | ||
|- | |- | ||
| colspan="2" | State 0=Off, 1=On | | colspan="2" | State 0=Off, 1=On | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| 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 293: | Line 309: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| 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 |
Revision as of 12:01, 3 February 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | Outputs: LEDs |
Contents
LED Matrix Dummy component
LED Matrix component designed to work using a HT16K33 LED driver IC. Can drive up to 16 x 8 (128) LEDs. Includes support for 8x16 Backpack, 16x8 Featherwing, 8x8 Backpack and Custom.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/LED_Matrix_HT16K33_Dummy.fcfx
Detailed description
No detailed description exists yet for this component
Examples
LEDs can be wired either active high or active low. The LED components should each have a property allowing you to configure which LED type your using.
An active high LED will light when the microcontroller pin is outputting a logic 1 and be off when the microcontroller pin is outputting a logic 0 or in input mode.
An active low LED will light when the microcontroller pin is outputting a logic 0 and be off when the microcontroller pin is outputting a logic 1 or in input mode.
The series resistor can be on either side of the LED and acts to protect the LED from damage due to excess current. The value of resistor used can be changed based on the brightness of the LED and power consumption.
This LED Calculator tool is a good resource for calculating the correct LED series protection resistor.
Macro reference
ClearLEDs
![]() |
ClearLEDs |
Sets all of the LEDs in the matrix to the off state. | |
![]() |
Return |
DisplayString
Initialise
![]() |
Initialise |
Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs. | |
![]() |
Return |
SetBrightness
![]() |
SetBrightness |
Configures the brightness of the LEDs by varying the On portion of the duty. | |
![]() |
Brightness |
Range: 0-15 - 0 = Min Brightness, 15 = Full Brightness | |
![]() |
Return |
ShiftColumns
![]() |
ShiftColumns |
Shifts the columns one place left or right. Used for things like displaying scrolling text. | |
![]() |
Direction |
0 = Shift Left, 1 = Shift Right | |
![]() |
Return |
WriteColumn
![]() |
WriteColumn |
Allows a single column of 8 LEDs to be controlled in a single action. | |
![]() |
Column |
Range: 0-15 | |
![]() |
Data |
Data to display on the column of LEDs | |
![]() |
Return |
WriteCommand
![]() |
WriteCommand |
Writes a command. | |
![]() |
Command |
![]() |
Return |
WriteLED
WriteLEDXY
WriteRegister
![]() |
WriteRegister |
Writes a value to a register. | |
![]() |
Address |
![]() |
Value |
![]() |
Return |