Component: LED Matrix (Parallel) (Outputs: LEDs)
Author | Matrix Ltd |
Version | 1.0 (Release) |
Category | Outputs: LEDs |
Contents
LED Matrix (Parallel) component
LED Matrix component designed to work using multiple data pins and a single clock pin. Each LED on the display can be controlled in a chain by setting the data appropriatley and then generating the appropriate amount of clock pulses.
Examples
Parallel LED matrix example schematic showing 16 LEDs connected using two octal buffer ICs. Data connections to the microcontroller are Data0-Data7, LED_EN, Reset and Clock.
Each clock pulse transfers the output state to the next LED so Data0 goes to LED R0D0 and LED R0D0 goes to LED R1D0 etc.
Example Program
Note. to allow the simulation to run smoothly ensure that the simulation speed is set to normal and you may also want to enable hardware acceleration using the Global Options.
Example Panel Display
Downloadable macro reference
StrobeHigh
Sets the strobe pin high.
Strobing controls the LED brightness and does not apply to simulation.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
StrobeLow
Sets the strobe pin low.
Strobing controls the LED brightness and does not apply to simulation.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
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
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
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
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
Flip Display
This property is of type True or false and can be referenced with the variable name flip.
Allows the column and text data sent to the display to be flipped
D0
This property is of type Single digital pin and can be referenced with the variable name d0_pin.
Data0 pin which is used to pass the input LED0 value
D1
This property is of type Single digital pin and can be referenced with the variable name d1_pin.
Data1 pin which is used to pass the input LED1 value
D2
This property is of type Single digital pin and can be referenced with the variable name d2_pin.
Data2 pin which is used to pass the input LED2 value
D3
This property is of type Single digital pin and can be referenced with the variable name d3_pin.
Data3 pin which is used to pass the input LED3 value
D4
This property is of type Single digital pin and can be referenced with the variable name d4_pin.
Data4 pin which is used to pass the input LED4 value
D5
This property is of type Single digital pin and can be referenced with the variable name d5_pin.
Data5 pin which is used to pass the input LED5 value
D6
This property is of type Single digital pin and can be referenced with the variable name d6_pin.
Data6 pin which is used to pass the input LED6 value
D7
This property is of type Single digital pin and can be referenced with the variable name d7_pin.
Data7 pin which is used to pass the input LED7 value
Clock
This property is of type Single digital pin and can be referenced with the variable name clock_pin.
Clock pin used to clock the external buffer IC's
Strobe
This property is of type Single digital pin and can be referenced with the variable name strobe_pin.
Strobe pin used to control the master display state, strobed at high speed using PWM to set the brightness.
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
Row Spacing
This property is of type Floating point and can be referenced with the variable name row_spacing.
Simulation row spacing
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
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.