Jump to content

Component: Digital Potentiometer (MCP41XX / MCP42XX) (Analog Output)

From Flowcode Help
Revision as of 09:58, 27 January 2023 by Wiki bot (talk | contribs)
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.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

IncrementWiper
Increments a single volatile wiper value 
- BYTE Index
Range: 0-1 
- 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-1 
- UINT Value
129 Taps Range: 0-128 / 257 Taps Range: 0-256 
- BOOL 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



Property reference

Properties
SPI 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.  
Device Properties
Number of Outputs
 
Number of Taps
 
Simulation
Simulate Comms
 

==Macro reference==

IncrementWiper
Increments a single volatile wiper value 
- BYTE Index
Range: 0-1 
- 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-1 
- UINT Value
129 Taps Range: 0-128 / 257 Taps Range: 0-256 
- BOOL 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



Property reference

Properties
SPI 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.  
Device Properties
Number of Outputs
 
Number of Taps
 
Simulation
Simulate Comms
 

==Macro reference==

IncrementWiper
Increments a single volatile wiper value 
- BYTE Index
Range: 0-1 
- 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-1 
- UINT Value
129 Taps Range: 0-128 / 257 Taps Range: 0-256 
- BOOL 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



Property reference

Properties
SPI 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.  
Device Properties
Number of Outputs
 
Number of Taps
 
Simulation
Simulate Comms
 

==Macro reference==

IncrementWiper
Increments a single volatile wiper value 
- BYTE Index
Range: 0-1 
- 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-1 
- UINT Value
129 Taps Range: 0-128 / 257 Taps Range: 0-256 
- BOOL 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



Property reference

Properties
SPI 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.  
Device Properties
Number of Outputs
 
Number of Taps
 
Simulation
Simulate Comms