Go Down

Topic: Connecting an quad 12-bit DAC (AD5024) to an Arduino  (Read 143 times) previous topic - next topic

LargeDogs

Hello forum!

I need to connect an AD5024 to an Arduino Due. Spec sheet here:Link

I know the Due has a DAC already but I need a 4 channel one.

This is my first time connecting and using an external DAC on the board.

The connections look like so: Link

I have written a basic setup function, but am not sure where to go from here to transmit voltage signals so that I may see its output on an oscilloscope.

All three outputs (DIN, SCLK, SYNC) are connected to PWM pins on the DUE.

Code: [Select]

//arduino output pins
#define DIN  2
#define SCLK 3
#define SYNC 4

void setup(){
  pinMode(DIN, OUTPUT);
  pinMode(SCLK,OUTPUT);
  pinMode(SYNC,OUTPUT);

  digitalWrite(DIN,LOW);
  digitalWrite(SCLK,LOW);
  digitalWrite(SYNC,LOW);
}


If anyone could tell me where to start, it'd be much appreciated.

MorganS

What is the purpose of the DAC? Music? Analog control? Then start writing your program to output those sorts of signals and test for those signals.
"The problem is in the code you didn't post."

Microzod_

That DAC requires you to use a SPI bus to talk to it, I assume you are using an Arduino Due since this is the Due part of the site. On the Due the SPI bus is accessed through the separate 6-pin connector towards the back of the board. You need to check out the pin layout map found as a sticky thread in the beginning of this forum to see which pin is which.

When you have connected the DAC to the correct pins on the SPI connector you then need to learn how to use the SPI library provided by Arduino, which is very simple and it consists of calling a SPI.begin() function and then SPI.read()/SPI.write() functions.

If I am not mistaken there are also software SPI that can be implemented on any pins you like.

ard_newbie



Hi,

Google DUE DAC SPI and you will find a .pdf file from chianorobotics which might interest you to connect your external DAC.

Go Up