Motor Control Class: ADC PROGRAMMING

Showing results for 
Search instead for 
Did you mean: 

Motor Control Class: ADC PROGRAMMING

No ratings

Motor Control Class: ADC PROGRAMMING

This video shows how to program the ADC with Model Based Design Toolbox to obtain the speed reference for the BLDC speed closed loop control system.

We discuss about:

- How the ADC works

- How to simulate the ADC operations

- How to implement a simple program to read data from the ADC

- How to use BAM to load the application into microprocessor memory

- How to test in real time with FreeMaster

- How to scale the Potentiometer voltage into a speed reference data that represents the rpm.

- How to implement from scratch a Simulink model to cover the ADC functionality

NOTE: Chinese viewers can watch the video on YOUKU using this link.


Labels (1)

Thank you for the very informative videos.

When I try to build the ADC_read model, though, I get the following error:

adc_pnt_library.c:293:5: error: expected expression before '/' token
// while(ADC[adc_num]->MSR.B.NSTART == 0){}

gmake: *** [adc_pnt_library.obj] Error 1

Although in the Target Compiler Opts of the Configuration block the system is calling out the C99 ISO standard, the gcc compiler is complaining about the double forward slash being used for comments.  

I am using S32DS 1.2 instead of S32DS 1.1. 

 Any ideas will be highly appreciated.



Hello ernestoinoa,

Please open a new Discussion about this issue as we can't attach here the Code Generation Output and provide us the full log of the Code Generation from the Diagnostic Viewer of the model you are trying to build.



Version history
Revision #:
1 of 1
Last update:
‎05-28-2017 09:22 PM
Updated by: