MATLAB Answers

TI C2000 Delfino Multichannel ADC read using Simulink

29 views (last 30 days)
Solomon
Solomon on 24 May 2016
Answered: Adnan Ishtay on 25 Jul 2017
Hello all,
I'm trying to read different ADC values from two different channels of ADC-A using Simulink, however, one channel always seems to "copy" the value of the other. I'm using the F28377S Delfino Launchpad with a simple Simulink model: ADC-A1 and ADC-A2 each connected to a display block, 12 bit resolution, with all parameters same for both channels except for the SOC sources. I have a potentiometer connected to each pin. Both the ADCs are outputting the value from one of the potentiometers while the other potentiometer does not seem to have any affect on the ADCs.
I'm supposing I'll have to use ePWM blocks to trigger the two channels at different times, but I do not know how to execute this. Any help would be much appreciated.
Thanks!
  3 Comments
Nail
Nail on 21 Dec 2016
I'm having the same problem too. ADC_A0 and ADC_A1 read exactly the same signal although their inputs are different.

Sign in to comment.

Answers (4)

Adnan Ishtay
Adnan Ishtay on 25 Jul 2017
OHHHH, finally... I have solved the problem, after understanding the basic structure and the operation of ADC module (go to:https://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/configuring-acquisition-window-width-for-adc-blocks.html), the default settings of ADC block in simulink library is set to the maximum ADC-sampling speed, which is trade-off with number of scanned channels for each port (ADC-A or ADC-B), by increasing the access-time of ADC conversion, this is done by the following settings: 1- as stated above by "Nail on 23 Dec 2016", go to Model [Configuration Parameters -> ADC_A -> ADC clock prescaler (ADCCLK)], I have put it to 8. 2- double click on "ADC-F2837xS" block in simulink file, and put the "SOCx acquisition window" to large value (I have put it to 64).

Nail
Nail on 23 Dec 2016
I have changed ADCCLK value from 1.0 to 4.0 from
Model Configuration Parameters -> ADC_A -> ADC clock prescaler (ADCCLK)
and it worked.
  1 Comment
Adnan Ishtay
Adnan Ishtay on 24 Jul 2017
I just like to read more than two ADC input values to calibrate the controller parameters in real-time, I can read one ADC 12-bit value only from each different ports ADC-A and ADC-B, but when I am trying to read more than one channel from any port it is duplicated or disturbed. however, I have tried to "Model Configuration Parameters -> ADC_A -> ADC clock prescaler (ADCCLK)" but it does not work... can anybody help please?

Sign in to comment.


nasimullah khattak
nasimullah khattak on 9 Jun 2017
Hello every body.I want to run ADCIN2 and synchronize it with Epwm2 of TI launchpad F20377S in the simulink environment. It seems that the ADC block collects only one sample and then it stops working. Can any body share a demo ,on how to configure it. Thanks

Muhammed Adel
Muhammed Adel on 6 Jul 2017
Please help me i have the same problem on the same kit :(

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!