This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1293 with CC2045

Other Parts Discussed in Thread: CC2540, ADS1293

We want to SPI Communication between ADS1293 and CC2540.

Here ADS1293 use for system clock 4.096MHz crystal or External clock on CLK pin. so without CLK pin any clock or crystal we can communicate between ADS1293 and CC2540.

here CC2540 use as master and ADS1293 as slave.

also CC2540 work on internal RC osc. But we cant able to communication we just Read revision ID 0x01 of ADS1293 at 0X40 address but its read \0 or 0x00.

Anyone can guide me for that or which kind of setting is required. may be clock syncronization problem so how to set register for SPI communication between ADS1293 and CC2540?? 

  • Hello,

    The external clock, either from the XTAL pins or the CLK pin is not used for SPI communication. The ADS1293 uses the SCLK signal for SPI. The clock from the XTAL or CLK pin is used to run the internal circuitry of the ADS1293. This would explain why you read bad values, the state machine is not running that will get the values out of the registers. You will need to use the a crystal or external clock to have the part work correctly.

    Mike
  • we want to just SPI communiaction and Read Revision ID regisetr from ADS1293.
    Not a any data receive from ADS1293.
    also check clock and its measure on OSC and also its set ad HIGH and LOW pulse according to data sheet mention in ADS1293.
    I think CC2540 is 8-bit SPI and ADS1293 is 16-bit SPI so is that issue or not???
    how to success receive Revision ID which is place at 0x40 register Address.
    if i want to write data on ADS1293 than just two byte continue place in U0DBUF..its right

    Clock set 32Mz XOSC
    CLKCONCMD = (CLKCONCMD & ~(CLKCON_OSC | CLKCON_CLKSPD)) | CLKCON_CLKSPD_32M;
    // Wait until clock source has changed.
    while (CLKCONSTA & CLKCON_OSC);

    same set 9600 Hz frequency by
    #define SPI_BAUD_M 59
    #define SPI_BAUD_E 8

    U0BAUD = SPI_BAUD_M;
    U0GCR = (U0GCR & ~(U0GCR_BAUD_E | U0GCR_CPOL | U0GCR_CPHA | U0GCR_ORDER)) | SPI_BAUD_E;

    also set USART0 as SPI Master mode on ALT1 use...and port Direction
    PERCFG = (PERCFG & ~PERCFG_U0CFG) | PERCFG_U0CFG_ALT1;
    P2DIR &= P2DIR_PRIP0_USART0;
    P0SEL = (P0SEL & ~BIT4) | BIT5 | BIT3 | BIT2;
    P0DIR |= BIT4;

    P0_4 = 0; // Chip Select and New Address Picup

    U0DBUF = 0X00; // 0x00 Address data Write
    // Check if byte is transmitted (and a byte is recieved).
    while(!(U0CSR & U0CSR_TX_BYTE));
    // Clear transmit byte status.
    U0CSR &= ~U0CSR_TX_BYTE;

    U0DBUF = 0X01; // Enable ADS1293 communication
    //Check if byte is transmitted (and a byte is recieved).
    while(!(U0CSR & U0CSR_TX_BYTE));
    // Clear transmit byte status.
    U0CSR &= ~U0CSR_TX_BYTE;

    P0_4 = 1;

    P0_4 = 0; // New data receive

    // Write dummy byte to USART0 buffer (transmit data).
    U0DBUF = 0xC0; // At 0x40 Address Data Read (Revision ID)

    // Check if byte is transmitted (and a byte is recieved).
    while(!(U0CSR & U0CSR_TX_BYTE));

    // Clear transmit byte status.
    U0CSR &= ~U0CSR_TX_BYTE;

    // Write received byte to buffer.
    rxBufferMaster[i] = U0DBUF; // Byte Receive from Adress 0x40


    but i cant able to receive any data if all is ok than i receive 0x01 which is Chip revision id but still 0x00 receive.
  • Hello,

    Please see the information in your other blog entry:

    e2e.ti.com/.../554132

    Mike