A tutorial for how to read a serial port in a TI C2000 Dev. Kit with simulink.
Afficher commentaires plus anciens
Hi everyone, I am suffering to find any kind of tutorial on how to read in real time some input from my board using Simulink. I have a C2000 F28379D LaunchPad and I want to use one of the inputs to read an analog signal (like a potentiometer) and to show in real time in one program in Simulink, but I can not find anything.
I know this sounds very basic, but I did not find anything about it, if anyone can inform me.
Réponses (1)
Hi,
You can download the model file that I've attached.
ADC sampling at 10KHz,
1KHz signal to sample and hold.
Pin 30 (J3-30) for analog input
Pin 70 (J7-70) for DAC out
GPIO out is a blinking led on launchpad to observe if the program is running.
Last but not least
Right Click on "My Computer" > Properties > Device Manager > Ports
Check if XDS100 Class USB Serial Port (COM4)
else note which COMX it is connected (COM3,COM4,....)
if its COM4 it is okay
if not
Return to your simulink window, click on gear symbol (Properties)
Select Hardware Implementation
Click Target Hardware Resources
Scroll all the way down
There is "External mode" section (All after GPIO AND DMA...)
Scroll all the way up
Communication interface : Serial
Serial Port : COM4
Change it to (COM3,5,10.... whatever your port is)
Catégories
En savoir plus sur Analog Devices ADALM1000 Support from Data Acquisition Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!