Other Parts Discussed in Thread: ADS1292R
HI,
I am trying to interfece ADS1292R ECG AFE with TM4C1294NCPDT TIVA C micro controller.
I have configured SSI0 as below.
void SPI_Setup()
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
SSIDisable(SSI0_BASE);
GPIOPinConfigure(GPIO_CONFIG_SSI0CLK);
GPIOPinConfigure(GPIO_CONFIG_SSI0RX);
GPIOPinConfigure(GPIO_CONFIG_SSI0TX);
GPIOPinConfigure(GPIO_PA3_SSI0FSS);
GPIOPinTypeSSI(GPIO_PORTA_BASE, (GPIO_PIN_2 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_3 )); // SPI0
SSIAdvModeSet(SSI0_BASE,SSI_ADV_MODE_LEGACY);
SSIConfigSetExpClk(SSI0_BASE, // SPI0
40000000, // System Clock for SSI clock
SSI_FRF_MOTO_MODE_1, // Data frame format (polarity 0, phase 1)
SSI_MODE_MASTER, // Configure as Master
SSI0_SPEED, // Set speed
8); // Byte-long word length
SSIEnable(SSI0_BASE);
}
My Connections are shown in the attached file
TIVA C Controller---- ADS1292R
PN4 ------ARD_PWDN/RESET
PQ0------ARD_START
PQ1------ARD_DRDY
PA3-------ARD_CS
PA4-------ARD_MOSI
PA5-------ARD_MISO
PA2------ARD_SCK
I am trying to write the registers of ADS1292R through TIVA C controller. I could see the data and clock on oscilloscope as expected but I am unable to confirm if the ADS has received data properly.
I have followed the data sheet of ADS to write single register in following way
First byte----Write Opcode | Register address
Second Byte--- (no of registers to write-1)
Third Byte----- Register Data
Now I tried back to read the written register, what I expect is to read the value back which I have written already, Read is done through following way.
First byte----read Opcode | Register address
Second Byte--- (no of registers to read-1)
Third Byte----- 0x00
But I am unable to read the written value back.I am reading some other value from same register. Hence I am unable to understand where the issue is.
Also is the values read from registers is of 2's complement format or not?
NOTE: RESET bar pin of ADS is held high before performing SPI writes.
Expecting a quick reply.
Thanks and Regards,
Janardan M