Difference between revisions of "Component: DAC (AD5662) (Analog Output)"
Line 31: | Line 31: | ||
[[File:AD5662 Pin Reference.png]] | [[File:AD5662 Pin Reference.png]] | ||
+ | |||
+ | ===Circuit Diagram=== | ||
+ | [[File:AD5662 Circuit Diagram.png]] | ||
==Examples== | ==Examples== | ||
Line 38: | Line 41: | ||
{{Fcfile|AD5662_Demo.fcfx|AD5662_Demo}} | {{Fcfile|AD5662_Demo.fcfx|AD5662_Demo}} | ||
− | + | ||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Revision as of 15:15, 1 October 2021
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Analog Output |
Contents
DAC (AD5662) component
16-bit external DAC connected to the microcontroller using SPI.
Detailed description
Overview
The AD5662 is a 3V/5V general purpose SPI compatible, high-resolution digital to analog converter (DAC), capable of generating a rail-to-rail voltage output.
With 16-Bit resolution, the AD5662 is capable of finely tuning the voltage output across 65,536 steps, with an individual step voltage of 5/65536 = 0.0000763 volts DC.
The AD5662 requires an external reference voltage to set the output range of the DAC.
Pin reference from the datasheet:
Circuit Diagram
Examples
This example reads a potentiometer that is connected across the supply voltage. The output from the DAC should mimic the voltage that's across ADC pin & GND.
Downloadable macro reference
OutputDAC
Outputs a value to the DAC,
Parameters
- UINT Output
- Range: 0-65535 / 0=0V / 65535=VCC
Return value
- This call does not return a value
Initialise
Initialise the SPI bus ready for communications,
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
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::CHANNEL.
SPI Channel selector
Prescale
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::PR_SCALE.
Prescale option selector
MOSI
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::MOSI.
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
MISO
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::MISO.
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
CLK
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::CLK.
SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
CS / SS
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::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.
Simulate Comms
This property is of type True or false and can be referenced with the variable name SimulateComms.
No additional information
Console Data
This property is of type True or false and can be referenced with the variable name cal_spi1::ConsoleData.
Selects if the console data is automatically generated or not
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_spi1::ScopeTraces.
Selects if the scope traces are automatically generated or not
Injector
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::Injector.
No additional information