Skip to content

Arduino library for the Analog Devices AD5781/AD5791 18-/20-bit precision DAC

License

Notifications You must be signed in to change notification settings

PatrickBaus/Arduino-AD57X1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino-AD57X1

This library is still work in progress and not all features of the DACs are supported. Basic functionality is implemented. More documentation will be added soon.

Examples

This is a simple example, to get going. Check out the more in depth examples in /examples/

#include "src/Arduino-AD57X1/src/ad57X1.h"

#define CS_AD5781              7
AD5781 ad5781(CS_AD5781, &SPI);   // Use AD5791 if using the 20 bit version

void setup() {
  ad5781.begin();   // Set the pin modes
  SPI.begin();
  ad5781.setOffsetBinaryEncoding(true);   // Set the input encoding to offset binary. Default is 2s complement (false).

  ad5781.enableOutput();    // Turn on the DAC. After startup the output will be clamped to GND and disconnected (tri-state mode)
  ad5781.setValue(0x3FFFF); // Set to full scale output
}

void loop() {

}

About

Arduino library for the Analog Devices AD5781/AD5791 18-/20-bit precision DAC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages