Component: LED Matrix Dummy (HT16K33) (Outputs: LEDs): Difference between revisions
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 93: | Line 93: | ||
|- | |- | ||
| 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" | '''ClearLEDs''' | ||
|- | |- | ||
| colspan="2" | Sets all of the LEDs in the matrix to the off state. | | colspan="2" | Sets all of the LEDs in the matrix to the off state. | ||
| Line 107: | Line 107: | ||
|- | |- | ||
| 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" | '''DisplayString''' | ||
|- | |- | ||
| colspan="2" | Prints an ASCII string onto the LED Matrix a column at a time. | | colspan="2" | Prints an ASCII string onto the LED Matrix a column at a time. | ||
| Line 146: | Line 146: | ||
|- | |- | ||
| 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" | Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs. | | colspan="2" | Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs. | ||
| Line 160: | Line 160: | ||
|- | |- | ||
| 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" | '''SetBrightness''' | ||
|- | |- | ||
| colspan="2" | Configures the brightness of the LEDs by varying the On portion of the duty. | | colspan="2" | Configures the brightness of the LEDs by varying the On portion of the duty. | ||
| Line 179: | Line 179: | ||
|- | |- | ||
| 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" | '''ShiftColumns''' | ||
|- | |- | ||
| colspan="2" | Shifts the columns one place left or right. Used for things like displaying scrolling text. | | colspan="2" | Shifts the columns one place left or right. Used for things like displaying scrolling text. | ||
| Line 198: | Line 198: | ||
|- | |- | ||
| 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" | '''WriteColumn''' | ||
|- | |- | ||
| colspan="2" | Allows a single column of 8 LEDs to be controlled in a single action. | | colspan="2" | Allows a single column of 8 LEDs to be controlled in a single action. | ||
| Line 222: | Line 222: | ||
|- | |- | ||
| 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" | '''WriteCommand''' | ||
|- | |- | ||
| colspan="2" | Writes a command. | | colspan="2" | Writes a command. | ||
| Line 241: | Line 241: | ||
|- | |- | ||
| 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" | '''WriteLED''' | ||
|- | |- | ||
| colspan="2" | Allows a single LED to be controlled using the basic column / row coordinate system. Each column is comprised of 8 rows. | | colspan="2" | Allows a single LED to be controlled using the basic column / row coordinate system. Each column is comprised of 8 rows. | ||
| Line 270: | Line 270: | ||
|- | |- | ||
| 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" | '''WriteLEDXY''' | ||
|- | |- | ||
| colspan="2" | Allows a single LED to be controlled using a more standard X, Y coordinate system. 0,0 refers to the bottom left hand LED. Only works with the fixed display modules, custom module not supported. | | colspan="2" | Allows a single LED to be controlled using a more standard X, Y coordinate system. 0,0 refers to the bottom left hand LED. Only works with the fixed display modules, custom module not supported. | ||
| Line 299: | Line 299: | ||
|- | |- | ||
| 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" | '''WriteRegister''' | ||
|- | |- | ||
| colspan="2" | Writes a value to a register. | | colspan="2" | Writes a value to a register. | ||
| Line 324: | Line 324: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.2 |
| Category | Outputs: LEDs |
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_LED_Matrix_HT16K33_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_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 | |
