Hello dear
i am trying to use ads1298r for my ecg application with lpc2378 micro controller
i am able to read and write internal registers of ads1298r
i have written the following values to the control registers
//CONFIG1 0x86,
//CONFIG2 0x10,
//CONFIG3 0xDc,
//LOFF 0x03,
//CH1SET (PGA gain = 6) 0x60,
//CH2SET (PGA gain = 6) 0x60,
//CH3SET (PGA gain = 6) 0x60,
//CH4SET (PGA gain = 6) 0x60,
//CH5SET (PGA gain = 6) 0x60,
//CH6SET (PGA gain = 6) 0x60,
//CH7SET (PGA gain = 6) 0x60,
//CH8SET (PGA gain = 6) 0x00,
//RLDSENSP (default) 0x00,
//RLDSENSM (default) 0xff,
//LOFF_SENSP 0xFF,
//LOFF_SENSM 0x00,
//LOFF_FLIP (default) 0x00,
//LOFF_STATP (Read only) 0x00,
//LOFF_STATM (Read only) 0x03,
//GPIO 0x00,
//PACE (default) 0x00,
//RESP (default) 0xf0,
//CONFIG4 0x22,
//WCT1 0x0A,
//WCT2 0xE3,
also i am able to read these registersas
i am connecting the front end of ads1298r with the simulator
and able to read leadoff status registers correctly with lead off and lead on status.
but when i try to read data from the ads1298r with read data command i always getting 0x00 ,
when i see the 27 bytes recived from ads1298r in an array in debugging mode in keil compiler
but when i connect cro to the data out pin of ads1298r i am able to see data on cro
will any body help me to read that data in my controller
here is the reading code i am using
S0SPDR =0x12;
while ( !(S0SPSR & SPIF) );
temp1=S0SPDR;
for(temp=0;temp<27;temp++) ;
S0SPDR =0x08;
while ( !(S0SPSR & SPIF) );
temp=S0SPDR;
for(temp=0;temp<27;temp++)
{
S0SPDR =0x00;
while ( !(S0SPSR & SPIF) );
ads1298_data_out[temp]=SSP0DR;
}
Thanks