Component: LED Matrix (HT16K33) (Outputs: LEDs)

From Flowcode Help
Revision as of 14:51, 22 May 2018 by BenR (talk | contribs) (XML import - Pre 8.0 release)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.0 (Release)
Category Outputs: LEDs


Image LED Matrix (HT16K33) component

LED Matrix component designed to work using a HT16K33 LED driver IC. Can drive up to 16 x 8 (128) LEDs.

Examples

No additional examples


Downloadable macro reference

DisplayString

Prints an ASCII string onto the LED Matrix a column at a time.

Parameters

<- STRING Data
Data string to display on the LEDs
This parameter may be returned back to the caller
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


Return value

This call does not return a value


SetBrightness

Configures the brightness of the LEDs by varying the On portion of the duty.

Parameters

BYTE Brightness
Range: 0-15 - 0 = Min Brightness, 15 = Full Brightness


Return value

This call does not return a value


ShiftColumns

Shifts the columns one place to the right.

Used for things like displaying scrolling text.

Parameters

BYTE Direction
0 = Shift Left, 1 = Shift Right


Return value

This call does not return a value


ClearLEDs

Sets all of the LEDs in the matrix to the off state.

Parameters

This macro has no parameters


Return value

This call does not return a value


WriteLED

Allows a single LED to be controlled.

Parameters

BYTE Data
0 = LED Off, 1 = LED On
BYTE Row
Range: 0-7
BYTE Column
Range: 0-15


Return value

This call does not return a value


WriteCommand

Writes a command.

Parameters

BYTE Command


Return value

This call does not return a value


WriteColumn

Allows a single column of data to be inserted, Acts to shift the rest of the columns across by one.

Parameters

BYTE Data
Data to display on the column of LEDs
BYTE Column
Range: 0-15


Return value

This call does not return a value


WriteRegister

Writes a value to a register.

Parameters

BYTE Address
BYTE Value


Return value

This call does not return a value


Initialise

Configures the I2C peripheral and sets up the HT16K33 IC ready to drive the LEDs.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

LED Type

This property is of type Fixed list of ints and can be referenced with the variable name led_type.

Active high outputs a logic 1 to set the LED and logic 0 to clear the LED.

Active low outputs a logic 0 to set the LED and logic 1 to clear the LED

Row Count

This property is of type Signed integer and can be referenced with the variable name num_rows.

Number of LED rows

Column Count

This property is of type Signed integer and can be referenced with the variable name num_cols.

Number of LED columns

LED Count

This property is of type Signed integer and can be referenced with the variable name led_cnt.

Total number of LEDs in the component

Slave Address

This property is of type Fixed list of ints and can be referenced with the variable name SlaveAddress.

No additional information


Channel

This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::CHANNEL.

Channel selection

Baud Select

This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::BAUD_LIST.

Baud rate option selector

Baud Rate

This property is of type Signed integer and can be referenced with the variable name cal_i2c1::BAUD.

Baud rate to be used

Stop Delay

This property is of type True or false and can be referenced with the variable name cal_i2c1::StopDel.

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

This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SDA.

Pin used for SDA (data signal)

SCL

This property is of type Single digital pin and can be referenced with the variable name cal_i2c1::SCL.

Pin used for SCL (clock signal)

On Color

This property is of type Color picker and can be referenced with the variable name on_col.

Simulated colour of the LEDs when switched On

Off Color

This property is of type Color picker and can be referenced with the variable name off_col.

Simulated colour of the LEDs when switched Off

Simulation Type

This property is of type Fixed list of ints and can be referenced with the variable name SimType.

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.

Column Spacing

This property is of type Floating point and can be referenced with the variable name col_spacing.

Simulation column spacing

Width

This property is of type Floating point and can be referenced with the variable name width.

Simulation LED width

Row Spacing

This property is of type Floating point and can be referenced with the variable name row_spacing.

Simulation row spacing

Height

This property is of type Floating point and can be referenced with the variable name height.

Simulated LED height

Depth

This property is of type Floating point and can be referenced with the variable name depth.

Simulated LED Depth (3D environments only)

LED Shape

This property is of type Fixed list of ints and can be referenced with the variable name Shape.

Simulated LED basic shape

Redraw LEDs

This property is of type True or false and can be referenced with the variable name redraw.

Simulated LED redraw option, display will not be updated until the redraw is set to Yes.

Automatically revers back to No after the refresh has been performed.

Scope Traces

This property is of type True or false and can be referenced with the variable name cal_i2c1::ScopeTraces.

Selects if the scope traces are automatically generated or not

Console Data

This property is of type True or false and can be referenced with the variable name cal_i2c1::ConsoleData.

Selects if the console data is automatically generated or not

Injector

This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::Injector.

No additional information