c2000 coding using Simulink

조회 수: 2 (최근 30일)
nitish agarwal
nitish agarwal 2016년 4월 2일
댓글: Gabriel Pauka 2017년 7월 29일
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)?

답변 (1개)

Jeevan Joishi
Jeevan Joishi 2016년 4월 5일
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'
  댓글 수: 1
Gabriel Pauka
Gabriel Pauka 2017년 7월 29일
It works perfectly!!

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by