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 Strange lead off behaviour.

Other Parts Discussed in Thread: ADS1299

Hi guys,

I am experiencing a very strange set of behaviour which I have been mulling over for weeks and have come to a dead end.

I have an ADS1299 connected to a C6748 DSP, I am attempting to set up the lead off functionality to run continuously @ FDR/4 (FDR = 8KSPS),

I set up all registers by DMAing the following array to the ADS1299

{0x41, 0x16, 0x91, 0xC0, 0x60, 0x00, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00}

I then at intervals of 10mS send the following commands to set the Lead off, config4, lead off sensp and lead off sensn registers.

Lead off = {0x44, 0x00, 0x07};

Config4 = {0x57, 0x00, 0x02};

Sensp = {0x4F, 0x00, 0xFF};

Sensn = {0x50, 0x00, 0xFF};

reading back all registers shows what I would expect and matches a previous version of software I had prior to the implementation of DMA which worked as expected. 

ID = 0x3E

CONFIG1 = 0x91

CONFIG2 = 0xC0

CONFIG3 = 0x61

LOFF = 0x07

CH1SET = 0x50

CH2SET = 0x50

CH3SET = 0x50

CH4SET = 0x50

CH5SET = 0x50

CH6SET = 0x50

CH7SET = 0x50

CH8SET = 0x50

BIAS_SENSP = 0x00

BIAS_SENSN = 0x00

LOFF_SENSP = 0xFF

LOFF_SENSN = 0xFF

LOFF_FLIP = 0x00

LOFF_STATN = 0x00

LOFF_STATP = 0x00

GPIO = 0x0F

MISC1 = 0x00

MISC2 = 0x00

CONFIG4 = 0x02

I am then using the data ready signal from the ADS1299 to trigger a DMA transfer of 27 bytes (all 0x00) to the ADS1299 via the SPI bus, with no inputs connected I would expect the needle status bytes to be 0xFF and 0xFF, the actual values returned are 0x87 for the positive and 0x00 for the negative.

Situations that I can get it to work correctly:

  1. changing from AC lead off (LOFF = 0x07) to DC lead off (LOFF = 0x00) I receive back values as expected for both electrodes based on any combination of leads connected.
  2.  reverting back to my pre-DMA software, I don't see how this could make a difference as all the registers read back match up with the post-DMA version.

The only differences I can see between the two versions of software are:

  • DMA instead of interrupt driven SPI.
  • All registers written to originally with defaults.
  • data capture is now in continuous mode (27 x 0x00 bytes sent instead of 1 x 0x12 followed by 27 x 0x00)

could any of these things cause the issue I am seeing or anything else to try would be helpful.

Cheers,

Graham.

  • I believe I have got to the bottom of this issue, in ac mode the status returned is not always the correct lead status.


    Correct me if I am wrong in this but it seems that if the lead is off, then you will occasionally get a 0 and occasionally get a 1, if the lead is connected then you will always get a 0 returned.


    This involves checking purely for a 1 to indicate that the channel has lost connection or a number of consecutive 0's to indicate that the channel has been connected.


    nb* I had to change the default comparator threshold to get this to be consistent across our hardware.