I have the ADS1293 EVM and i am trying to interface it to the LPC2148 MCU with the SPI interface.
When i try to read any register i jus get a 0x00 value even though i have written some other value to the register.
Has anyone interfaced the LPC21xx to this board.below is the write and read functions i have used for SPI.
void spi_write(unsigned char addr,unsigned char data)
{
IO0CLR|=0x00002000;
S0SPDR=addr;
while((S0SPSR & 0x80)==0x0);
S0SPDR=data;
while((S0SPSR & 0x80)==0x0);
IO0SET|=0x00002000;
for(i=0;i<=1000;i++);
}
unsigned char spi_read(unsigned char addr)
{
IO0CLR|=0x00002000;
//while((S0SPSR & 0x80)==0x0);
S0SPDR=addr;
while((S0SPSR & 0x80)==0x0);
S0SPDR = 0xAA;
while((S0SPSR & 0xA0)==0x0);
rec_data_spi=S0SPDR;
IO0SET|=0x00002000;
for(i=0;i<=1000;i++);
return(rec_data_spi);
}