accessing ADS1299 SPI from Edison, MISO noise

youssef_haryoussef_har Paris
edited June 2015 in Other Platforms

Hey,

 

I have been working on configuring Edison's SPI bus to control the ADS1299 analog to digital converter chip through the mraa library.

While my program is running, I am monitoring the SPI pins (SCLK, MOSI, MISO, and CS1) and it seems that SCLK, MOSI, and CS1 are working correctly. However, the MISO pin only shows noise.

Is there usually a quick fix for this kind of problems? 

PS: I added a pull up resistor to the MISO terminal but that did not fix the issue.

 

In my program, I am only trying to read ADS1299's register #15, which translates into sending 0x35 - 0x00 - 0x00.

Here is the program that I am running: (Eclipse IDE platform)

 

int main(){

     mraa::Spi* spi;

 

     spi = new mraa::Spi(0);

 

     spi->frequency(4000000);

 

     uint8_t data[] = {0x35,0x00,0x00};

     uint8_t rxBuf[3];

 

     if(spi->transfer(data, rxBuf, 3) == MRAA_SUCCESS){

     printf("Received: %i - %i - %i\n",rxBuf[0],rxBuf[1],rxBuf[2]);

     }

     

     usleep(10000);

 

     delete spi;

 

    return MRAA_SUCCESS;

}



Any help would be appreciated. Thanks,


Youssef

Comments

  • biomurphbiomurph Brooklyn, NY
    Can you tell us about your hardware setup? How do you have the ADS1299 set up? Are you using the TI dev mod?
  • Hello,

    Thanks for the reply. I am using Intel Edison to control ADS1299 via the SPI bus. I connected Edison to the upper card of the ADS1299EEG-FE development kit. I am supplying this card with a 3.3 V as digital input and 5 V as analog input. In addition, I am connecting the CLKSEL, RESET, and PWDN pins to the 3.3V. And I am connecting pins 4, 10, and 18 of J3 to ground. Finally, I made sure I had the correct settings for the JPs. 

    My aim is to read 8 input channels, however at this point I am just trying to read 1 ADS1299 register to make sure SPI is working correctly. 

    The mraa library automatically controls the CS pin, however since that did not work and I thought it might be the problem, I tried manually controlling this pin while taking care of the delays I need to add in order for certain instructions to fully execute. But that also did not work.

    Am I missing something in the hardware? Or maybe some initialisation in software? 
    Any help would be appreciated. 

    Thanks,

    Youssef

  • biomurphbiomurph Brooklyn, NY
    It sounds like you have the system set up correctly.
    Your spi frequency is not too fast.
    I am not familiar with the Edison, or the MRAA lib. 
    Do you have a way to scope your signal lines?
Sign In or Register to comment.