This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
I am using TMS320F28335 DSP (Experimenter kit) to implement a SPWM to control the 3 phase inverter. I have generated SPWM using sine block and ePWM block in simulink Matlab. Now I want to generate SPWM with ADC interrupt block, i.e. I replace sine block with ADC interrupt block and input as 0 -3V sine from function generator . I am cant proceed further. I attaching the matlab model screen for reference.
***.Whether any buffer circuits is required to connect between ADC signal and DSP pin A0. For ADC interrupt i used the example available in Matlab help.
Parameter:
Gain 5 , Time period 20480.
ADC sine input Freq 50Hz, voltage 0 - 3V. offset 0.
Image 1 is using sine block to generate SPWM.
The image 2 and 3 is ADC interrupt block replacing sine block by ADC interrupt.
Thanks,
Eesan
Hi Logeesan,
A Simulink expert has been notified of your post, and will reply back to you as soon as they can.
Best Regards,
Marlyn
Hi,
I would first check if the interrupts are firing as expected. We can debug the code from CCS.
Here is a link for the same:
You can also log the data using the external mode feature and see if the ADC values sampled are as expected.
Here is the link for the same:
Hi Venkatesh,
I have gone through the steps in the creating CCS file from matlab model. But my question was I apply analog signal (Sine 0 -3V) in ADC pin A0, and run as the program in DSP via CCS as per the procedure, But i dont get the required SPWM signal output. I am attaching the screen shot as reference. Is there some thing to change in the gain value according to the time period of ePWM block.
Settings of ADC signal
Sine wave
Freq = 50 Hz
Voltage = 0~3V
offset = 0
Matlab model
ADC Interrupt =
Gain = 1.84
Time period =7500
Calculation for 0~3V ADC signal =7500/4096
=1.84
Diagnostics viewer.
Logeesan,
I would suggest posting to the Mathworks forum:
https://www.mathworks.com/support/contact_us.html
They are the best ones to help you with Simulink related questions.
Best Regards,
Marlyn