TI E2E Community
Precision Data Converters
Precision Data Converters Forum
ADS1256: RDATAC: Read Data Continuous
I would like to connect an ADS1256 to a C6713 DSK. For this purpose i use the McBSP0.
Im now not shure how i need to configure the McBSP.
How is the Read Data Continuous Mode of the ADS1256 exactly working? The description on Page 35 of the datasheet are not very detailled.
My understanding of this mode is the following:
When i have sent the RDATAC command, the adc wil go into Read Data Continuous mode. It will start to convert, when its finished the DRDY Signal will go low. Now I need to set CS low und clock 24 Bits out of the adc.
If this is the correct, it's not that easy to interface this adc with the 6713 DSK.
I would need to connect the DRDY Signal to an external Interrupt pin and make alle the recieving manually in the external ISR. This can't be the right way.
Can anyone advise me how to set all these things up? At the end i just want an interrupt in the C6713, when there is a new sample to process.
You've got the basic flow for this correct. There is a code example for the ADS1256 using the TMS320C6713 here:
The program uses mapping of an external interrupt through the EDMA. See if that helps you get your project going and let us know how you make out.
Thanks for posting this example! Verry interessting, though, I dont see clearly through how it works.
As I dont need to process whole blocks of samples, EDMA has no advantage in my case.
So I think I'll use the EXT_IN6 Pin on the Peripheral Expansion Connector und trigger this Interrupt with the DRDY Signal of the ADC. In the ISR of this Interrupt, I process the last sample, read in the new one, and leave the isr. So, the adc triggers all the processing on the dsp.
Thanks for your help, I will let you know if if was successfull.
So now I have tried out really to communicate with my ADS1256.
For this purpose I studied the provided example.
What I dont unterstand ist the way which an McBSP can be used to communicate in real SPI style.
Clock Stop, and FrameSync concepts are clear.
In my understanding, for example if I want to have one single conversion result, I do the following steps:
1.bring CS down
2.Clock out the Command to obtain one sample to the adc
3. wait a short time
4.clock the converted data out of the ADC
5.bring CS up
This is one communication frame as described in the ADS datasheet and is normally an SPI Com works.
How is this behaviour possible with the McBSP and the CSL ?
I have succesfully written out data with the MCBSP_write(adcSPIHandle, ADS1256_CMD_RDATA); command. So far so good.
But how does this work together with the described communication pattern? This command only clocks out 8 bits then brings CS high again.
In this way, there is no possiblity to clock out the wanted 24 bits.
If we lock at the example code:
(void)SetWordLength(adcSPIHandle,ADS1256_WORDLENGTH_8BIT); /* send read data command to the converter */ while (MCBSP_FGETH(adcSPIHandle, SPCR, XRDY) != 1) ; MCBSP_write(adcSPIHandle, ADS1256_CMD_RDATA); /* receive the dummy word from the converter */ while (MCBSP_FGETH(adcSPIHandle, SPCR, RRDY) != 1) ; (void)MCBSP_read(adcSPIHandle); (void)SetWordLength(adcSPIHandle,ADS1256_WORDLENGTH_24BIT); DSK6713_waitusec(50);
/* send "no command" to read conversion result */ while (MCBSP_FGETH(adcSPIHandle, SPCR, XRDY) != 1) ; MCBSP_write(adcSPIHandle, 0x00000000u); /* retrieve the conversion result from the converter */ while (MCBSP_FGETH(adcSPIHandle, SPCR, RRDY) != 1) ; data = (long)MCBSP_read(adcSPIHandle);
It looks like a silly workaround to get the McBSP to funtction in a real SPI way.
I dont see why this even works, because the writing und reading back functions are separated.
It would really appreciate if someone could explain this to me. Thanks a lot!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.