This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ads1299 sclk

Other Parts Discussed in Thread: ADS1299, TMS320F28335

hi,greg,i am using ads1299 now,is there any request for the sclk? what is the limitation on the sclk?

  • Hi Sonia,

    Referring to page 8 of the datasheet for the ADS1299 which illustrates the SPI timing characteristics, the limitations on SCLK depend on DVDD. If DVDD is between 2.7 V and 3.6 V then the SCLK period must last at least 50 ns (less than or equal to 20 MHz SCLK frequency). If DVDD is between 1.8 V and 2 V, then an SCLK period must last 66.6 ns (less than or equal to ~15 MHz SCLK frequency).

    Regards,
    Brian Pisani
  • Hi,Brian,is that mean the LSPCLK must be set less than SYSCLKOUT/8(18MHz) when i use tms320f28335?

  • Sonia,

    What is your logic high voltage level? if it is at least 2.7 V then the 18 MHz clock will be sufficient.

    Brian Pisani
  • hi,brian,my logic high level is3.3v.i have another qusetioin ,what is the difference between  baud rate and sclk?

    does the sclk come from the baud rate generator? i have set the baud rate LSPCLK/8 ,is that mean the sclk is LSPCLK/8 too?

  • Hi Sonia,

    If your logic level is 3.3 V, then the 18 MHz serial clock should be fine.

    In general, the difference between baud and bit rate is baud represents the number of symbols which can be represented per second and the bit rate is how many bits can be sent per second. In the case of a single communication line (per direction) as is the case with SPI, the number of bits which are used to transmit each symbol is just 1 since a symbol on one communication line can either be a 1 or a 0. In this case the baud and bit rates are the same.

    For the microcontroller you are using, I believe LSPCLK is the clock which comes to the SPI peripheral from the main clock generator in the core which is then divided by value in the SPIBRR generator to produce the SCLK. So yes, your interpretation is correct. If you are still unsure, look at the SCLK that gets generated off the processor using an oscilloscope and make sure the frequency is what you expect.

    Regards,

    Brian

  • Hi,Brian
    I have test the signal transmit to ads1299,and they are correct ,but when i try to read a register ,i can't get correct reading ,could you give me some advice ? This is my code,the sclk=1.25M.do i have to set the stea as general io,and keep it low level,or send the start opcode ?
    RESET(); //reset ads1299
    DELAY_US(10);
    SDATAC(); //stop RDATAC model
    DELAY_US(4);
    RREG(ADS1299_REG_CONFIG1,1); //read ID register
    //while(SpiaRegs.SPIFFRX.bit.RXFFST!=1);
    // for(i=0;i<2;i++)
    data=SpiaRegs.SPIRXBUF;

    scia_xmit(data); //transmit the reading to the pc by sci
  • Hi Sonia,

    Make sure STEA follows the timing required for the ADS1299 CS pin. If you are not using the SPI bus on the Delfino for multiple devices, I would recommend holding it low at all times to avoid any messy behavior. I posted some more detailed analysis of your code in the other forum thread so please refer to that for my advice.

    Brian Pisani
  • Hi,Brian
    thank you for your help,l really appreciate it.now i can get data from ADS1299.but,i am confused about the single_end input,why the common mode voltage should be introduced into the negative input ?
    regards
    sonia
  • Hey Sonia,

    The output for all of our devices is measured as AINP-AINN; an inherently differential measurement. If you wish to make a single ended measurement, you must make the negative input a known voltage so your measurements can be with respect to that know voltage. Imagine you were using a 0-5V analog supply configuration and you wished to measure a 1Vp single ended signal that was centered at 2.5V with respect to ground (meaning its swings from 3.5V to 2.5V with respect to ground). To do that, you'd want to tie the negative analog input to 2.5V and then measure the signal using the positive analog input. Your output in that case would appear as a signal from AINP-AINN = +1V to -1V since the signal was measured differentially with respect to a DC voltage. Hopefully that clears things up.

    Regards,
    Brian Pisani
  • Hi,Brian

    thank you for your  help.  a 1Vp single ended signal that was centered at 2.5V with respect to ground  is that mean it swing from 3.5v to2.5v  and 2.5 v to1.5v?

     if i want to measure a signal that generated by the signal generator, i doubt if i can connect the signal to the AINP  and the signal ground to the AINN?

    regards

    sonia

     

  • Sonia,

    You've caught my mistake. You're correct; a 1 Vpk signal centered at 2.5V swings from 3.5V to 1.5V and if you tied AINN to 2.5, the signal you'd measure would swing from 1V to -1V. In the scenario I posed by mistake (AINP swings from 3.5-2.5 and AINN is tied to 2.5V), your measurement would swing from 1V to 0V.

    If you wanted to use a signal generator to generate a single-ended signal to measure with the ADC, I'd recommend using a DC power supply with it's ground connected to AVSS and its positive terminal set to 2.5 V and connected to AINN. Then you can use the signal generator with its signal ground also connected to AVSS and its signal output connected to AINP with a 2.5 V offset. That way both AINP and AINN will be centered around 2.5V so your measured output will be centered around 0V.

    Regards,
    Brian Pisani
  • Hi Brian

    i got it ,thank you. now i'm going to measure EEG,but it didn't mention what kind of EEG electrode should be applied to the ads1299EEGFE ,could you give me some advice?

    regards

    sonia

  • Hey Sonia,

    The EVM is for evaluation purposes only and legally I must recommend against using it to do any body testing. What I can say, however, is that the ADS1299 is, at its core, a simple analog-to digital converter. Any electrode which can carry an electrical signal to the inputs of the device will be sufficient as a pairing with the ADS1299.

    Regards,
    Brian Pisani
  • Hi Brian

    i'll take the safe into consideration ,thank you for your advice .

    best wishes

     

  • Hi Brian,

    sorry to trouble you,but i got a proble when i tried to measure the EMG.I had measure the test signl on chip , when i measured the EMG  in Channel 1, i can't get any signal .

    I place the positive electrode and the BIAS_ELEC on the same arm and  short  the 3,4 of JP25,so the mid-supply can be introduced to the negative input through SRB1,and to my body through biad electrode .

    But i find Channel 1 is always 0,and Channel 8 always have signal even when i power it down. this is my code, could you give me some advice?

    WREG(ADS1299_REG_CONFIG3,1,0xe0);       //enable internal reference
       WREG(ADS1299_REG_CH1SET,1,0x20);        // gain=4,normal electrode input
       WREG(ADS1299_REG_MISC1 ,1,0x20);        //enable SRB1
       WREG(ADS1299_REG_CH2SET ,1,0x90);       //power down the rest channel
       WREG(ADS1299_REG_CH3SET ,1,0x90);
       WREG(ADS1299_REG_CH4SET ,1,0x90);
       WREG(ADS1299_REG_CH5SET ,1,0x90);
       WREG(ADS1299_REG_CH6SET ,1,0x90);
       WREG(ADS1299_REG_CH7SET ,1,0x90);
       WREG(ADS1299_REG_CH8SET ,1,0x90);

  • Hey Sonia,

    I believe you are floating the SRB1 pin under the circumstances you described. Shorting pins 3 and 4 of JP25 will short the bias amplifier output and the positive inputs for all the channels. In addition, you have powered off the bias amplifier. To power it on with a mid-supply output, change the CONFIG3 register to 0xEC from 0xE0. Then, by removing the short between pins 3 and 4 and shorting pins 5 and 6, all the negative input channels will be connected to mid-supply and the positive channel voltages will come from the SMA connector or J6.

    As I said before, I can't give you advice about where to place electrodes on yourself. What I can say is that in most biopotential measurement applications, it is necessary to stabilize the common mode voltage on the body by connecting the bias amplifier output to an electrode on the body.

    Regarding the data reading from powered-down channels, I believe that only the device will only output data from channels that are powered on so I doubt the data you are reading is conversion data from channel 8. I will make sure and let you know if that is not the case.

    Regards,
    Brian Pisani
  • Hi Brian,

    i have shorted 5 ,6 of JP25 to introduce the mid supply to the negative input ,and connect the bias eletrode to JP17 to introduce the BIAS_DRV to my arm ,but the signal in channel 1 is still 0,even in differential input mode that i put the negative electrode and the positive electrode on my arm.

    And i can measure the test signal in channel 1. I'm confused about it. 

    WREG(ADS1299_REG_CONFIG3,1,0xe0); //
    WREG(ADS1299_REG_CONFIG2,1,0xd0); //internal test signal amplitude=5/2.4mv fre=fCLK/2
    WREG(ADS1299_REG_CH1SET,1,0x25);
    //WREG(ADS1299_REG_MISC1 ,1,0x20); //enable SRB1
    //WREG(ADS1299_REG_BIASSENSP ,1,0x01);
    //WREG(ADS1299_REG_BIASSENSN ,1,0x01);
    WREG(ADS1299_REG_CH2SET ,1,0x90); //power down the rest channel
    WREG(ADS1299_REG_CH3SET ,1,0x90);
    WREG(ADS1299_REG_CH4SET ,1,0x90);
    WREG(ADS1299_REG_CH5SET ,1,0x90);
    WREG(ADS1299_REG_CH6SET ,1,0x90);
    WREG(ADS1299_REG_CH7SET ,1,0x90);
    WREG(ADS1299_REG_CH8SET ,1,0x90);

    regards

    sonia

  • Sonia,

    JP17 will connect the BIASOUT pin to an amplifier that is not installed. I think what you meant to do is to short pins 1 and 2 of JP1. That will connect the BIASOUT pin to the BIAS_ELEC net which in turn you have shorted to the REF_ELEC net. Is the data you are getting exactly zero or does it look like noise?

    Regards,
    Brian Pisani
  • Hi Brian,

    the signal doesn't  look  like noise ,it is always 0.when i set channel 1 in normal input mode, i put the positive electrode and the negative electrode on my arms ,but the signal is 0,without a fluctuation.

    i don't know why? shoud i connect my arm to the ground of the ads1299?

    regars

    sonia

  • HI Brian,
    i introduce a square wave to channel 1,positive electrode connected to signal ,tp8(ground of ads1299) connected to signal ground ,and i short 5,6of JP25 to introduce mid-supply to negative input,but the channel 1is still 0,channel 8 get some signal that varies with the frequnce of the square wave .
  • Hey Sonia,

    Is it possible for there to be a bug in your program where you turn on channel 8 by mistake and turn off channel 1? That would explain why you get any data at all on channel 8.

    Regards,
    Brian Pisani
  • Hi Brian,

    i the signal of channel 1 doesn't varies when i put a an electrode on my hand ,i set the negative inpu mid-supply,this is the wave and my code,is there any bug in my code ?

     RESET();      //reset ads1299
       DELAY_US(20);
       SDATAC(); //stop RDATAC model
       DELAY_US(8);
       WREG(ADS1299_REG_CONFIG3,1,0xe0);       //
       //WREG(ADS1299_REG_CONFIG2,1,0xd0);       //internal test signal amplitude=5/2.4mv fre=fCLK/2
       WREG(ADS1299_REG_CH1SET,1,0x20);
       WREG(ADS1299_REG_MISC1 ,1,0x20);        //enable SRB1
       //WREG(ADS1299_REG_BIASSENSP ,1,0x01);
       //WREG(ADS1299_REG_BIASSENSN ,1,0x01);
       //WREG(ADS1299_REG_CH2SET ,1,0x90);       //power down the rest channel
       //WREG(ADS1299_REG_CH3SET ,1,0x25);
      // WREG(ADS1299_REG_CH4SET ,1,0x25);
       //WREG(ADS1299_REG_CH5SET ,1,0x25);
       //WREG(ADS1299_REG_CH6SET ,1,0x25);
       //WREG(ADS1299_REG_CH7SET ,1,0x25);
       //WREG(ADS1299_REG_CH8SET ,1,0x25);
       START();
    while(1)
     { while(flag==1)
       {while(GpioDataRegs.GPCDAT.bit.GPIO71!=0);//DRDY is low
       RDATA();
       DELAY_US(200);
       for(i=0;i<27;i++)
        {spi_xmit(0x00);
         while(SpiaRegs.SPIFFRX.bit.RXFFST!=1);
         dat=SpiaRegs.SPIRXBUF;//read  data
         scia_xmit(dat);
         }
        }
     }

    }

     

  • Hey Sonia,

    You appear to be getting actual data! It seems to look very noisy though. When you say that you see no variation when you put it on your hand, does that mean that there is no variation between when it is on your hand and when it isn't? Are you using a right leg electrode that is connected to the RLD amplifier? Without using a right leg electrode that is actively driven, the signal may be prone to drift due to noise that couples on to the body from a multitude of sources.

    Regards,
    Brian Pisani
  • Hi Brian,

    thank you for your advice,i found   something  wrong when receiving data,and i had fixed it .now i can measure signal in differential input mode,but the channel got a lot of noise like this when nothing introduced to the channel .

    besides, i found  the voltage of  channel 1,2,5,6,7,8 are about 2.5 v   when i measure the supply in bipolar  .

    Is that should be 0 when AVDD is 2.5v and AVSS is -2.5v ?

    regars

    sonia

  • Hey Sonia,

    When you say the channel is not connected to anything, do you mean that it is left floating? If so, one would expect the data to look like noise. Is there as much noise when the channel is actively driven?

    Under what conditions were you measuring the other channels? What input voltage is being introduced on to the other channels when you measure their output as 2.5 V?

    Regards,
    Brian Pisani
  • Hi Brian,

    The input pin is floating when i say it is not connect,and there is still so much noise when it is actively driven.

    when i measre supply ,i set mux 011 in biopolar supply. is the noise  power line interference?

    regars

    sonic

  • Hey Sonia,

    The noise you see when the inputs are actively driven very well could be power line interference. To say for sure, collect some data with the inputs actively driven and measure the period of the first harmonic of the noise. If the frequency is the same as your local utility frequency, then that is likely causing the noise.

    The power supply measurement will be made with respect to AVSS. So if you read a voltage of 2.5 volts with +/-2.5V bipolar supplies, it is correct since 0 V - (-2.5 V) = 2.5 V

    Regards,
    Brian Pisani
  • Hi Brian,

    now ,i wanna remove the interference with labview .is the sampling frequence of the filter coefficients should be set at 250,when the ads1299 DR is 250sps?

    in the power spectrum of the interference array as follows ,the frequence of the interference is at 100 and 150 (  the Δf=fs/N,fs=250(DR=250SPS)).as

    the power line interference is at 50hz in my country,is something wrong ?or the filter sampling frequence should not be set to 250,though the DR is 250sps,considering the transmitting time and delay ?

     

    regars

    sonia

  • Hey Sonia,

    Unfortunately we do not support code changes to the EVM software. However I do have an explanation why you might be seeing magnitude at 100 Hz and 150 Hz. Those are harmonics of the utility frequency. A low pass filter could eliminate those frequencies if they are out of your signal bandwidth.

    Regards,
    Brian Pisani
  • Hi Brian,
    when the drdy is low ,i read data in RDATA mode,and transmit the data to pc,
    considering the settling time and transmitting delay,
    will the data missing if the next converting data is ready and the current transmitting is not over?
    or the dada will wait which mean the drdy whill hold high until you read the new data?
  • Hey Sonia,

    There is no "FIFO" on the device for data to be stored temporarily in case some host process takes longer than one conversion cycle. When a new conversion is available and the past conversion has not been read, the last conversion will be lost.

    Regards,
    Brian Pisani
  • Hi Brian

    when i introduced a sinusoidal wave into channel 1 in differential mode, set  conifg3 at 0xe0, channel 1 at 0x20 in the register.

     the data  i got  is as the following picture.it  seems different from the sinusoidal wave,could you tell me why?

    regars

    sonic

     

     

     

  • Hey Sonia,

    Without knowing the data rate I cannot say for sure, but it looks as if utility noise is coupling in through your inputs and modulating the signal you are providing.

    Regards,
    Brian Pisani