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.

ADS7816 interface withF28069 using SPI

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

 I am doing Interfacing of ADS7816P with F28069 using SPI protocol

SPI Initialization is as follows.

SpiaRegs.SPICCR.all = 0x008F; // Reset on, rising edge, 16-bit char bits
SpiaRegs.SPIPRI.bit.TRIWIRE = 1; // Set so breakpoints don't disturb xmission
SpiaRegs.SPICTL.all = 0x000E; // Enable master mode, normal phase,
// enable talk, and SPI int disabled.
SpiaRegs.SPIBRR = 0x000F;

SpiaRegs.SPICCR.all = 0x00CF; // Relinquish SPI from Reset

is it correct?

Data is output on falling Pulse and Input is latched on Rising edge as per ADC datasheet.

while(1)

{

SpiaRegs.SPICTL.bit.TALK = 0;
spi_xmit(data);
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) { }
rdata = SpiaRegs.SPIRXBUF;

}

Is this loop is correct to read the data from ADC chip?

How much Vcc vtg is required to this ADC?

Regards,

Sagar

  • Hi Sagar,

    ADS7816P requires 5V Vcc whereas F28069 is a 3.3V based device. You'll have to use a level shifter circuitry for SPI communication. Also, for SPI algorithm for this device you can refer controlSuite.

    Regards,

    Gautam