This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Put external connected ADS1220 chip into continuous data read mode?

I am trying to read analog voltage using NRF dev board through an external connected ADC (ADS1220), not the internal saadc. My DK board is nrf52, PCA10040. 

I start with the SPI (master) example which reads data from the ADC in one-shot default mode just fine! 
To put ADS1220 into continuous data read where it is converting data continuously I need to write to the configuration registers of ADS1220. When I add my code for this to the SPI example template, my program does not fully execute anymore (there are no errors or bugs but the the chip does not send any data at all). 

What I am doing is: I take the read data opcode for ADS1220 from its datasheet. Say the opcode is 10h. 

#define ADS_READ_DATA_OPCODE 10H 

uint8_t trx_array = ADS_READ_DATA_OPCODE 

nrf_drv_spi_transfer (&spi, &trx_array, 1, NULL, 0);   // transmit the READ_DATA command/opcode 

then try to read the data 

nrf_drv_spi_transfer (&spi,NULL, 0, rx_data, 2) ;   // then try read data 

I do not know where the problem is in trying to write to the configuration regs of the ADS or in issuing opcode commands. 
Any help or guidance will be greatly appreciated. 

Related