ADC sync with PWM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ADC sync with PWM

跳至解决方案
1,475 次查看
ancymuhammed
Contributor III

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

标记 (3)
1 解答
1,030 次查看
Petr_H
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

在原帖中查看解决方案

3 回复数
1,030 次查看
Monica
Senior Contributor III

Hello Ancy,

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

Best regards,

Monica.

0 项奖励
回复
1,031 次查看
Petr_H
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

1,030 次查看
sandrom
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 项奖励
回复