Difference between revisions of "Component: DAC (AD5662) (Analog Output)"
Line 22: | Line 22: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 61: | Line 63: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 90: | Line 94: | ||
==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;" | '''OutputDAC''' | ||
+ | |- | ||
+ | | colspan="2" | Outputs a value to the DAC, | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Output | ||
+ | |- | ||
+ | | colspan="2" | Range: 0-65535 / 0=0V / 65535=VCC | ||
+ | |- | ||
+ | | 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" | Initialise the SPI bus 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;" | SPI Properties | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Channel | ||
+ | |- | ||
+ | | colspan="2" | SPI Channel selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Prescale | ||
+ | |- | ||
+ | | colspan="2" | Prescale option selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | MOSI | ||
+ | |- | ||
+ | | colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | MISO | ||
+ | |- | ||
+ | | colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CLK | ||
+ | |- | ||
+ | | colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CS / SS | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |- | ||
+ | | 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%" | Data Recorder Trace | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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 09:55, 27 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 to download the component source project: FC_Comp_Source_DAC_AD5662.fcfx
Please click here to view the component source code (Beta): 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 |
Property reference
==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 |
Property reference
==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 |
Property reference
==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 |
Property reference
==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 |