Difference between revisions of "Component: DAC (AD5662) (Analog Output)"

From Flowcode Help
Jump to navigationJump to search
Line 14: Line 14:
 
==DAC (AD5662) component==
 
==DAC (AD5662) component==
 
16-bit external DAC connected to the microcontroller using SPI.
 
16-bit external DAC connected to the microcontroller using SPI.
 +
 +
==Component Pack==
 +
 +
COMMSA
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 41: Line 47:
  
 
==Examples==
 
==Examples==
 +
 +
  
  

Revision as of 16:30, 7 January 2022

Author Matrix TSL
Version 1.0
Category Analog Output


DAC (AD5662) component

16-bit external DAC connected to the microcontroller using SPI.

Component Pack

COMMSA

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:

AD5662 Pin Reference.png

Circuit Diagram

AD5662 Circuit Diagram.png

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.

FC6 Icon.png AD5662_Demo

Downloadable macro reference

Fc9-comp-macro.png OutputDAC
Outputs a value to the DAC,  
Fc9-u16-icon.png - UINT Output
Range: 0-65535 / 0=0V / 65535=VCC 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Initialise the SPI bus ready for communications, 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png CS / 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.  
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-16-icon.png API
 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations
Fc9-type-7-icon.png Data Recorder Trace
 
Fc9-type-7-icon.png Simulate Comms