Hi my name in Felipe and i'm working with the ADS1293 but i don't understood how can i use the streaming mode could you help me with that? thanks in advance
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.
Hi my name in Felipe and i'm working with the ADS1293 but i don't understood how can i use the streaming mode could you help me with that? thanks in advance
Hi Felipe,
Thanks for your post!
Please consult section 8.5.6 of the ADS1293 datasheet. If you have a specific question, please let us know.
Hi again i've tried using streaming mode and 9.2.2 5-Lead ECG Application of the datasheet, i've tried to read from the DATA LOOP register but i don't know if the data are right, is there a way to verify the DATA? and other question is how can i read the CHANNEL DATA without using the streaming mode?
I think the datasheet is not friendly with the SPI description part and this is an important part.
this is the code i've tried to use:
//------------------------------------------------------------------------------
// void TI_ADS1293_SPIStreamReadReg(uint8_t *buffer, uint8_t count)
//
// DESCRIPTION:
// Special read function for reading status, pace and ecg data registers of selected
// channels. Channels to be read must be selected in CH_CNFG before calling this function.
// Data Loop Register read is extended "count+1" times where "count" is number of source bytes
// enabled in CH_CNFG. Data read are deposited sequentially starting at address "buffer"
// until "count" bytes have been read.
//------------------------------------------------------------------------------
void TI_ADS1293_SPIStreamReadReg(uint8_t *buffer, uint8_t count)
{
uint8_t i, inst;
TI_ADS1293_CSn_PxOUT &= ~TI_ADS1293_CSn_PIN; // /CS enable
inst = ADS1293_READ_BIT | TI_ADS1293_DATA_LOOP_REG; // read from data loop register
while (!(UCA1IFG&UCTXIFG)); // Wait for TXBUF ready
UCA1TXBUF = inst; // Send register address
for(i=0; i<count; i++)
{
while (!(UCA1IFG&UCTXIFG)); // Wait for TXBUF ready
UCA1TXBUF = 0; // Dummy write so we can read data
while (UCA1STAT & UCBUSY); // Wait for TX complete
*(buffer+i) = UCA1RXBUF; // Read register data
}
TI_ADS1293_CSn_PxOUT |= TI_ADS1293_CSn_PIN; // /CS disable
}
Forcing the input to a known value such as GND and attaching a probe to the serial data output is a manual way of verifying that you are at least getting output data. It will not read a flat zero due to small amounts of noise in the system.
If you have not already, I would recommend reading the entire programming section, 8.5. Figure 29. Shows the SPI interface timing protocol including how to address registers to directly read/write. Take a look at section 8.6 as well which shows the register map section, including the address to read specific ECG channel data.