4 Replies Latest reply on Dec 20, 2019 3:36 AM by BragadeeshV_41

    PSOC 5LP SPI Read and Write operation without DMA


      I am working on an ADC converter connected to the SPI read and write pins, the ADC line should be selected by sending data to the ADC and then the receiver will receive the response by reading the analog value connected to the channel. I have written code changes and while running I am not getting the error, but the received data is always 0 no matter what value is connected across ADC.


      I have included the code I am trying, can anyone help me to rectify what might be wrong here, or if you can provide example code, it will be great,


              /* Clear the transmit buffer before next reading (good practice) */





              // set cs bit to low



               //Config input = 0x8C



              //check RX buffer status



              uint8 receivedDataBuffer = SPIM_ReadRxData();


              // set cs bit to high