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 ?