Author
|
Matrix TSL
|
Version
|
1.0
|
Category
|
Analog Output
|
Digital Potentiometer (MCP41XX / MCP42XX) component
The MCP41XX and MCP42XX device range supports up to 2 digital potentiometers or rheostat outputs. 129 or 257 possible output resistance values for each channel.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
IncrementWiper
|
Increments a single volatile wiper value
|
- BYTE
|
Index
|
Range: 0-3
|
- VOID
|
Return
|
|
DecrementWiper
|
Decrements a single volatile wiper value
|
- BYTE
|
Index
|
Range: 0-1
|
- VOID
|
Return
|
|
SetWiper
|
Sets the value of a single wiper
|
- BYTE
|
Index
|
Range: 0-3
|
- UINT
|
Value
|
129 Taps Range: 0-128 / 257 Taps Range: 0-256
|
[[File:]] -
|
MemoryType
|
0=Volatile, 1=Nonvolatile
|
- VOID
|
Return
|
|
ReadAddress
|
Reads a value from one of the registers on the device
|
- BYTE
|
Address
|
Range: 0-15
|
- UINT
|
Return
|
|
WriteAddress
|
Writes a value to one of the registers on the device
|
- BYTE
|
Address
|
Range: 0-15
|
- UINT
|
Value
|
Range: 0-256
|
- VOID
|
Return
|
|
Initialise
|
Startup the SPI peripheral ready for communications.
|
- 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
|
|
Refresh
|
Clocks out the current colour data to the LEDs from the values stored in RAM
|
- VOID
|
Return
|
|
ShiftLEDs1D
|
Shifts the LED colours in 1D and wraps
|
- BYTE
|
Direction
|
0 = Forwards, 1 = Backwards
|
- BYTE
|
DataMode
|
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear
|
- VOID
|
Return
|
|
DrawLine3D
|
Draws a line on a 3D array of LEDs
|
- UINT
|
X1
|
Start X Coordinate
|
- UINT
|
Y1
|
Start Y Coordinate
|
- UINT
|
Z1
|
Start Z Coordinate
|
- UINT
|
X2
|
End X Coordinate
|
- UINT
|
Y2
|
End Y Coordinate
|
- UINT
|
Z2
|
End Z Coordinate
|
- BYTE
|
R
|
Red Colour Channel
|
- BYTE
|
G
|
Green Colour Channel
|
- BYTE
|
B
|
Blue Colour Channel
|
- VOID
|
Return
|
|
Delay_T1H
|
|
- VOID
|
Return
|
|
GetLEDIndex2D
|
Sets the index of a single LED in RAM as a 2D array.
|
- UINT
|
X
|
LED Column to change the colour / Range: 0 to (LED Column - 1)
|
- UINT
|
Y
|
LED Row to change the colour / Range: 0 to (LED Row - 1)
|
- UINT
|
Return
|
|
DrawRectangle2D
|
Draws a basic 2D rectangle onto the LEDs
|
- BYTE
|
X1
|
|
- BYTE
|
Y1
|
|
- BYTE
|
X2
|
|
- BYTE
|
Y2
|
|
- BYTE
|
DrawStyle
|
Sets the draw style - 0=Soild, 1=Edge, 2=Corners
|
- BYTE
|
R
|
|
- BYTE
|
G
|
|
- BYTE
|
B
|
|
- VOID
|
Return
|
|
ShiftLEDs2D
|
Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable***
|
[[File:]] -
|
X
|
Number of pixels to shift the display -1 to 1 / 0 = No Shift
|
[[File:]] -
|
Y
|
Number of pixels to shift the display -1 to 1 / 0 = No Shift
|
- BYTE
|
DataMode
|
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear
|
- VOID
|
Return
|
|
GetLEDIndex3D
|
Gets the index of a single LED in RAM as a 3D array.
|
- UINT
|
X
|
LED Column to change the colour / Range: 0 to (LED Column - 1)
|
- UINT
|
Y
|
LED Row to change the colour / Range: 0 to (LED Row - 1)
|
- UINT
|
Z
|
LED Layer to change the colour / Range: 0 to (LED Layer - 1)
|
- UINT
|
Return
|
|
DrawCuboid3D
|
Draws a basic 3D cuboid onto the LEDs
|
- BYTE
|
X1
|
Start X pixel coordinate
|
- BYTE
|
Y1
|
Start Y pixel coordinate
|
- BYTE
|
Z1
|
Start Z pixel coordinate
|
- BYTE
|
X2
|
End X pixel coordinate
|
- BYTE
|
Y2
|
End Y pixel coordinate
|
- BYTE
|
Z2
|
End Z pixel coordinate
|
- BYTE
|
DrawStyle
|
Sets the draw style - 0=Soild, 1=Edge, 2=Corners
|
- BYTE
|
R
|
Red Colour Channel
|
- BYTE
|
G
|
Green Colour Channel
|
- BYTE
|
B
|
White Colour Channel
|
- VOID
|
Return
|
|
Initialise
|
Inisialises the RGB colour RAM to 0,0,0 = LED Off and clocks out the data to initialise all the LED ICs in the chain.
|
- VOID
|
Return
|
|
ShiftLEDs3D
|
Shifts the contents of the display by the number of vertices specified ***Please Note that Wrap mode is currently unavailable***
|
[[File:]] -
|
X
|
Number of pixels to shift the display -1 to 1 / 0 = No Shift
|
[[File:]] -
|
Y
|
Number of pixels to shift the display -1 to 1 / 0 = No Shift
|
[[File:]] -
|
Z
|
Number of pixels to shift the display -1 to 1 / 0 = No Shift
|
- BYTE
|
DataMode
|
0=ResetToZero, 1=WrapAroundDisplay, 2=Smear
|
- VOID
|
Return
|
|
Initialise
|
Sets up the data memory and draws the simulated LED cube on the panel.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Channel
|
SPI Channel selector
|
|
Prescale
|
Prescale option selector
|
|
MOSI
|
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
|
|
MOSI Remap Pin
|
Select which the target pin to assign the MOSI hardware pin functionality.
|
|
MISO
|
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
|
|
MISO Remap Pin
|
Select which the target pin to assign the MISO hardware pin functionality.
|
|
CLK
|
SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
|
|
CLK Remap Pin
|
Select which the target pin to assign the CLK hardware pin functionality.
|
|
CS / SS
|
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.
|
|
Number of Outputs
|
|
|
Number of Taps
|
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
|
Console Data
|
Selects if the console data is automatically generated or not
|
|
API
|
|
|
Connections
|
|
Simulations
|
|
Simulate Comms
|
|