Jump to content

Component: LED Charlieplex (LEDs): Difference between revisions

From Flowcode Help
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(4 intermediate revisions by the same user not shown)
Line 125: Line 125:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AllOff'''
| width="90%" class="mtx-class-macrohead" | '''AllOff'''
|-
|-
| colspan="2" | Turns off all elements 
| colspan="2" | Turns off all elements 
Line 139: Line 139:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHandle'''
| width="90%" class="mtx-class-macrohead" | '''GetHandle'''
|-
|-
| colspan="2" | Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
| colspan="2" | Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
Line 158: Line 158:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LEDOn'''
| width="90%" class="mtx-class-macrohead" | '''LEDOn'''
|-
|-
| colspan="2" | Turn on the selected LED 
| colspan="2" | Turn on the selected LED 
Line 178: Line 178:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| 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%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 211: Line 211:
| colspan="2" | Chip pin connection for charlieplexed signal 2 
| colspan="2" | Chip pin connection for charlieplexed signal 2 
|-
|-
| 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%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-
Line 245: Line 245:
| colspan="2" | Type of shape 
| colspan="2" | Type of shape 
|-
|-
| 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%" style="background-color:#EAE1EA; color:#4B008D;" | Colors
| width="90%" class="mtx-class-propfolder" | Colors
|-
|-
|-
|-
| 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%" style="background-color:#EAE1EA; color:#4B008D;" | Label
| width="90%" class="mtx-class-propfolder" | Label
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

Author Matrix Ltd.
Version 1.5
Category LEDs


LED Charlieplex component

Create an evenly spaced array of LED indicators using a reduced amount of I/O pins. Only one LED can be switched on at once, high speed multiplexing allows multiple LEDs to appear to be lit at once. Each will be connected in line with the standard charlieplex scheme. Set target object to point at any standard LED component to change the style.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_LED_charlieplex.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_LED_charlieplex.fcfx

Detailed description

No detailed description exists yet for this component

Examples

The Charlieplex scheme simply places two LEDs between each combination of two microcontroller control pins. One LED in forward bias the the other LED in reverse bias.


With two control pins you can control up to two LEDs or a single bicolour LED.

With three control pins you can control up to six LEDs or up to three bicolour LEDs.

With four control pins you can control up to twelve LEDs or up to six bicolour LEDs.


If all the LEDs you want to drive have the same characteristics then you can wire up like this to use the same current limiting resistors to drive multiple LEDs.


If the LEDs you want to drive have different characteristics then you can wire up like this to use different current limiting resistors for each individual LED.


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


Here is an example of a 4-pin setup.







Macro reference

AllOff

AllOff
Turns off all elements 
- VOID Return


GetHandle

GetHandle
Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
- BYTE Index
 
- HANDLE Return


LEDOn

LEDOn
Turn on the selected LED 
- BYTE Index
Index of the LED to turn on starting from 1. 
- VOID Return


Property reference

Properties
Connections
Pin Count
The number of pins to dedicate to the charlieplexed output. 
LED Count
The maximum number of LEDs that can be individually addressed based on the number of pins available. 
Pin 0
Chip pin connection for charlieplexed signal 0 
Pin 1
Chip pin connection for charlieplexed signal 1 
Pin 2
Chip pin connection for charlieplexed signal 2 
Simulation
Alignment
Which 3D axis to align the copies along. 
Spacing
The distance between LEDs in the array. LEDs will be spaced symmetrically around the component centre. Use a negative value to reverse the order of the LEDs. 
Width
Width of the LED shape. 
Height
Height of the LED shape. 
Reverse
Reverse the direction of the LEDs. 
Type
Type of shape 
Colors
Label
Show
Decide what labels to show... None - no labels are displayed Name - shows each component's name Property - shows a particular property of each component (see 'property' below. 
Color
Color of the labels text. 
Scale
Sets the basic size (text height) of the labels. 
Follow Zoom
Whether labels get bigger and smaller when the panel is zoomed in and out. 
Position
Set the position of the label relative to the component.