- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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) */
SPIM_ClearTxBuffer();
SPIM_ClearRxBuffer();
SPIM_ClearFIFO();
// set cs bit to low
CS_ADC_Write(0);
//Config input = 0x8C
SPIM_WriteTxData(adcInputCofig);
//check RX buffer status
//while(!(SPIM_ReadRxStatus()));
uint8 receivedDataBuffer = SPIM_ReadRxData();
// set cs bit to high
CS_ADC_Write(1);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Karthik,
Is the ADC conversion is happening properly ? Kindly check the following application note. https://www.cypress.com/documentation/application-notes/an61102-psoc-3-and-psoc-5lp-adc-data-bufferi... .
Best Regards,
Vasanth R S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KaGa_3938861,
Looks like your previous response is deleted. Could you please post your last response again?
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh,
I am trying to remove delete the post from the community, i got the solution i was looking for and the post is not relevant some what, i couldnt do it, if you know how to remove entire post, please let me know,
Thanks,
Karthik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KaGa_3938861,
We are glad that your issue is resolved. We will move the status of the thread to locked.
Regards,
Bragadeesh
Bragadeesh