This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C51: SPI isn't latching in any data

Hello everyone,

I am currently working on a project which involves communication between an Infineon XC888 with a TI ADS1256 (ADC) using an SPI Interface.

I can successfully send commands to the ADC, but reading the data send back to me is not working at all.

For example:

 SSC_vSendData(0x14); // send the Read Registry command
 SSC_vSendData(0x00); // send # of bytes to be read (1+0x00)
 SSC_vSendData(0x00); // send Dummy Byte
 SSC_Data = SSC_RBL;  // storing of the received data

When I look at the scope, the returned signal on the DOut line looks perfectly fine, but when I read the Receive Buffer (SSC_RBL), it's always empty (0x00).

I also can't image having any timing problems, after all, the Microcontroller should always leave the data in the SSC_RBL register until new data is being send, right?.

Thanks in advance.

PS: SSC_vSendData() puts the byte in the SSC_TBL register and waits until the Busy flag is cleared.

0