Hi,
i want to interfacing the ATSAMD21G18A mcu and ADS1220.
i was activated the spi of ATSAMD21G18A. but i need a code for adc(using ADS1220). please can any one send the code , why because i read the datasheet of the ADS1220 in tha i got one Pseudo Code, based on this i am making the code in that i couldn't understand the bellow highlighted please any one help me to solve this problem
Power-up;
Delay to allow power supplies to settle and power-up reset to complete (minimum of 50 μs);
Configure the SPI interface of the microcontroller to SPI mode 1 (CPOL = 0, CPHA = 1);
If the CS pin is not tied low permanently, configure the microcontroller GPIO connected to CS as an
output;
Configure the microcontroller GPIO connected to the DRDY pin as a falling edge triggered interrupt
input;
Set CS to the device low;
Delay for a minimum of td(CSSC);
Send the RESET command (06h) to make sure the device is properly reset after power-up;
Delay for a minimum of 50 μs + 32 · t(CLK);
Write the respective register configuration with the WREG command (43h, 08h, 04h, 10h, and 00h);
As an optional sanity check, read back all configuration registers with the RREG command (23h);
Send the START/SYNC command (08h) to start converting in continuous conversion mode;
Delay for a minimum of td(SCCS);
Clear CS to high (resets the serial interface);
Loop
{
Wait for DRDY to transition low;
Take CS low;
Delay for a minimum of td(CSSC);
Send 24 SCLK rising edges to read out conversion data on DOUT/DRDY;
Delay for a minimum of td(SCCS);
Clear CS to high;
}
Take CS low;
Delay for a minimum of td(CSSC);
Send the POWERDOWN command (02h) to stop conversions and put the device in power-down mode;
Delay for a minimum of td(SCCS);
Clear CS to high;