Hi guys, I am trying to control an EVAL-AD5764 DAC chip with spi via arduino.
I've got a lovely example via the Seekat project at opendacs.com.
However, I am having trouble simply getting the most basic version of SPI.transfer to work.
The first byte sends predictably and the other two are silent. Dont know why.
The ss pin is blue. The clk pin is green and shows 24 bits. The yellow mosi pin only shows the data of the first byte.
#include <SPI.h>
void setup() {
pinMode(53, OUTPUT); // set the SS pin as an output
SPI.begin(); // initialize the SPI library
SPI.beginTransaction(SPISettings(SPI_CLOCK_DIV32, MSBFIRST, SPI_MODE1));
}
void loop() {
digitalWrite(53, LOW); // set the SS pin to LOW
SPI.transfer(0b10101010);
SPI.transfer(0b11001100);
SPI.transfer(0b11101110);
digitalWrite(53, HIGH); // set the SS pin HIGH
}
I have searched for examples and tried several delays and different things but I'm pretty confused why this wont work.
Thank you so much for any help.