This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

The Input Data mismatch the data displayed in Simulink for TMS320f28027f

Dear all

1. C2000 LaunchPad TMS320f28087f ;

2. MATLAB Simulink R2015b

3. CCS 6.0.0

What I want to do is to input the voltage of one load into the micro-controller through ADCINA0 (J5Pin-6) which translate the analog data to digital data.

The problem is that: The input voltage of load is in value of 1V (measured in green line by oscilloscope, attached as 1), however the data displayed in Micro-controller is number fluctuate around 1100 (attached as 2).

The parameter of the micro-controller blocks are shown in attachments (3, 4, 5, 6). 

Please teach me how to modify the setting parameter of the block to make the value in micro-controller equal to the input voltage value.

 

Best wishes

Zhihao Liu

Attachment 1 voltage measured in oscilloscope

Attachment 2 voltage displayed in microcontroller

Attachment 3

Attachment 4

Attachment 5 parameter setting_1

Attachment 6 parameter setting_2

 

 

  • For the Simulink model aspects, I'd suggest contacting MathWorks Technical Support.

    http://www.mathworks.com/support/contact_us/

    -Brian

  • Hi Zhihao,


    Try measuring the voltage with a multi-meter (handheld or bench-top should both be fine as long as they are properly calibrated) - an oscilloscope usually only has 8-bits of resolution and isn't designed for voltage measurement accuracy.  Once you get the measurement from the multi-meter, convert it to an expected ADC code and then compare with the actual average ADC code converted.  Take this delta and compare to the performance specifications in the ADC datasheet to determine if the sampling process is working correctly. 

  • Dear Devin
    Thanks for your reply, and actually I supply the voltage in value of 1V with dc voltage source to the ADCINA0 pin but the data after conversion is around 1100, can you see my parameters setting in the simulink and teach me how to achieve the accurate data.

    I really appreciate your answer and look forward to your reply.
    Thanks a lot!
    Zhihao Liu