Hello,
I have a new issue with the ADS1296: I toggle between conversion + read continuous and stop conversion + stop continuous mode and sometimes I have only 0 for all channels data???
I toggle the commands every 5-10 seconds.
Here is my code:
/********************************************************************************************************* * ADS129x_RDATAC : enable read continuous mode (this mode is the default reset mode) * **********************************************************************************************************/ void ADS129x_RDATAC_cmd(void) { Acq_state = ACQ_CONTINUOUS; ADS_CS_ON; spi_send_byte_spi3(0x10); ADS_CS_OFF; Enable_ADS129x_DRDY_Interrupt(); Timers_WaitA0(TIMER_A0_1, WAIT_10MS); ADS_START_ON; Timers_WaitA0(TIMER_A0_1, WAIT_10MS); } /********************************************************************************************************* * ADS129x_SDATAC_cmd : stop continuous mode (this mode is the default reset mode) * **********************************************************************************************************/ void ADS129x_SDATAC_cmd(void) { Acq_state = ACQ_STOP; ADS_START_OFF; Timers_WaitA0(TIMER_A0_1, WAIT_10MS); ADS_CS_ON; spi_send_byte_spi3(0x11); ADS_CS_OFF; Timers_WaitA0(TIMER_A0_1, WAIT_10MS); Disable_ADS129x_DRDY_Interrupt(); }
The SPI clk frequency is 1MHz.
Please find here the scope images:
Is there any delay needed between SPI command and START pin? I tried 50µsec and 10msec but the result is always the same: sometimes all channels ouputs 0 ?????
Best regards
Mich