Varul Jain
Published

Send Analog Pulse Using DAC — AD5669 with Arduino

Receiving and sending the digital and analog signal through AD5669 interface with Arduino to detect the A/D pulses.

BeginnerFull instructions provided2 hours5,412
Send Analog Pulse Using DAC — AD5669 with Arduino

Things used in this project

Hardware components

National Control Devices AD5669
×1
National Control Devices i2C shield for Arduino UNO
×1
Arduino UNO
Arduino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

AD5669_Arduino

C/C++
#include<Wire.h>

// AD5669 I2C address is 0x56(86)
#define Addr 0x56

void setup()
{
  // Initialise I2C communication as Master
  Wire.begin();
  // Initialise serial communication, set baud rate = 9600
  Serial.begin(9600);
  delay(300);
}

void loop()
{
  unsigned int data[2] = {0x80, 0x00};
  
  // Start I2C transmission
  Wire.beginTransmission(Addr);
  // Select DAC and input register
  Wire.write(0x2F);
  // Write data = 0x8000(32768)
  // data msb = 0x80
  Wire.write(data[0]);
  // data lsb = 0x00
  Wire.write(data[1]);
  // Stop I2C transmission
  Wire.endTransmission();

  // Convert the data, Vref = 5 V
  float voltage = (((data[0] * 256) + (data[1])) / 65536.0) * 5.0;

  // Output data to serial monitor
  Serial.print("Voltage : ");
  Serial.print(voltage);
  Serial.println(" V");
  delay(500);
}

AD5669_Arduino

Node Red Tutorial

Credits

Varul Jain
12 projects • 13 followers
Beginner, Creator, IOT Developer, working with IOT Prototypes

Comments