ADC sync with PWM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,438件の閲覧回数
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 解決策
993件の閲覧回数
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 返答(返信)
993件の閲覧回数
Monica
Senior Contributor III

Hello Ancy,

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

Best regards,

Monica.

0 件の賞賛
返信
994件の閲覧回数
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

993件の閲覧回数
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 件の賞賛
返信