Can anyone please help me to write the code for adc synchronised with pwm in processor expert. The controller is MC56F8037 and pwm frequency is 12KHz
Solved! Go to Solution.
Hi,
Please find attached a Processor Expert project for 56F8037 showing the ADC synchronization.
I have set it to produce 50% PWM signal using PWMMC component. There is a GPIO output PTB6 toggled after each ADC conversion (see AD1_onEnd in Events.c, there you can also read the results).
You can adjust the frequency on other parameters in the PWMMC component settings.
best regards
Petr Hradsky
Processor Expert Support Team
Hello Ancy,
is this being helpful? We'd like to know! :smileywink:
Best regards,
Monica.
Hi,
Please find attached a Processor Expert project for 56F8037 showing the ADC synchronization.
I have set it to produce 50% PWM signal using PWMMC component. There is a GPIO output PTB6 toggled after each ADC conversion (see AD1_onEnd in Events.c, there you can also read the results).
You can adjust the frequency on other parameters in the PWMMC component settings.
best regards
Petr Hradsky
Processor Expert Support Team
Dear Petr,
I know it is an old post, but I would like to ask you one thing about the project you attached.
It helped me too, but I read that it is possibile to synchronize also PWM with ADCA and PWM with ADCB, with different conversion timing synchronization (using TMRA2 and TMRA3).
I tried to modifiy your project to do this, but I'm not sure that it is possible, maybe the high-level component doesn't cover this option?
My target controller is 56F8023, not sure if 8037 is the same, can you help me? Do you have an example of double-synchronization?
Thanks a lot,
Sandro