ADS1299 SPI communication with teensy 4.1

Hi everyone. I am trying to get my teensy 4.1 to communicate with an ADS1299. I am using this code from GitHub and my pins are
MISO 12
MOSI 11
CS 10
SCK 13
RST 8
DRDY 9

/* main.cpp
 * This file contains demo code to test the ADS1299
 *
 * Check configs.h file for configurations that can be set
 *
 * Authors: Mingye Chen
 */
#include <SPI.h>
#include "ADS1299.h"

ADS1299 ADS;

void setup() {
  Serial.begin(115200);
  Serial.println();
  Serial.println("Serial starting");

  ADS.setup(9,10,8,1);
  ADS.STARTUP();
  ADS.getID();
  Serial.println("----------------------------------------------");
  //PRINT ALL REGISTERS
  ADS.RREG(0x00, 0x17);
  Serial.println("----------------------------------------------");
  delay(2000);
}

void loop() {
  #ifdef DATA_LOGGER_MODE
  ADS.RDATA_logger();
  #else
  ADS.RDATA_update();
  #endif
}

When I run the code I read all the register but they are all equal to 11111111 and when I try WREG to a register it says that the register has been modified but it does not. It also does not print the Data update. When my ADS is not plugged it print the register but everything is 0 and the data update is print and its 0 to.
I have no idea what could be wrong exept but it must be communication related maybe CLK or MISO pin alway HIGH ?

It won't work without GND and power connections. You might have done that, but you see why we are always asking for a wiring diagram and not textual descriptions.
Also post schematics as you cannot connect to this chip directly (by wires).

Also post a link to the library you're using as you don't seem to use the first result of a search (you have a setup() method with 4 arguments) and the IDE library manager doesn't offer such a library.

Sounds like a hardware problem.

1 Like

Thank you for your response pylon. Here is the diagram.
Please note that I am using a custom PCB borad with the ADS which means the 3.3V pins is not directly wired to DVDD and AVDD. But i use one unique Vin for both pins.
Here is the link for the library

At least the decoupling capacitor is missing, according to the datasheet a lot more components are necessary and all AVSS pins must be connected to the analog voltage, same applies to other pins which exist several times.

Take a look at the datasheet and provide at least the components they have in the example layout.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.