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