Component: DAC (MCP47x6) (MCP47x6) (Analog Output)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Analog Output |
Contents
DAC (MCP47x6) (MCP47x6) component
Component to drive a digital to analogue converter (DAC) IC from Microchip via an I2C interface. Compatible with MCP4706 (8-Bit), MCP4716 (10-Bit) and MCP4726 (12-Bit) devices.
Examples
No additional examples
Downloadable macro reference
SetOutput
Sets the output voltage of the DAC
8-Bit: Range 0-255
10-Bit: Range 0-1023
12-Bit: Range 0-4095
Parameters
- UINT DAC_Value
- The value to output to the DAC
Return value
- This call does not return a value
Disable
Disables the DAC output.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Enable
Enables the DAC Output.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Initialise
Configures the I2C peripheral ready for communications and initialises the internal variables. DAC needs to be enabled before any output voltage can be generated.
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
DAC IC
This property is of type Fixed list of ints and can be referenced with the variable name DAC_IC.
Selects which DAC IC is connected and therefore the bit depth available.
Disabled Pull Down
This property is of type Fixed list of ints and can be referenced with the variable name DisPullDown.
Sets the pull down resistance when the IC's DAC output is disabled.
Voltage Reference
This property is of type Fixed list of ints and can be referenced with the variable name VRef.
Sets the Voltage reference option
Gain Option
This property is of type Fixed list of ints and can be referenced with the variable name GainOP.
Provides a 1x or 2x gain on the output. For 2x gain the vref must be max 1/2 VCC.
Vref Voltage
This property is of type Floating point and can be referenced with the variable name VrefVol.
Reference Voltage, Used to calculate the Voltage resolution.
Steps
This property is of type Unsigned integer and can be referenced with the variable name Steps.
Number of discrete output states available from the DAC.
Control Bits
This property is of type Signed integer and can be referenced with the variable name BITS.
Number of digital control bits
Resolution
This property is of type Line of text and can be referenced with the variable name Res.
Maximum output resolution based on number of control bits.
Voltage Resolution
This property is of type Floating point and can be referenced with the variable name VoltRes.
Specifies the Resolution per digital bit in terms of Voltage.
User Address Bits
This property is of type Fixed list of ints and can be referenced with the variable name AddrBits.
Specifies the bottom three "user" bits of the I2C 7-bit address
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c1::CHANNEL.
Channel selection
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)
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.
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
DAC Output Scope Trace
This property is of type True or false and can be referenced with the variable name ScopeTraces.
Selects if the scope traces are automatically generated or not
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_i2c1::ScopeTraces.
Selects if the component pin connections are automatically generated on the data recorder window or not.
Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion.
No: Do not show the pin signals on the data recorder window.
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.
Specifies the injector component on the panel to interact with to provide comms simulation.