Jump to content

Component: LED Matrix Dummy (HT16K33) (Outputs: LEDs): Difference between revisions

From Flowcode Help
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
Line 337: Line 337:
| colspan="2" | Total number of LEDs in the component 
| colspan="2" | Total number of LEDs in the component 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
Line 376: Line 376:
| colspan="2" | Pin used for SCL (clock signal) 
| colspan="2" | Pin used for SCL (clock signal) 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Colours
| width="90%" class="mtx-class-propfolder" | Colours
|-
|-
Line 390: Line 390:
| colspan="2" | Simulated colour of the LEDs when switched Off 
| colspan="2" | Simulated colour of the LEDs when switched Off 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
Line 399: Line 399:
| colspan="2" | Sets the simulation type. Component GUI allows the object on the panel to reflect what the reakl life LED matrix should do. I2C Injector allows the I2C communications to be simulated via injectors. 
| colspan="2" | Sets the simulation type. Component GUI allows the object on the panel to reflect what the reakl life LED matrix should do. I2C Injector allows the I2C communications to be simulated via injectors. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | GUI
| width="90%" class="mtx-class-propfolder" | GUI
|-
|-

Latest revision as of 14:37, 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.

LED Resistor Calculator Tool






Macro reference

ClearLEDs

ClearLEDs
Sets all of the LEDs in the matrix to the off state. 
- VOID Return


DisplayString

DisplayString
Prints an ASCII string onto the LED Matrix a column at a time. 
- STRING Data
Data string to display on the LEDs 
- UINT Animation_Delay
Delay in milliseconds between writing to the next column 
- BYTE Leadout
Allows the text to scroll completely off the display before returning 0=No, 1=Yes 
- BYTE Add_Spaces
Add spaces between each ASCII character 0=No, 1=Yes 
- BYTE Orientation
0=Normal, 1=Rotated 90 Degrees 
- VOID Return


Initialise

Initialise
Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs. 
- VOID Return


SetBrightness

SetBrightness
Configures the brightness of the LEDs by varying the On portion of the duty. 
- BYTE Brightness
Range: 0-15 - 0 = Min Brightness, 15 = Full Brightness 
- VOID Return


ShiftColumns

ShiftColumns
Shifts the columns one place left or right. Used for things like displaying scrolling text. 
- BYTE Direction
0 = Shift Left, 1 = Shift Right 
- VOID Return


WriteColumn

WriteColumn
Allows a single column of 8 LEDs to be controlled in a single action. 
- BYTE Column
Range: 0-15 
- BYTE Data
Data to display on the column of LEDs 
- VOID Return


WriteCommand

WriteCommand
Writes a command. 
- BYTE Command
 
- VOID Return


WriteLED

WriteLED
Allows a single LED to be controlled using the basic column / row coordinate system. Each column is comprised of 8 rows. 
- BYTE Column
Range: 0-15 
- BYTE Row
Range: 0-7 
- BYTE Data
0 = LED Off, 1 = LED On 
- VOID Return


WriteLEDXY

WriteLEDXY
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. 
- BYTE X
X coordinate. Range: 0-15 
- BYTE Y
Y coordinate. Range: 0-15 
- BYTE State
State 0=Off, 1=On 
- VOID Return


WriteRegister

WriteRegister
Writes a value to a register. 
- BYTE Address
 
- BYTE Value
 
- VOID Return


Property reference

Properties
Display Module
 
LED Count
Total number of LEDs in the component 
Connections
Slave Address
 
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Colours
On Color
Simulated colour of the LEDs when switched On 
Off Color
Simulated colour of the LEDs when switched Off 
Simulation
Simulation Type
Sets the simulation type. Component GUI allows the object on the panel to reflect what the reakl life LED matrix should do. I2C Injector allows the I2C communications to be simulated via injectors. 
GUI
Column Spacing
Simulation column spacing 
Width
Simulation LED width 
Row Spacing
Simulation row spacing 
Height
Simulated LED height 
Depth
Simulated LED Depth (3D environments only) 
LED Shape
Simulated LED basic shape