Other Parts Discussed in Thread: , TMS320F28388D
Good afternoon colleagues,
I am working with a TMS320F28388D microcontroller together with an ADS8686S ADC converter. I'am using the ADS8686SEVM-PDK
I had problems programming how to communicate with the ADC, but finally I have been able to do it. I am using the "Parallel Byte" interface with the EMIF of the microcontroller in asynchronous mode.
Once I have managed to set the registers and read the results, I have set the converter to output conversion results using a signal generator.
The ADC is configured as follows in the pictures I am going to show you:
- ADC Range: +/- 10V
- LPF: 15kHz
- Seqen & Burst : Both disabled (manually)ç
- Channel 1 of conversion (A & B)
When a DC signal is connected to the ADC, it seems to work fine. Here are some pictures where you can see how the 0-10V signal moves from mid-range ((2^16)/2) to 2^16 (the code I made adjusts the ADC reading so that the code from 0-32768 goes from -10V to 0V and from 32768-65536 goes from 0 to +10V). The DAC has a range of 0-3,3V so in DC the signal from 0 to +10V moves from 1,65V to 3,3V.


DC SIGNAL
The problem I have is when I put in a sinusoidal signal because as the frequency varies, the amplitude of the signal increases or decreases. I have tried with the signal generator to make changes in frequency and amplitude, and they are independent, so it must be a matter of the ADC conversion.
As you can see from the following photos. I'am connecting a 15 peak to peak V (7,5 peak in each semiperiod). As you can see, when I input this value with 10Hz of frequency, the amplitud is 2,2V from DAC. However, if I increase the frequency to 20Hz, the amplitud decrease and when I decrease the frequency of the signal to 3Hz, the amplitud increase.



In addition, I tested to remain the frequency constant and change the amplitud, and the frequency doesn't change. Only the amplitude with the frequency.
I honestly don't know what is happening with this but is a big problem.
I would like you could help me.
I let you the code:
GPIO_writePin(CONVST, 1);
GPIO_writePin(CONVST, 0);
tramaA = *punteroCS;
tramaB = *punteroCS;
tramaA=ajustetramaADC(tramaA);
tramaB=ajustetramaADC(tramaB);
signotramaA=tramaA>>15;
signotramaB=tramaB>>15;
if(signotramaA==0){
conversionA=tramaA+32768;
//conversionA = tramaA & 0xFFFF;
}
else{
conversionA=tramaA-32768;
//conversionA = tramaA & 0xFFFF) + 1;
}
if(signotramaB==0){
conversionB=tramaB+32768;
// conversionB = tramaB & 0xFFFF;
}
else{
conversionB=tramaB-32768;
// conversionB = ~(tramaB & 0xFFFF) + 1;
}
*AdcBufPtr1A++ =conversionA;
*AdcBufPtr1B++ = conversionB;
convA_DACA=(conversionA>>4) & 0xFFF;
convB_DACB=(conversionB>>4) & 0xFFF;
DAC_setShadowValue(DACA_BASE, convA_DACA);
DAC_setShadowValue(DACB_BASE, convB_DACB);
I let you the graph of the array of AdsBuf to see that this phenomena is not from the DAC and it's from the own conversion.
Thank you in advance,
BR.
Pedro


