ADC sync with PWM

cancel
Showing results for 
Search instead for 
Did you mean: 

ADC sync with PWM

Jump to solution
478 Views
Contributor I

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

Tags (3)
1 Solution
33 Views
NXP Employee
NXP Employee

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

View solution in original post

3 Replies
33 Views
Senior Contributor III

Hello Ancy,

is this being helpful? We'd like to know! :smileywink:

Best regards,

Monica.

0 Kudos
34 Views
NXP Employee
NXP Employee

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

View solution in original post

33 Views
Contributor III

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

0 Kudos