Difference between revisions of "Component: DAC (AD5662) (Analog Output)"
Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 51: | Line 53: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 71: | Line 75: | ||
{{Fcfile|AD5662_Demo.fcfx|AD5662_Demo}} | {{Fcfile|AD5662_Demo.fcfx|AD5662_Demo}} | ||
− | == | + | ==Macro reference== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 14:10, 20 January 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Analog Output |
Contents
DAC (AD5662) component
16-bit external DAC connected to the microcontroller using SPI.
Component Source Code
Please click here for the component source code: FC_Comp_Source_DAC_AD5662.fcfx
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.
Macro reference
![]() |
OutputDAC |
Outputs a value to the DAC, | |
![]() |
Output |
Range: 0-65535 / 0=0V / 65535=VCC | |
![]() |
Return |
![]() |
Initialise |
Initialise the SPI bus ready for communications, | |
![]() |
Return |