c2000 coding using Simulink

1 view (last 30 days)
nitish agarwal
nitish agarwal on 2 Apr 2016
Commented: Gabriel Pauka on 29 Jul 2017
I'm new to C2000 microcontroller.....I am using an adc blk in simulink, then building it and running the output file on ccsv5....in the output I'm getting the adc value but its not in real time, when i stop the program then only values in the register changes.....How to configure ADC for continious data aquisition (real time)?

Answers (1)

Jeevan Joishi
Jeevan Joishi on 5 Apr 2016
I am assuming that the board is configured correctly and you have the right COM port set. To view data from the controller onto a 'display' block in Simulink, you can try executing the model in 'External' mode.
All you need to do is the steps mentioned below and make sure you connect the required port (the one whose value you would like to monitor in real time) on to a 'display' block in your Simulink model.
Please follow the steps mentioned below -
1. From the Simulink Editor toolbar, select 'External'
2. In the Simulink Editor, select 'Simulation > Model Configuration Parameters'
3. In the Configuration Parameters dialog box, click' 'Hardware Implementation' and select your 'Hardware board'
4. Under 'Target Hardware Resources', click 'External mode' and set the appropriate COM port
5. Under 'Target Hardware Resources', click 'Build Options' and check the 'Boot from Flash' option.
6. In the Configuration Parameters dialog box, click 'Code Generation' to ensure that the 'System target file' is set to 'ert.tlc' and the appropriate CCS version is selected as the 'ToolChain'

Tags

Community Treasure Hunt

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

Start Hunting!