I believe I may be able to do this with an interrupt, but I would like to see what others think and the execution of it.
Is it possible to control where the ADC samples within a period? MATLAB Simulink C2000 F28379D
7 views (last 30 days)
Show older comments
Joeny Zhen on 23 Mar 2023
Edited: Joeny Zhen on 24 Mar 2023
I have a waveform running at 25 kHz. I am currently running this waveform to the ADC on board which is the LAUNCHXL-F28379D. The programming of this is done with MATLAB Simulink using the C2000 addons.
The sampling period of the ADC in this case is set to 4e-6s, or exactly 25 kHz. The idea is to get a single sample within the period. But, I would like to change the location of this single sample and pass the result to the onboard DAC. For instance, given the sample period is 4e-6s, is it possible to get a single sample at 1e-6, 2e-6, 3e-6, and so on to my choosing? I attempted to change the SoC with ePWM3A as the trigger source and timer for the ADC and visually, the waveform going into the ADC seems to be relatively identical to the waveform the DAC outputs, besides the obvious quantization effects.
Is it possible to take a sample at a specific count and hold that value? What settings can I change to achieve that?
What is my best approach to this problem? Any individuals with experience and knowledge with C2000 Matlab Simulink would be greatly preferred and appreciated! Thanks!~
Fangjun Jiang on 23 Mar 2023
Not too many people noticed this.
In the case of a discrete sample time, the vector is [Ts, To] where Ts is the sampling period and To is the initial time offset.
Find more on Multicore Processor Targets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!