Problem with ADC block from TI C2000 library

Hi,

I’m currently working with the RT Box 1 and the TMS320F28379D. I use the LaunchPad Interface to connect both systems.

I can send and receive digital signals from the RT Box in the 28379D but, for some reason, I can’t read correctly the analog signals from the RT Box with the ADC block in the 28379D. When I connect the External Mode, the scope associated with the ADC block shows a constant value inconsistent with the transformation formula currently in use. I’ve tried changing the ADC Channels, changing the value sent from the RT Box, modifying the transformation equation but so far none of it has worked. What could be the error?

the model that I’m using to test the ADC channel is attached

ADC_Test.plecs (35.2 KB)

Hello,

This type of question is best suited for Plexim support – support@plexim.com.

I looked at your model, one issue that I noticed is that in the External Mode tab, the “decimation” value under “Sampling” is too large. One of my colleagues explained what this setting does in this answer here. In your model, the sample time is 1e-4, and you are asking for 1000 samples. If the decimation setting is 1, you will receive 1000 samples, with each point sampled at 1e-4 sample time. If the decimation setting is 100, you will still receive 1000 samples, but each point is now sampled at 1e-4*100=0.01 sample rate. So you will have lower resolution on the received waveform, if the decimation setting is higher.

For example in your model, if you apply a sine wave of frequency 50 Hz at the Analog In port of the RT Box, with your current decimation setting (100), you will notice a distorted sine wave at the scope of ADC, as shown in the attached screenshot.

If you decrease the “decimation” to 10, or 1, you will see the waveform that you’re expecting.

As for applying a constant value, I am seeing a small deviation of about 0.1-1%, which is expected from ADC sampling. How much deviation are you seeing from the requested value? Are you able to share a screenshot?

Regards,Manu

Hello Manu,

Thank you for your answer. Next time I’ll send questions like this one to Plexim Support

Regarding the deviation from the requested value, I have a couple of screenshots.

In the screenshot below, I’m sending a sinusoidal signal from the RT box

But in the ADC, I’m reading a constant value

Regards,

Felipe

This is strange. Are you using the same model that you attached in your question above?

Also, how are you routing your signals from the RT Box to the launchpad? Are you using a launchpad interface board? If yes, make sure the launchpad is plugged in properly and double-check the pin-outs here.

Do you happen to have an oscilloscope? If yes, try measuring the ADC pin in question and observe the waveforms.

Regards,Manu