Other Parts Discussed in Thread: ADS1259, ADS1256
//the ADS1259 config data
//===========================================
#define CONFIG0 0X04 //enable internal reference bias, enable SPI timeout
#define CONFIG1 0X02 //disable out of range flag, disable CHKSUM, sinc1 fiter, internal reference, no start delay
#define CONFIG2 0X33 //internal osc, syncout enable, P control enable, 60 SPS
#define OFC0 0X0
#define OFC1 0X0
#define OFC2 0X0
#define FSC0 0X0
#define FSC1 0X0
#define FSC2 0X0
void InitADS1259(void)
{
INT32U i;
SPI0Write(ADS1259_CMD_SDATAC); //RDATAC must cancel before any writing register cmd
SPI0Write(ADS1259_CMD_STOP);
SPI0Write(ADS1259_CMD_RESET); //reset the ads1259
for(i=0; i <7200; i++){}
SPI0Write(ADS1259_CMD_SDATAC); //stop read data continuous mode
SPI0Write(ADS1259_CMD_WREG | ADS1259_ADDR_CFG0);
SPI0Write(8); //write 9 registers
SPI0Write(CONFIG0);
SPI0Write(CONFIG1);
SPI0Write(CONFIG2);
SPI0Write(OFC0);
SPI0Write(OFC1);
SPI0Write(OFC2);
SPI0Write(FSC0);
SPI0Write(FSC1);
SPI0Write(FSC2);
}
These my initialization code, Pulse Control Mode, Stop Continuous Read Data Mode.
Here is my operation steps:
send Start command or set the start pin High
wait until the failing edge of the DRDY pin.
send RDATA command
read conversion result.(24 bits).
I have capured the wave of the spi wire and the command, they are all right.
I can make sure all the initialization code correctly.
Could you post me a example soon.
Thank you !
jihanbang1314@126.com