Hi all,
I am interfacing DAC1220 and ADS1256 to TM4C1290 microcontroller. I am using ADS1256 at 500SPS. i want to update DAC output when i get the ADC interrupt means almost at 2 mSec.
Please find code below for DAC output.
void DAC_SPI_Transmit(unsigned char temp_spi1_array[],unsigned char total_bytes)
{
unsigned char delay_i=0;
if(Peripheral_Fail[DAC] == 0)
{
for (delay_i=0;delay_i<total_bytes;delay_i++)
{
ROM_SSIDataPut(SSI3_BASE,temp_spi1_array[delay_i]);
Peripherals_Check_Timeout = 0;
while(ROM_SSIBusy(SSI3_BASE))
{
if(Peripherals_Check_Timeout > 2)
{
Peripheral_Fail[DAC] = 1;
return;
}
}
ROM_SSIDataGet(SSI3_BASE, (uint32_t *)&rcvd_data[0]);
}
}
else
return;
}
Now the problem is ROM_SSIDataPut(SSI3_BASE,temp_spi1_array[delay_i]); and while(ROM_SSIBusy(SSI3_BASE)) take too much time that i cant update DAC in 2 mSec. Can you provide delay information for these two functions?