Jump to content

Component: RGB LED LP5030 LP5036 (LEDs): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(3 intermediate revisions by the same user not shown)
Line 89: Line 89:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetBrightness'''
| width="90%" class="mtx-class-macrohead" | '''GetBrightness'''
|-
|-
| colspan="2" | Gets the brightness of a single LED. 
| colspan="2" | Gets the brightness of a single LED. 
Line 113: Line 113:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDiscreteRGB'''
| width="90%" class="mtx-class-macrohead" | '''GetDiscreteRGB'''
|-
|-
| colspan="2" | Gets the RGB format colour of a single LED. 
| colspan="2" | Gets the RGB format colour of a single LED. 
Line 137: Line 137:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRGB'''
| width="90%" class="mtx-class-macrohead" | '''GetRGB'''
|-
|-
| colspan="2" | Gets the RGB colour of a single LED. Array variables only. For individual variables, use GetDiscreteRGB 
| colspan="2" | Gets the RGB colour of a single LED. Array variables only. For individual variables, use GetDiscreteRGB 
Line 161: Line 161:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Starts up the I2C comms ready for communicating with the LP503x module. Must be called before any of the other component macros are called. 
| colspan="2" | Starts up the I2C comms ready for communicating with the LP503x module. Must be called before any of the other component macros are called. 
Line 175: Line 175:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadReg'''
| width="90%" class="mtx-class-macrohead" | '''ReadReg'''
|-
|-
| colspan="2" | Reads the data from one or more sequential registers 
| colspan="2" | Reads the data from one or more sequential registers 
Line 204: Line 204:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBrightness'''
| width="90%" class="mtx-class-macrohead" | '''SetBrightness'''
|-
|-
| colspan="2" | Allows the brightness of a single LED to be specified as a byte from 0 to 255. Default on reset is 255. 
| colspan="2" | Allows the brightness of a single LED to be specified as a byte from 0 to 255. Default on reset is 255. 
Line 228: Line 228:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDiscreteRGB'''
| width="90%" class="mtx-class-macrohead" | '''SetDiscreteRGB'''
|-
|-
| colspan="2" | Allows the colour of a single LED to be specified in RGB format 
| colspan="2" | Allows the colour of a single LED to be specified in RGB format 
Line 262: Line 262:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRGB'''
| width="90%" class="mtx-class-macrohead" | '''SetRGB'''
|-
|-
| colspan="2" | Allows the colour of a single LED to be specified in RGB. Array variables only. For individual variables and literal values, use SetDiscreteRGB 
| colspan="2" | Allows the colour of a single LED to be specified in RGB. Array variables only. For individual variables and literal values, use SetDiscreteRGB 
Line 286: Line 286:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetUnitAddress'''
| width="90%" class="mtx-class-macrohead" | '''SetUnitAddress'''
|-
|-
| colspan="2" | Allows the component to taklk to more then one IC or broadcast to all connected ICs. 
| colspan="2" | Allows the component to taklk to more then one IC or broadcast to all connected ICs. 
Line 305: Line 305:
|-
|-
| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteReg'''
| width="90%" class="mtx-class-macrohead" | '''WriteReg'''
|-
|-
| colspan="2" | Writes data to one or more sequential registers 
| colspan="2" | Writes data to one or more sequential registers 
Line 334: Line 334:
{| 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;" | Driver
| width="90%" class="mtx-class-propfolder" | Driver
|-
|-
|-
|-
Line 352: Line 352:
| colspan="2" |  
| colspan="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;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 396: Line 396:
| colspan="2" | 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.  
| colspan="2" | 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.  
|-
|-
| 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
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 1.0
Category LEDs


RGB LED LP5030 LP5036 component

An I2C Based RGB LED driver with 30 or 36 individual constant-current sinks. Used to drive 10 or 12 RGB LEDs with a wide range of applications.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetBrightness

GetBrightness
Gets the brightness of a single LED. 
- BYTE Address
Range: 0-11 
- BYTE RGB
Byte array containing at least 3 bytes to store Red, Green and Blue 
- BYTE Return


GetDiscreteRGB

GetDiscreteRGB
Gets the RGB format colour of a single LED. 
- BYTE Address
Range: 0-11 
- BYTE ColourIndex
 
- BYTE Return


GetRGB

GetRGB
Gets the RGB colour of a single LED. Array variables only. For individual variables, use GetDiscreteRGB 
- BYTE Address
Range: 0-11 
- BYTE RGB
Byte array containing at least 3 bytes to store Red, Green and Blue 
- VOID Return


Initialise

Initialise
Starts up the I2C comms ready for communicating with the LP503x module. Must be called before any of the other component macros are called. 
- VOID Return


ReadReg

ReadReg
Reads the data from one or more sequential registers 
- BYTE Address
 
- BYTE Data
 
- BYTE Count
 
- VOID Return


SetBrightness

SetBrightness
Allows the brightness of a single LED to be specified as a byte from 0 to 255. Default on reset is 255. 
- BYTE Address
Range: 0-11 
- BYTE Brightness
Brightness value: Range 0-255 
- VOID Return


SetDiscreteRGB

SetDiscreteRGB
Allows the colour of a single LED to be specified in RGB format 
- BYTE Address
Range: 0-11 
- BYTE Red
 
- BYTE Green
 
- BYTE Blue
 
- VOID Return


SetRGB

SetRGB
Allows the colour of a single LED to be specified in RGB. Array variables only. For individual variables and literal values, use SetDiscreteRGB 
- BYTE Address
Range: 0-11 
- BYTE RGB
Byte array containing at least 3 bytes to set Red, Green and Blue 
- VOID Return


SetUnitAddress

SetUnitAddress
Allows the component to taklk to more then one IC or broadcast to all connected ICs. 
- BYTE Address
Range: 0-3 = Individual / 4 = Broadcast 
- VOID Return


WriteReg

WriteReg
Writes data to one or more sequential registers 
- BYTE Address
 
- BYTE Data
 
- BYTE Count
 
- VOID Return


Property reference

Properties
Driver
Driver IC
 
Address Pins
 
Connections
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
SDA
Pin used for SDA (data signal) 
SDA Remap Pin
 
SCL
Pin used for SCL (clock signal) 
SCL Remap Pin
 
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.  
Simulation
Simulate Comms
 

Component Source Code

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

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