Part Number: ADS8698EVM-PDK
Hello,
I have issues to communicate with the ADS8698EVM-PDK with an Arduino Uno over SPI.
The connections on the digital interdace I made are the following:
- DAISY, grounded trough J2;
- REFSEL, grounded trough J4;
- RST/PD, i didn' t "get" this signal from anywhere;
- AVDD, i provide 5V trough pin 2 of j32;
- DVDD, I provide 5V trough pin 2 of j33;
- A0+, I connected it to a 3.3V signal.
The voltages on AVDD, DVDD and REFIO are correct. The code I use is the following:
#include "SPI.h"
//ADS8698 pins
const int cs = 10;
//mosi = 11 (SDI)
//miso = 12 (SDO)
//sck = 13 (SCLK)
const int _RST = 9;
#include "SPI.h"
SPISettings ADS8698(8000000, MSBFIRST, SPI_MODE1);
void setup() {
pinMode (cs, OUTPUT);
pinMode (_RST, OUTPUT);
digitalWrite(_RST, HIGH);
delay(10);
Serial.begin(9600);
Serial.println("Test");
delay(1000);
//SPI.beginTransaction(ADS8698);
SPI.begin();
//ADS8698 starts with all channels enabled.
//ADS8698 starts with PGA's set to +/- 2.5*Vref. (LSB = 78,125 uV)
digitalWrite(cs, HIGH);
digitalWrite(cs, HIGH);
digitalWrite(cs, LOW);
SPI.transfer16(0x8500); // reset
digitalWrite(cs, HIGH);
digitalWrite(cs, HIGH);
digitalWrite(cs, LOW);
SPI.transfer16(0xA000); //auto mode
digitalWrite(cs, HIGH);
}
void loop() {
for (byte i = 0; i < 4; ++i){
delay(10);
digitalWrite(cs, LOW);
SPI.transfer(0x00);
SPI.transfer(0x00);
byte MSB = SPI.transfer(0x00);
byte midSB = SPI.transfer(0x00);
byte LSB = SPI.transfer(0x00);
uint32_t result = (MSB << 16) | (midSB << 8) |LSB;
result = result >> 6;
digitalWrite(cs, HIGH);
Serial.print("CH");
Serial.print(i);
Serial.print(": ");
//Serial.println(result);
Serial.print(MSB, HEX);
Serial.print(",");
Serial.print(midSB, HEX);
Serial.print(",");
Serial.print(LSB, HEX);
Serial.print(": ");
Serial.println(result);
delay(5000);
}
}