Component: LED Array (LEDs): Difference between revisions
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (18 intermediate revisions by 3 users not shown) | |||
| Line 13: | Line 13: | ||
==LED Array component== | ==LED Array component== | ||
An array of LED indicators equally spaced and complete with labels to indicate their meaning. Embedded can be used to control an 8-bit port or up to 8 individual pins. | |||
==Component Source Code== | |||
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LED_Array_2dgi.fcfx FC_Comp_Source_LED_Array_2dgi.fcfx] | |||
Please click here | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LED_Array_2dgi.fcfx FC_Comp_Source_LED_Array_2dgi.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
| Line 29: | Line 31: | ||
| Line 41: | Line 41: | ||
''No detailed description exists yet for this component'' | |||
==Examples== | |||
Example program which uses the point graph macro and loops to create a knight rider effect using the LED array. | |||
{{Fcfile|LED_KnightRider_2D.fcfx|LED KnightRider}} | |||
Example program which reads an analogue value from an analogue input voltage and displays the reading in Binary on the LED array. | |||
{{Fcfile|LED_Count_2D.fcfx|LED Count}} | |||
LEDs can be wired either active high or active low. The LED Array components have a property allowing you to configure which LED type your using. | |||
[[File:LED_Active.jpg]] | |||
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 | This LED Calculator tool is a good resource for calculating the correct LED series protection resistor. | ||
[https://www.digikey.co.uk/en/resources/conversion-calculators/conversion-calculator-led-series-resistor LED Resistor Calculator Tool] | |||
== | ==Macro reference== | ||
{| class="wikitable" | ===AllOff=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''AllOff''' | |||
|- | |||
| colspan="2" | Turns off all elements | |||
|- | |- | ||
|- | |- | ||
| | | 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'' | |||
|} | |||
===AllOn=== | |||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''AllOn''' | |||
|- | |- | ||
| | | colspan="2" | Turns on all elements | ||
|- | |- | ||
|- | |- | ||
| 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 96: | Line 104: | ||
{| class="wikitable | ===BarGraph=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''BarGraph''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Turns on the first N elements of the array - for generating bar graph metes etc. | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| width="90%" | | | width="90%" | Length | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | How many items to light up. | ||
|- | |- | ||
| 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 114: | Line 123: | ||
{| class="wikitable | ===LEDOff=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''LEDOff''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Turn off the selected led. | ||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Index | |||
|- | |- | ||
| colspan="2" | Index of the LED to turn 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 127: | Line 142: | ||
{| class="wikitable | ===LEDOn=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''LEDOn''' | ||
|- | |- | ||
| colspan="2" | Turn | | colspan="2" | Turn on the selected LED. | ||
|- | |- | ||
|- | |- | ||
| Line 145: | Line 161: | ||
{| class="wikitable | ===PointGraph=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PointGraph''' | ||
|- | |- | ||
| colspan="2" | Turns on the Indexed LED and turns all others off. Does nothing if the index is out of range. | | colspan="2" | Turns on the Indexed LED and turns all others off. Does nothing if the index is out of range. | ||
| Line 163: | Line 180: | ||
{| class="wikitable | ===WriteValue=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteValue''' | ||
|- | |- | ||
| colspan="2" | Write a number which is presented on the LEDs in binary. | | colspan="2" | Write a number which is presented on the LEDs in binary. | ||
| Line 179: | Line 197: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 209: | Line 212: | ||
| colspan="2" | The number of LEDs in the array from 1 to 8. | | colspan="2" | The number of LEDs in the array from 1 to 8. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 228: | Line 231: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
| Line 262: | Line 265: | ||
| colspan="2" | Pin status of VCC or GND will be shown when enabled and simualtion is running. | | colspan="2" | Pin status of VCC or GND will be shown when enabled and simualtion is running. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Appearance | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | LEDs |
LED Array component
An array of LED indicators equally spaced and complete with labels to indicate their meaning. Embedded can be used to control an 8-bit port or up to 8 individual pins.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LED_Array_2dgi.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LED_Array_2dgi.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Example program which uses the point graph macro and loops to create a knight rider effect using the LED array.
Example program which reads an analogue value from an analogue input voltage and displays the reading in Binary on the LED array.
LEDs can be wired either active high or active low. The LED Array components 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
AllOff
| AllOff | |
| Turns off all elements | |
| Return | |
AllOn
| AllOn | |
| Turns on all elements | |
| Return | |
BarGraph
| BarGraph | |
| Turns on the first N elements of the array - for generating bar graph metes etc. | |
| Length | |
| How many items to light up. | |
| Return | |
LEDOff
| LEDOff | |
| Turn off the selected led. | |
| Index | |
| Index of the LED to turn on. | |
| Return | |
LEDOn
| LEDOn | |
| Turn on the selected LED. | |
| Index | |
| Index of the LED to turn on. | |
| Return | |
PointGraph
| PointGraph | |
| Turns on the Indexed LED and turns all others off. Does nothing if the index is out of range. | |
| Index | |
| The LED to show. | |
| Return | |
WriteValue
| WriteValue | |
| Write a number which is presented on the LEDs in binary. | |
| Value | |
| Provide a value to be written to the LEDs in binary | |
| Return | |
