Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 16: Line 16:


==Component Source Code==
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_LP5036_RGB_LED.fcfx FC_Comp_Source_LP5036_RGB_LED.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LP5036_RGB_LED.fcfx FC_Comp_Source_LP5036_RGB_LED.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LP5036_RGB_LED.fcfx FC_Comp_Source_LP5036_RGB_LED.fcfx]


==Detailed description==
==Detailed description==




Line 42: Line 46:


==Examples==
==Examples==




Line 64: Line 70:


==Macro reference==
==Macro reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRGB'''
|-
| colspan="2" | Gets the RGB colour of a single LED. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Range: 0-11 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RGB
|-
| colspan="2" | Byte array containing at least 3 bytes to store Red, Green and Blue 
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Range: 0-11 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Brightness
|-
| colspan="2" | Brightness value: Range 0-255 
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadReg'''
|-
| colspan="2" | Reads the data from one or more sequential registers 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" |  
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteReg'''
|-
| colspan="2" | Writes data to one or more sequential registers 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" |  
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRGB'''
|-
| colspan="2" | Allows the colour of a single LED to be specified in RGB. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Range: 0-11 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RGB
|-
| colspan="2" | Byte array containing at least 3 bytes to set Red, Green and Blue 
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetBrightness'''
|-
| colspan="2" | Gets the brightness of a single LED. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Range: 0-11 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RGB
|-
| colspan="2" | Byte array containing at least 3 bytes to store Red, Green and Blue 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetUnitAddress'''
|-
| colspan="2" | Allows the component to taklk to more then one IC or broadcast to all connected ICs. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Range: 0-3 = Individual / 4 = Broadcast 
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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. 
|-
|-
| 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''
|}
==Property reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Driver
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Driver IC
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Address Pins
|-
| colspan="2" |  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Channel
|-
| colspan="2" | Channel selection 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Baud Select
|-
| colspan="2" | Baud rate option selector 
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Baud Rate
|-
| colspan="2" | Baud rate to be used 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | SDA
|-
| colspan="2" | Pin used for SDA (data signal) 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | SDA Remap Pin
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | SCL
|-
| colspan="2" | Pin used for SCL (clock signal) 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | SCL Remap Pin
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Stop Delay
|-
| 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="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Simulate Comms
|-
| colspan="2" |  
|}==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 15:23, 20 January 2023

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.

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

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


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


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


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


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


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


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


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



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
 

==Macro reference==

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


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


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


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


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


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


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


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



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
 

==Macro reference==

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


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


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


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


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


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


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


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



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