Hi Community!

I'm stuck with a big problem:

For mi Bachelor Thesis I want to connect an ADS1256 to a 6713DSK and do some filtering..

If've done all the hardware stuff und now I'm trying to get the communication to the ADS working.

I have seen an example from TI (4705.ADS1256-C6713-CCS3v1), which in fact does exactly what I want. But I cant explan how this example should work.

The main problem is:

How can a McBSP be used to comunicate in SPI style?

I can send data whit McBSP_write. I can read back data with McBSP_read.

But when I want to read out a register or data from the ADS I need to do both operations in one CS sequence! Doing a write operation and a read operation will produce 2 CS sequences! This does obviously not work with an SPI device like the ADS1256.

So could someone please explain me, how this is done? See the exampe code for reading a register:

static unsigned int ReadRegister(TADS1256 *pADS,unsigned int uiRegister)
{
    unsigned int iReadValue;

    /* change the McBSP mode to 16 bits                         */
    (void)SetWordLength(pADS->serial->hMcbsp,
                        ADS1256_WORDLENGTH_16BIT);

    (void)SendCommand(pADS->serial->hMcbsp,
                      uiRegister | ADS1256_CMD_RREG);

    /* change the McBSP mode to 8 bits                          */
    (void)SetWordLength(pADS->serial->hMcbsp,
                        ADS1256_WORDLENGTH_8BIT);

    /* wait the necessary number of cycles                      */
    (void)Wait(pADS, 60);

    /* send a dummy word to trigger 8 SCLKs                     */
    while (MCBSP_FGETH(pADS->serial->hMcbsp, SPCR, XRDY) != 1) ;
    MCBSP_write(pADS->serial->hMcbsp, 0);

    /* and get the data                                         */
    while (MCBSP_FGETH(pADS->serial->hMcbsp, SPCR, RRDY) != 1) ;
    iReadValue = MCBSP_read(pADS->serial->hMcbsp) & 0x000000FFu;

    return iReadValue;
}

Is there additional hardware used in this project, which makes one CS frame out of two or how is this working?

Im trieing to get this to work for 2 days now.. :(

Thanks for any help!