Difference between revisions of "Component: Digital Potentiometer (MCP44XX) (Analog Output)"
From Flowcode Help
Jump to navigationJump to searchLine 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_MCP44xx_Digital_Pot.fcfx FC_Comp_Source_MCP44xx_Digital_Pot.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MCP44xx_Digital_Pot.fcfx FC_Comp_Source_MCP44xx_Digital_Pot.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MCP44xx_Digital_Pot.fcfx FC_Comp_Source_MCP44xx_Digital_Pot.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 42: | Line 46: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 66: | Line 72: | ||
==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;" | '''IncrementWiper''' | ||
+ | |- | ||
+ | | colspan="2" | Increments a single volatile wiper value | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-3 | ||
+ | |- | ||
+ | | 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;" | '''DecrementWiper''' | ||
+ | |- | ||
+ | | colspan="2" | Decrements a single volatile wiper value | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-3 | ||
+ | |- | ||
+ | | 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;" | '''SetWiper''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the value of a single wiper | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-3 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | 129 Taps Range: 0-128 / 257 Taps Range: 0-256 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
+ | | width="90%" | MemoryType | ||
+ | |- | ||
+ | | colspan="2" | 0=Volatile, 1=Nonvolatile | ||
+ | |- | ||
+ | | 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;" | '''ReadAddress''' | ||
+ | |- | ||
+ | | colspan="2" | Reads a value from one of the registers on the device | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Address | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-15 | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | 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;" | '''WriteAddress''' | ||
+ | |- | ||
+ | | colspan="2" | Writes a value to one of the registers on the device | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Address | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-15 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-256 | ||
+ | |- | ||
+ | | 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" | Startup the I2C peripheral ready for communications. | ||
+ | |- | ||
+ | |- | ||
+ | | 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;" | I2C Properties | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Channel | ||
+ | |- | ||
+ | | colspan="2" | Channel selection | ||
+ | |- | ||
+ | | 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-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%" | 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-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;" | Device Properties | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Number of Taps | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Address Bits | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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 | Analog Output |
Contents
Digital Potentiometer (MCP44XX) component
The MCP44XX device range supports 4 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_MCP44xx_Digital_Pot.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_MCP44xx_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 | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
DecrementWiper |
Decrements a single volatile wiper value | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
SetWiper |
Sets the value of a single wiper | |
![]() |
Index |
Range: 0-3 | |
![]() |
Value |
129 Taps Range: 0-128 / 257 Taps Range: 0-256 | |
![]() |
MemoryType |
0=Volatile, 1=Nonvolatile | |
![]() |
Return |
![]() |
ReadAddress |
Reads a value from one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Return |
![]() |
WriteAddress |
Writes a value to one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Value |
Range: 0-256 | |
![]() |
Return |
![]() |
Initialise |
Startup the I2C peripheral ready for communications. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
IncrementWiper |
Increments a single volatile wiper value | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
DecrementWiper |
Decrements a single volatile wiper value | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
SetWiper |
Sets the value of a single wiper | |
![]() |
Index |
Range: 0-3 | |
![]() |
Value |
129 Taps Range: 0-128 / 257 Taps Range: 0-256 | |
![]() |
MemoryType |
0=Volatile, 1=Nonvolatile | |
![]() |
Return |
![]() |
ReadAddress |
Reads a value from one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Return |
![]() |
WriteAddress |
Writes a value to one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Value |
Range: 0-256 | |
![]() |
Return |
![]() |
Initialise |
Startup the I2C peripheral ready for communications. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
IncrementWiper |
Increments a single volatile wiper value | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
DecrementWiper |
Decrements a single volatile wiper value | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
SetWiper |
Sets the value of a single wiper | |
![]() |
Index |
Range: 0-3 | |
![]() |
Value |
129 Taps Range: 0-128 / 257 Taps Range: 0-256 | |
![]() |
MemoryType |
0=Volatile, 1=Nonvolatile | |
![]() |
Return |
![]() |
ReadAddress |
Reads a value from one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Return |
![]() |
WriteAddress |
Writes a value to one of the registers on the device | |
![]() |
Address |
Range: 0-15 | |
![]() |
Value |
Range: 0-256 | |
![]() |
Return |
![]() |
Initialise |
Startup the I2C peripheral ready for communications. | |
![]() |
Return |